mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-19 10:59:16 -04:00
Rework server_add. It's smaller and leaner now, storing the list of
files out in a separate model for scalability. Removed the "pause" functionality. - Server_Add_Controller extends Admin_Controller so that we don't have to check for admin every time. - Task completion time now factors in the time it takes to walk the arbitrarily deep trees - Moved checkbox management entirely into JS using jQuery - Simplified the JS considerably
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<script type="text/javascript">
|
||||
var GET_CHILDREN_URL = "<?= url::site("server_add/children?path=__PATH__") ?>";
|
||||
var START_URL = "<?= url::site("server_add/start?item_id={$item->id}&csrf=$csrf") ?>";
|
||||
</script>
|
||||
|
||||
<div id="gServerAdd">
|
||||
@@ -18,18 +19,28 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<?= form::open(url::abs_site("server_add/add"), array("method" => "post")) ?>
|
||||
<?= form::open(url::abs_site("server_add/start/$item->id"), array("method" => "post")) ?>
|
||||
<?= access::csrf_form_field(); ?>
|
||||
<ul id="gServerAddTree" class="gCheckboxTree">
|
||||
<?= $tree ?>
|
||||
</ul>
|
||||
|
||||
<div class="gProgressBar" style="display: none"></div>
|
||||
|
||||
<span>
|
||||
<input id="gServerAddPauseButton" class="submit ui-state-disabled" disabled="disabled" type="submit"
|
||||
value="<?= t("Pause") ?>" style="display: none">
|
||||
<input id="gServerAddAddButton" class="submit ui-state-disabled" disabled="disabled" type="submit"
|
||||
value="<?= t("Add") ?>">
|
||||
<input id="gServerAddAddButton" class="submit ui-state-disabled" disabled="disabled"
|
||||
type="submit" value="<?= t("Add") ?>">
|
||||
</span>
|
||||
<?= form::close() ?>
|
||||
<div class="gProgressBar" style="visibility: hidden" ></div>
|
||||
<script type="text/javascript">
|
||||
$("#gServerAddAddButton").ready(function() {
|
||||
$("#gServerAddAddButton").click(function(event) {
|
||||
event.preventDefault();
|
||||
$("#gServerAdd .gProgressBar").
|
||||
progressbar().
|
||||
progressbar("value", 0).
|
||||
slideDown("fast", function() { start_add() });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user