Skip to content
Snippets Groups Projects
Commit d89fcb14 authored by Juan Fuentes's avatar Juan Fuentes
Browse files

SSDM-7809 : Returning error messages from failed deletions and restorations

parent eb8af1d1
No related branches found
No related tags found
No related merge requests found
......@@ -21,15 +21,23 @@ function TrashManagerController(mainController) {
this.revertDeletions = function(deletionIds) {
mainController.serverFacade.revertDeletions(deletionIds, function(data) {
Util.showSuccess("Deletions Reverted.", function() {});
mainController.changeView('showTrashcanPage', null);
if(data.error) {
Util.showError(data.error.message, null, true, true, false, true);
} else {
Util.showSuccess("Deletions Reverted.", function() {});
mainController.changeView('showTrashcanPage', null);
}
});
}
this.deletePermanently = function(deletionIds) {
mainController.serverFacade.deletePermanently(deletionIds, function(data) {
Util.showSuccess("Permanently Deleted.");
mainController.changeView('showTrashcanPage', null);
if(data.error) {
Util.showError(data.error.message, null, true, true, false, true);
} else {
Util.showSuccess("Permanently Deleted.");
mainController.changeView('showTrashcanPage', null);
}
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment