diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.config.js b/scm-webapp/src/main/webapp/resources/js/sonia.config.js index 3295a85bd3..bcedd40277 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.config.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.config.js @@ -139,7 +139,12 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{ failure: function(){ el.unmask(); clearTimeout(tid); - alert('failure'); + Ext.MessageBox.show({ + title: 'Error', + msg: 'Could not load config.', + buttons: Ext.MessageBox.OK, + icon:Ext.MessageBox.ERROR + }); } }); } diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.plugin.js b/scm-webapp/src/main/webapp/resources/js/sonia.plugin.js index c6a60bb73d..fa6b908fc5 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.plugin.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.plugin.js @@ -90,8 +90,13 @@ Sonia.plugin.installPlugin = function(pluginId){ if ( debug ){ console.debug('plugin installation failed'); } - alert( 'failure' ); loadingBox.hide(); + Ext.MessageBox.show({ + title: 'Error', + msg: 'Plugin installation failed', + buttons: Ext.MessageBox.OK, + icon:Ext.MessageBox.ERROR + }); } }); } @@ -127,8 +132,13 @@ Sonia.plugin.uninstallPlugin = function(pluginId){ if ( debug ){ console.debug('plugin uninstallation failed'); } - alert( 'failure' ); loadingBox.hide(); + Ext.MessageBox.show({ + title: 'Error', + msg: 'Plugin uninstallation failed', + buttons: Ext.MessageBox.OK, + icon:Ext.MessageBox.ERROR + }); } }); } @@ -162,10 +172,15 @@ Sonia.plugin.updatePlugin = function(pluginId){ }, failure: function(){ if ( debug ){ - console.debug('plugin updated failed'); + console.debug('plugin update failed'); } - alert( 'failure' ); loadingBox.hide(); + Ext.MessageBox.show({ + title: 'Error', + msg: 'Plugin update failed', + buttons: Ext.MessageBox.OK, + icon:Ext.MessageBox.ERROR + }); } }); } diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.repository.js b/scm-webapp/src/main/webapp/resources/js/sonia.repository.js index bedd122b73..a92abe6a17 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.repository.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.repository.js @@ -357,7 +357,12 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{ failure: function(){ clearTimeout(tid); el.unmask(); - alert( 'failure' ); + Ext.MessageBox.show({ + title: 'Error', + msg: 'Repository update failed', + buttons: Ext.MessageBox.OK, + icon:Ext.MessageBox.ERROR + }); } }); }, @@ -390,7 +395,12 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{ failure: function(){ clearTimeout(tid); el.unmask(); - alert( 'failure' ); + Ext.MessageBox.show({ + title: 'Error', + msg: 'Repository creation failed', + buttons: Ext.MessageBox.OK, + icon:Ext.MessageBox.ERROR + }); } }); }, @@ -486,7 +496,12 @@ Sonia.repository.Panel = Ext.extend(Ext.Panel, { this.resetPanel(); }, failure: function(){ - alert( 'failure' ); + Ext.MessageBox.show({ + title: 'Error', + msg: 'Repository deletion failed', + buttons: Ext.MessageBox.OK, + icon:Ext.MessageBox.ERROR + }); } }); } diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.rest.js b/scm-webapp/src/main/webapp/resources/js/sonia.rest.js index fa5adf7fe8..6b90d9f96a 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.rest.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.rest.js @@ -47,7 +47,12 @@ Sonia.rest.JsonStore = Ext.extend( Ext.data.JsonStore, { } this.removeAll(); } else { - alert( action + "(" + status + "): " + response.responseText ); + Ext.MessageBox.show({ + title: 'Error', + msg: 'Could not load items. Server returned status: ' + status, + buttons: Ext.MessageBox.OK, + icon:Ext.MessageBox.ERROR + }); } }, scope: this diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.user.js b/scm-webapp/src/main/webapp/resources/js/sonia.user.js index cd0d23dcc8..b32aefdeb7 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.user.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.user.js @@ -207,7 +207,12 @@ Sonia.user.FormPanel = Ext.extend(Sonia.rest.FormPanel,{ this.execCallback(this.onUpdate, item); }, failure: function(){ - alert( 'failure' ); + Ext.MessageBox.show({ + title: 'Error', + msg: 'User update failed', + buttons: Ext.MessageBox.OK, + icon:Ext.MessageBox.ERROR + }); } }); @@ -233,7 +238,12 @@ Sonia.user.FormPanel = Ext.extend(Sonia.rest.FormPanel,{ this.execCallback(this.onCreate, user); }, failure: function(){ - alert( 'failure' ); + Ext.MessageBox.show({ + title: 'Error', + msg: 'User creation failed', + buttons: Ext.MessageBox.OK, + icon:Ext.MessageBox.ERROR + }); } }); }, @@ -343,7 +353,12 @@ Sonia.user.Panel = Ext.extend(Ext.Panel, { this.resetPanel(); }, failure: function(){ - alert( 'failure' ); + Ext.MessageBox.show({ + title: 'Error', + msg: 'User deletion failed', + buttons: Ext.MessageBox.OK, + icon:Ext.MessageBox.ERROR + }); } }); }