Permalink
Browse files

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.
  • Loading branch information...
1 parent 9b4d9d1 commit 892727830d873a9f0a1a49f10ee14b0890088b23 @bharat bharat committed Jun 20, 2010
Showing with 7 additions and 0 deletions.
  1. +2 −0 modules/gallery/helpers/item.php
  2. +5 −0 modules/gallery/js/item_form_delete.js
@@ -162,6 +162,8 @@ static function get_delete_form($item) {
"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;
}
@@ -0,0 +1,5 @@
+$("#g-confirm-delete").submit(
+ function() {
+ $("#g-confirm-delete input[type=submit]").gallery_show_loading();
+ }
+);

0 comments on commit 8927278

Please sign in to comment.