Skip to content

Commit

Permalink
Add a loading indicator to the delete form by tagging some JS on at
Browse files Browse the repository at this point in the history
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
bharat committed Jun 20, 2010
1 parent 9b4d9d1 commit 8927278
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/gallery/helpers/item.php
Expand Up @@ -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;
}

Expand Down
5 changes: 5 additions & 0 deletions 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();
}
);

0 comments on commit 8927278

Please sign in to comment.