diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/views/admin_sidebar.html.php | 45 | ||||
-rw-r--r-- | modules/gallery/views/form.html.php | 2 | ||||
-rw-r--r-- | modules/tag/css/tag.css | 8 | ||||
-rw-r--r-- | modules/tag/js/tag.js | 6 | ||||
-rw-r--r-- | modules/tag/views/admin_tags.html.php | 2 |
5 files changed, 33 insertions, 30 deletions
diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index 030dfdce..f784b1a5 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -1,11 +1,13 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <script type="text/javascript"> $(document).ready(function(){ - $(".g-blocks-list").equal_heights(); + $(".g-admin-blocks-list").equal_heights(); + var extra_ht = $(".g-admin-blocks-list li").length * $(".g-admin-blocks-list li:first").height(); + $(".g-admin-blocks-list").height($(".g-admin-blocks-list").height() + extra_ht); }); $(function() { - $(".g-blocks-list ul").sortable({ + $(".g-admin-blocks-list ul").sortable({ connectWith: ".g-sortable-blocks", opacity: .7, placeholder: "g-target", @@ -15,10 +17,14 @@ $("ul#g-active-blocks li").each(function(i) { active_blocks += "&block["+i+"]="+$(this).attr("ref"); }); - $.getJSON($("#g-admin-blocks").attr("ref").replace("__ACTIVE__", active_blocks), function(data) { + $.getJSON($("#g-site-blocks").attr("ref").replace("__ACTIVE__", active_blocks), function(data) { if (data.result == "success") { $("ul#g-available-blocks").html(data.available); $("ul#g-active-blocks").html(data.active); + var message = "Updated blocks"; + $("#g-action-status").remove(); + $("#g-block-admin").before("<ul id=\"g-action-status\" class=\"g-message-block\"><li class=\"g-success\">" + message + "</li></ul>"); + $("#g-action-status").fadeTo(1000,1).fadeTo(2000,0); } }); } @@ -26,27 +32,30 @@ }).disableSelection(); }); </script> -<div class="g-block"> + +<div id="g-block-admin" class="g-block ui-helper-clearfix"> <h1> <?= t("Manage Sidebar") ?> </h1> <p> <?= t("Select and drag blocks from the available column to the active column to add to the sidebar; remove by dragging the other way.") ?> </p> - <div id="g-admin-blocks" class="g-block-content ui-helper-clearfix" ref="<?= url::site("admin/sidebar/update?csrf={$csrf}__ACTIVE__") ?>"> - <div class="g-block g-left"> - <h3><?= t("Available Blocks") ?></h3> - <div class="g-blocks-list g-block-content"> - <ul id="g-available-blocks" class="g-sortable-blocks"> - <?= $available ?> - </ul> + <div class="g-block-content"> + <div id="g-site-blocks" ref="<?= url::site("admin/sidebar/update?csrf={$csrf}__ACTIVE__") ?>"> + <div class="g-admin-blocks-list"> + <div><h3><?= t("Available Blocks") ?></h3></div> + <div> + <ul id="g-available-blocks" class="g-sortable-blocks"> + <?= $available ?> + </ul> + </div> </div> - </div> - <div class="g-block g-left"> - <h3><?= t("Active Blocks") ?></h3> - <div class="g-blocks-list g-block-content"> - <ul id="g-active-blocks" class="g-sortable-blocks"> - <?= $active ?> - </ul> + <div class="g-admin-blocks-list"> + <div><h3><?= t("Active Blocks") ?></h3></div> + <div> + <ul id="g-active-blocks" class="g-sortable-blocks"> + <?= $active ?> + </ul> + </div> </div> </div> </div> diff --git a/modules/gallery/views/form.html.php b/modules/gallery/views/form.html.php index 6bc622fd..abc32164 100644 --- a/modules/gallery/views/form.html.php +++ b/modules/gallery/views/form.html.php @@ -58,7 +58,7 @@ if (!function_exists("DrawForm")) { } if ($input->error_messages()) { foreach ($input->error_messages() as $error_message) { - print "$prefix <p class=\"g-error\">\n"; + print "$prefix <p class=\"g-message g-error\">\n"; print "$prefix $error_message\n"; print "$prefix </p>\n"; } diff --git a/modules/tag/css/tag.css b/modules/tag/css/tag.css index ec16251d..03ed444b 100644 --- a/modules/tag/css/tag.css +++ b/modules/tag/css/tag.css @@ -80,6 +80,7 @@ #g-tag-admin td { border: 0; + vertical-align: top; } #g-tag-admin ul { @@ -92,9 +93,4 @@ #g-rename-tag-form ul { margin-bottom: 0; -} - -#g-rename-tag-form input[type="text"].g-error { - border: 2px solid red; - background: none; -} +}
\ No newline at end of file diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index 02985d55..ed977480 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -19,7 +19,7 @@ function ajaxify_tag_form() { function closeEditInPlaceForms() { // closes currently open inplace edit forms if ($("#g-rename-tag-form").length) { - $("#g-edit-error-message").remove(); + $("#g-action-status").remove(); var li = $("#g-rename-tag-form").parent(); $("#g-rename-tag-form").parent().html($("#g-rename-tag-form").parent().data("revert")); li.height(""); @@ -64,17 +64,15 @@ function editInPlace(element) { $("#g-rename-tag-form").ajaxForm({ dataType: "json", success: function(data) { - console.log("success"); if (data.result == "success") { closeEditInPlaceForms(); // close form $(".g-tag[rel=" + data.tag_id + "]").text(data.new_tagname); // update tagname window.location.reload(); } else if (data.result == "error") { - console.log("error"); $("#g-rename-tag-form #name") .addClass("g-error") .focus(); - $("#g-tag-admin").before("<p id=\"g-edit-error-message\" class=\"g-error\">" + data.message + "</p>"); + $("#g-tag-admin").before("<p id=\"g-action-status\" class=\"g-message-block g-error\">" + data.message + "</p>"); } } }); diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index 8647412d..3e333817 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -23,7 +23,7 @@ <div class="g-block-content"> <table id="g-tag-admin"> - <caption class="g-understate"> + <caption> <?= t2("There is one tag", "There are %count tags", $tags->count()) ?> </caption> <tr> |