From db0966a9bce0396b0c98f3532bca8613f77cdb05 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 12 Jun 2010 15:39:38 -0700 Subject: Fix up some indentation and comment style. --- modules/gallery/js/l10n_client.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'modules/gallery/js') diff --git a/modules/gallery/js/l10n_client.js b/modules/gallery/js/l10n_client.js index a1170e2d..a1b970e7 100644 --- a/modules/gallery/js/l10n_client.js +++ b/modules/gallery/js/l10n_client.js @@ -60,25 +60,21 @@ jQuery.extend(Gallery, { $('#l10n-client').height('22em').removeClass('hidden'); //$('#l10n-client').slideUp(); $('#g-minimize-l10n').text("_"); - /* - * This CSS clashes with Gallery's CSS, probably due to - * YUI's grid / floats. - if(!$.browser.msie) { - $('body').css('border-bottom', '22em solid #fff'); - } - */ + // This CSS clashes with Gallery's CSS, probably due to + // YUI's grid / floats. + // if(!$.browser.msie) { + // $('body').css('border-bottom', '22em solid #fff'); + // } $.cookie('Gallery_l10n_client', '1', {expires: 7, path: '/'}); break; case 0: $('#l10n-client-string-select, #l10n-client-string-editor, #l10n-client .labels .label').hide(); $('#l10n-client').height('2em').addClass('hidden'); // TODO: Localize this message - $('#g-minimize-l10n').text(MSG_TRANSLATE_TEXT); - /* - if(!$.browser.msie) { - $('body').css('border-bottom', '0px'); - } - */ + $('#g-minimize-l10n').text(MSG_TRANSLATE_TEXT); + // if(!$.browser.msie) { + // $('body').css('border-bottom', '0px'); + // } $.cookie('Gallery_l10n_client', '0', {expires: 7, path: '/'}); break; } -- cgit v1.2.3 From 892727830d873a9f0a1a49f10ee14b0890088b23 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 20 Jun 2010 16:52:10 -0700 Subject: Add a loading indicator to the delete form by tagging some JS on at the end which triggers .gallery_show_loading(). Not a complete fix for #817 but it's a start and it takes care of one place where we have a long running process. --- modules/gallery/helpers/item.php | 2 ++ modules/gallery/js/item_form_delete.js | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 modules/gallery/js/item_form_delete.js (limited to 'modules/gallery/js') diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php index 15bbe977..aef68c6e 100644 --- a/modules/gallery/helpers/item.php +++ b/modules/gallery/helpers/item.php @@ -162,6 +162,8 @@ class item_Core { "quick/delete/$item->id?page_type=$page_type", "", "post", array("id" => "g-confirm-delete")); $group = $form->group("confirm_delete")->label(t("Confirm Deletion")); $group->submit("")->value(t("Delete")); + $form->script("") + ->url(url::abs_file("modules/gallery/js/item_form_delete.js")); return $form; } diff --git a/modules/gallery/js/item_form_delete.js b/modules/gallery/js/item_form_delete.js new file mode 100644 index 00000000..fa3f24a2 --- /dev/null +++ b/modules/gallery/js/item_form_delete.js @@ -0,0 +1,5 @@ +$("#g-confirm-delete").submit( + function() { + $("#g-confirm-delete input[type=submit]").gallery_show_loading(); + } +); -- cgit v1.2.3