mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-06 04:59:07 -04:00
- And refactor printf to our string interpolation / pluralization syntax - Also, a slight change to the translations_incomings table, using binary(16) instead of char(32) as message key.
33 lines
975 B
PHP
33 lines
975 B
PHP
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
<script type="text/javascript">
|
|
update = function() {
|
|
$.ajax({
|
|
url: "<?= url::site("admin/maintenance/run/$task->id?csrf=$csrf") ?>",
|
|
dataType: "json",
|
|
success: function(data) {
|
|
$("#gStatus").html("" + data.task.status);
|
|
$("#gPercentComplete").html("" + data.task.percent_complete);
|
|
if (data.task.done) {
|
|
$("#gPauseButton").hide();
|
|
$("#gDoneButton").show();
|
|
} else {
|
|
setTimeout(update, 100);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
update();
|
|
dismiss = function() {
|
|
window.location.reload();
|
|
}
|
|
</script>
|
|
<div id="gProgressBar">
|
|
status: <span id="gStatus"></span>
|
|
<br/>
|
|
percent_complete: <span id="gPercentComplete"></span>
|
|
<div>
|
|
<button id="gPauseButton" onclick="dismiss()"><?= t("Pause") ?></button>
|
|
<button id="gDoneButton" style="display: none" onclick="dismiss()"><?= t("Done") ?></button>
|
|
</div>
|
|
</div>
|