Files
gallery3/modules/gallery/views/admin_maintenance_show_log.html.php
Tim Almdal 1f014aae6c Allow a theme to override the page refresh mechanism. Create a new
javascript lib (gallery.reload.js) which defines the functions
gallery_reload() and gallery_location(new_location).  They just
do a window.location.reload() and window.location = new_location.

This change breaks the assumption that all themes will handle page reloads
the same and allows the theme to customize the page refresh.
2009-07-27 12:39:12 -07:00

20 lines
735 B
PHP

<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
dismiss = function() {
$.gallery_reload();
}
download = function(){
// send request
$('<form action="<?= url::site("admin/maintenance/save_log/$task->id?csrf=$csrf") ?>" method="post"></form>').
appendTo('body').submit().remove();
};
</script>
<div id="gTaskLogDialog">
<h1> <?= $task->name ?> </h1>
<div class="gTaskLog">
<pre><?= p::purify($task->get_log()) ?></pre>
</div>
<button id="gCloseButton" class="ui-state-default ui-corner-all" onclick="dismiss()"><?= t("Close") ?></button>
<button id="gSaveButton" class="ui-state-default ui-corner-all" onclick="download()"><?= t("Save") ?></button>
</div>