Files
gallery3/core/views/admin_maintenance_task.html.php
Bharat Mediratta cd1d023754 Change the preamble for views in two ways:
1) drop unnecessary semicolon
2) start with <?php for extra security in the case that the server itself doesn't
   have short_tags enabled (the app won't work, but we need to make sure that we're
   still secure)
2009-01-01 00:23:29 +00:00

24 lines
717 B
PHP

<?php defined("SYSPATH") or die("No direct script access.") ?>
<script src="<?= url::file("lib/jquery.js") ?>" type="text/javascript"></script>
<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) {
setTimeout(update, 100);
}
}
});
}
update();
</script>
<div id="gProgressBar">
status: <span id="gStatus"></span>
<br/>
percent_complete: <span id="gPercentComplete"></span>
</div>