diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-10-22 22:06:36 -0600 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-23 05:41:41 -0700 |
commit | 367e6a8983a6d0fbd76fd36b6627e8adc35332da (patch) | |
tree | 27e14fdd97561e1d55edfc26a71ee8974277a592 /modules | |
parent | 2d5b65a419908eed028d96c76ef2d01273376f13 (diff) |
Standardize message markup, make the update block status message translatable.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/controllers/admin_sidebar.php | 3 | ||||
-rw-r--r-- | modules/gallery/views/admin_sidebar.html.php | 8 | ||||
-rw-r--r-- | modules/tag/js/tag.js | 5 |
3 files changed, 11 insertions, 5 deletions
diff --git a/modules/gallery/controllers/admin_sidebar.php b/modules/gallery/controllers/admin_sidebar.php index f029d259..c83b5a37 100644 --- a/modules/gallery/controllers/admin_sidebar.php +++ b/modules/gallery/controllers/admin_sidebar.php @@ -47,7 +47,8 @@ class Admin_Sidebar_Controller extends Admin_Controller { $v = new View("admin_sidebar_blocks.html"); $v->blocks = $active; $result["active"] = $v->render(); - + $message = t("Updated sidebar blocks"); + $result["message"] = (string) $message; print json_encode($result); } diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index 67752f75..7c97270c 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -21,10 +21,12 @@ if (data.result == "success") { $("ul#g-available-blocks").html(data.available); $("ul#g-active-blocks").html(data.active); - var message = <?= t("Updated blocks")->for_js() ?>; $("#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); + var message = "<ul id=\"g-action-status\" class=\"g-message-block\">"; + message += "<li class=\"g-success\">" + data.message + "</li>"; + message += "</ul>"; + $("#g-block-admin").before(message); + $("#g-action-status li").gallery_show_message(); } }); } diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index ed977480..8cb4e571 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -72,7 +72,10 @@ function editInPlace(element) { $("#g-rename-tag-form #name") .addClass("g-error") .focus(); - $("#g-tag-admin").before("<p id=\"g-action-status\" class=\"g-message-block g-error\">" + data.message + "</p>"); + var message = "<ul id=\"g-action-status\" class=\"g-message-block\">"; + message += "<li class=\"g-error\">" + data.message + "</li>"; + message += "</ul>"; + $("#g-tag-admin").before(message); } } }); |