fixes Bug 662405 - Deleting add-ons/libs from user dashboard should show a spinner until deletion succeeds

This commit is contained in:
Sean McArthur 2011-06-23 14:06:28 -07:00
Родитель ca19416dff
Коммит 4e2f9fff9e
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -89,6 +89,7 @@
var browser_delete_item = function(el) {
el.addEvent('click', function(e){
if (e) e.stop();
var itemEl = this.getParent('.UI_Item');
fd.showQuestion({
title: "Deleting Package with all revisions",
message: "Are you sure you want to delete this Package ?"
@ -105,8 +106,10 @@
callback: function(e2) {
new Request.JSON({
url: this.get('href'),
useSpinner: true,
spinnerTarget: itemEl,
onSuccess: function(response) {
el.getParent('li.UI_Item').destroy();
itemEl.destroy();
fd.message.alert(
response.message_title, response.message
);