Delete User action - fix a bug that loading image didn't disappear after action was finished.

This commit is contained in:
Jessica Wang 2012-03-02 11:53:03 -08:00
parent d1e2b2fcb6
commit be9ca30ffb
2 changed files with 8 additions and 11 deletions

View File

@ -886,7 +886,7 @@
}
},
'delete': {
remove: {
label: 'label.action.delete.user',
messages: {
confirm: function(args) {
@ -901,7 +901,9 @@
url: createURL("deleteUser&id=" + args.context.users[0].id),
dataType: "json",
async: true,
success: function(json) {}
success: function(json) {
args.response.success();
}
});
},
notification: {
@ -971,8 +973,7 @@
$.ajax({
url: createURL('listUsers'),
data: {
id: args.context.users[0].id,
listAll: true
id: args.context.users[0].id
},
success: function(json) {
args.response.success({
@ -1029,7 +1030,7 @@
allowedActions.push("disable");
if(jsonObj.state == "disabled")
allowedActions.push("enable");
allowedActions.push("delete");
allowedActions.push("remove");
}
}
return allowedActions;

View File

@ -808,11 +808,7 @@
},
notification: {
poll: function(args) {
args.complete({
data: {
state: 'Destroyed'
}
});
args.complete();
}
}
}
@ -1117,7 +1113,7 @@
},
notification: {
poll: function(args) {
args.complete({ data: { state: 'Destroyed' } });
args.complete();
}
}
}