cloudStack 3.0 new UI - user page - implement Disable User action.

This commit is contained in:
Jessica Wang 2011-11-07 16:54:05 -08:00
parent 751685541c
commit 650acd6845
1 changed files with 44 additions and 1 deletions

View File

@ -807,7 +807,50 @@
args.complete();
}
}
}
},
disable: {
label: 'Disable user',
messages: {
confirm: function(args) {
return 'Are you sure you want to disable this user?';
},
success: function(args) {
return 'User is being disabled.';
},
notification: function(args) {
return 'Disabling user';
},
complete: function(args) {
return 'User has been disabled.';
}
},
action: function(args) {
$.ajax({
url: createURL("disableUser&id=" + args.context.users[0].id),
dataType: "json",
async: true,
success: function(json) {
var jid = json.disableuserresponse.jobid;
args.response.success(
{_custom:
{jobId: jid,
getUpdatedItem: function(json) {
return json.queryasyncjobresultresponse.jobresult.user;
},
getActionFilter: function() {
return userActionfilter;
}
}
}
);
}
});
},
notification: {
poll: pollAsyncJobResult
}
}
},
tabs: {