From db5cbeae0410c3d73dbe1bde5262119b47432501 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Fri, 29 Apr 2011 14:42:20 +0200 Subject: [PATCH] improve error handling --- .../src/main/webapp/resources/js/sonia.config.js | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 35d6a368d6..73c838486e 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.config.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.config.js @@ -115,6 +115,8 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{ loadingText: 'Loading ...', errorTitleText: 'Error', errorMsgText: 'Could not load config.', + // TODO i18n + errorSubmitMsgText: 'Could not submit config.', // help servernameHelpText: 'The name of this server. This name will be part of the repository url.', @@ -233,6 +235,13 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{ }, failure: function(){ this.el.unmask(); + Ext.MessageBox.show({ + title: this.errorTitleText, + msg: this.errorMsgText, + scope: this, + buttons: Ext.MessageBox.OK, + icon:Ext.MessageBox.ERROR + }); } }); }, @@ -393,6 +402,7 @@ Sonia.config.SimpleConfigForm = Ext.extend(Sonia.config.ConfigForm,{ }, failure: function(){ this.el.unmask(); + Ext.Msg.alert( this.failedText ); } }); },