mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-19 19:09:13 -04:00
Inline admin JS into admin_server_add.html.php. Fixes #1686.
This commit is contained in:
@@ -1,4 +1,19 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<?= $theme->css("server_add.css") ?>
|
||||
<?= $theme->css("jquery.autocomplete.css") ?>
|
||||
<?= $theme->script("jquery.autocomplete.js") ?>
|
||||
<?= $theme->script("admin.js") ?>
|
||||
<script type="text/javascript">
|
||||
$("document").ready(function() {
|
||||
$("#g-path").autocomplete(
|
||||
"<?= url::site("__ARGS__") ?>".replace("__ARGS__", "admin/server_add/autocomplete"),
|
||||
{
|
||||
max: 256,
|
||||
loadingClass: "g-loading-small",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="g-block">
|
||||
<h1> <?= t("Add from server administration") ?> </h1>
|
||||
<div class="g-block-content">
|
||||
@@ -8,12 +23,17 @@
|
||||
<? if (empty($paths)): ?>
|
||||
<li class="g-module-status g-info"><?= t("No authorized image source paths defined yet") ?></li>
|
||||
<? endif ?>
|
||||
|
||||
<? foreach ($paths as $id => $path): ?>
|
||||
<li>
|
||||
<?= html::clean($path) ?>
|
||||
<a href="<?= url::site("admin/server_add/remove_path?path=" . urlencode($path) . "&csrf=$csrf") ?>"
|
||||
<a href="<?= url::site("admin/server_add/remove_path?path=" . urlencode($path) . "&csrf=<?= access::csrf_token() ?>") ?>"
|
||||
id="icon_<?= $id ?>"
|
||||
class="g-remove-dir g-button"><span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a>
|
||||
class="g-remove-dir g-button">
|
||||
<span class="ui-icon ui-icon-trash">
|
||||
<?= t("delete") ?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<? endforeach ?>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user