forked from ZwiiCMS-Team/ZwiiCMS
autre test avec le curseur en wait mais dans jquery
This commit is contained in:
parent
06fd8a15d8
commit
1dfbb9361f
@ -15,12 +15,4 @@
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
||||
|
||||
.cursorWait {
|
||||
cursor: wait;
|
||||
}
|
||||
|
||||
.cursorDefault {
|
||||
cursor: default;
|
||||
}
|
||||
*/
|
@ -1,6 +1,9 @@
|
||||
function step(i, data) {
|
||||
var errors = ["<?php echo helper::translate('Préparation de la mise à jour'); ?>", "<?php echo helper::translate('Téléchargement et validation de l\'archive'); ?>", "<?php echo helper::translate('Installation'); ?>", "<?php echo helper::translate('Configuration'); ?>"];
|
||||
$(".installUpdateProgressText").hide(), $(".installUpdateProgressText[data-id=" + i + "]").show();
|
||||
|
||||
$("body").css("cursor", "wait");
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo helper::baseUrl(false); ?>?install/steps",
|
||||
@ -17,6 +20,7 @@ function step(i, data) {
|
||||
setTimeout((function () {
|
||||
if (4 === i) {
|
||||
$("#installUpdateSuccess").show();
|
||||
$("body").css("cursor", "default");
|
||||
$("#installUpdateEnd").removeClass("disabled");
|
||||
$("#installUpdateProgress").hide();
|
||||
} else {
|
||||
@ -32,6 +36,7 @@ function step(i, data) {
|
||||
}
|
||||
|
||||
function showError(step, message, errors) {
|
||||
$("body").css("cursor", "default");
|
||||
$("#installUpdateErrorStep").text(errors[step] + " (étape n°" + step + ")");
|
||||
$("#installUpdateError").show();
|
||||
$("#installUpdateEnd").removeClass("disabled");
|
||||
|
@ -14,27 +14,27 @@
|
||||
<div class="col9 verticalAlignMiddle">
|
||||
<div id="installUpdateProgress">
|
||||
<?php echo template::ico('spin', ['animate' => true]); ?>
|
||||
<span class="cursorWait installUpdateProgressText" data-id="1">
|
||||
<span class="installUpdateProgressText" data-id="1">
|
||||
<?php echo helper::translate('1/4 : Préparation...'); ?>
|
||||
</span>
|
||||
<span class="cursorWait installUpdateProgressText displayNone" data-id="2">
|
||||
<span class="installUpdateProgressText displayNone" data-id="2">
|
||||
<?php echo helper::translate('2/4 : Téléchargement...'); ?>
|
||||
</span>
|
||||
<span class="cursorWait installUpdateProgressText displayNone" data-id="3">
|
||||
<span class="installUpdateProgressText displayNone" data-id="3">
|
||||
<?php echo helper::translate('3/4 : Installation...'); ?>
|
||||
</span>
|
||||
<span class="cursorWait installUpdateProgressText displayNone" data-id="4">
|
||||
<span class="installUpdateProgressText displayNone" data-id="4">
|
||||
<?php echo helper::translate('4/4 : Configuration...'); ?>
|
||||
</span>
|
||||
</div>
|
||||
<div id="installUpdateError" class="message colorRed displayNone cursorDefault">
|
||||
<div id="installUpdateError" class="message colorRed displayNone">
|
||||
<?php echo template::ico('cancel'); ?>
|
||||
<strong>
|
||||
<?php echo helper::translate('Une erreur est survenue lors de l\'étape :') . '<br>'; ?>
|
||||
<span id="installUpdateErrorStep"> </span>.
|
||||
</strong>
|
||||
</div>
|
||||
<div id="installUpdateSuccess" class="message colorGreen displayNone cursorDefault">
|
||||
<div id="installUpdateSuccess" class="message colorGreen displayNone">
|
||||
<?php echo template::ico('check'); ?>
|
||||
<?php echo helper::translate('Mise à jour terminée avec succès.'); ?>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user