From fbe74c8cd02f22642db881d5a9596718baac7c61 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Sun, 19 Sep 2010 15:35:14 +0200 Subject: [PATCH] added reset button --- .../src/main/webapp/resources/js/sonia.config.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) 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 818a07eead..7c7c62f143 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.config.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.config.js @@ -35,7 +35,6 @@ Sonia.config.ConfigForm = Ext.extend(Ext.form.FormPanel, { items: null, onSubmit: null, getValues: null, - onCancel: null, initComponent: function(){ @@ -68,9 +67,11 @@ Sonia.config.ConfigForm = Ext.extend(Ext.form.FormPanel, { scope: this, handler: this.submitForm },{ - text: 'Cancel', + text: 'Reset', scope: this, - handler: this.cancel + handler: function(){ + this.getForm().reset(); + } }] }] }; @@ -92,13 +93,6 @@ Sonia.config.ConfigForm = Ext.extend(Ext.form.FormPanel, { if ( this.onSubmit != null && Ext.isFunction( this.onSubmit ) ){ this.onSubmit( form.getValues() ); } - }, - - cancel: function(){ - var form = this.getForm(); - if ( this.onCancel != null && Ext.isFunction( this.onCancel ) ){ - this.onCancel(form); - } } });