diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index 0d0daf1c757..917e3a5eb12 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -59,7 +59,6 @@ var pollAsyncJobResult = function(args) { else if (result.jobstatus == 2) { // Failed var msg = (result.jobresult.errortext == null)? "": result.jobresult.errortext; args.error({message: msg}); - cloudStack.dialog.notice({ message: msg }); } } }, diff --git a/ui/scripts/ui-custom/instanceWizard.js b/ui/scripts/ui-custom/instanceWizard.js index 672b8dcafab..bc6523e97a3 100644 --- a/ui/scripts/ui-custom/instanceWizard.js +++ b/ui/scripts/ui-custom/instanceWizard.js @@ -49,12 +49,12 @@ close(); }, - error: function(args) { + error: function(message) { $wizard.remove(); $('div.overlay').remove(); - if (args.message) { - //cloudStack.dialog.notice({ message: args.message }); + if (message) { + cloudStack.dialog.notice({ message: message }); } } } diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js index 5a39cc28613..82695ef8244 100644 --- a/ui/scripts/ui-custom/zoneWizard.js +++ b/ui/scripts/ui-custom/zoneWizard.js @@ -37,12 +37,12 @@ close(); }, - error: function(args) { + error: function(message) { $wizard.remove(); $('div.overlay').remove(); - if (args.message) { - //cloudStack.dialog.notice({ message: args.message }); + if (message) { + cloudStack.dialog.notice({ message: message }); } } } diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js index 6d0e7a7b8ba..dcd1a3392fc 100644 --- a/ui/scripts/ui/widgets/listView.js +++ b/ui/scripts/ui/widgets/listView.js @@ -220,9 +220,9 @@ } ); }, - error: function(data){ - // if (data.message) - // cloudStack.dialog.notice({ message: data.message }); + error: function(message){ + if (message) + cloudStack.dialog.notice({ message: message }); } } }; @@ -372,9 +372,9 @@ if (options.success) options.success(args); }, - error: function(args) { - if (args.message) { - //cloudStack.dialog.notice({ message: args.message }); + error: function(message) { + if (message) { + cloudStack.dialog.notice({ message: message }); $edit.hide(), $label.html(oldVal).fadeIn(); $instanceRow.closest('div.data-table').dataTable('refresh'); diff --git a/ui/scripts/ui/widgets/notifications.js b/ui/scripts/ui/widgets/notifications.js index 9e3510a8457..08b5dc48aba 100644 --- a/ui/scripts/ui/widgets/notifications.js +++ b/ui/scripts/ui/widgets/notifications.js @@ -1,4 +1,4 @@ -(function($) { +(function($, cloudStack) { /** * Notification handling */ @@ -89,7 +89,7 @@ incomplete: function(args) {}, error: function(args) { if (args.message) { - //cloudStack.dialog.notice({ message: args.message }); + cloudStack.dialog.notice({ message: args.message }); } clearInterval(pollTimer); @@ -287,4 +287,4 @@ if ($popup.size()) notifications.popup.reposition($popup, $popup.data('notifications-attach-to')); }); -})(window.jQuery); +})(window.jQuery, cloudStack);