X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..05ce1c11e98b33f14ddee184493bd5a60dc947e2:/docs/source/ValidationStatus.html diff --git a/docs/source/ValidationStatus.html b/docs/source/ValidationStatus.html index 160a44e5..f5e9bfb5 100644 --- a/docs/source/ValidationStatus.html +++ b/docs/source/ValidationStatus.html @@ -1,19 +1,11 @@ - - - The source code - - - - -
/*
- * Ext JS Library 2.2
- * Copyright(c) 2006-2008, Ext JS, LLC.
- * licensing@extjs.com
- * 
- * http://extjs.com/license
- */
-
-
/** + + + The source code + + + + +
/** * @class Ext.ux.ValidationStatus * A {@link Ext.StatusBar} plugin that provides automatic error notification when the * associated form contains validation errors. @@ -23,17 +15,42 @@ * @param {Object} config A config object */ Ext.ux.ValidationStatus = Ext.extend(Ext.Component, { - +
/** + * @cfg {String} errorIconCls + * The {@link #iconCls} value to be applied to the status message when there is a + * validation error. Defaults to 'x-status-error'. + */ errorIconCls : 'x-status-error', - +
/** + * @cfg {String} errorListCls + * The css class to be used for the error list when there are validation errors. + * Defaults to 'x-status-error-list'. + */ errorListCls : 'x-status-error-list', - +
/** + * @cfg {String} validIconCls + * The {@link #iconCls} value to be applied to the status message when the form + * validates. Defaults to 'x-status-valid'. + */ validIconCls : 'x-status-valid', +
/** + * @cfg {String} showText + * The {@link #text} value to be applied when there is a form validation error. + * Defaults to 'The form has errors (click for details...)'. + */ showText : 'The form has errors (click for details...)', - +
/** + * @cfg {String} showText + * The {@link #text} value to display when the error list is displayed. + * Defaults to 'Click again to hide the error list'. + */ hideText : 'Click again to hide the error list', - +
/** + * @cfg {String} submitText + * The {@link #text} value to be applied when the form is being submitted. + * Defaults to 'Saving...'. + */ submitText : 'Saving...', // private @@ -56,15 +73,25 @@ Ext.ux.ValidationStatus = Ext.extend(Ext.Component, { }, this); var startMonitor = function(){ this.monitor = true; - } + }; this.form.on('actioncomplete', startMonitor, this); this.form.on('actionfailed', startMonitor, this); } - }, this, {single:true}); - sb.on('afterlayout', function(){ - // Grab the statusEl after the first layout. - sb.statusEl.getEl().on('click', this.onStatusClick, this, {buffer:200}); - }, this, {single: true}); + }, this, {single:true}); + sb.on({ + scope: this, + afterlayout:{ + single: true, + fn: function(){ + // Grab the statusEl after the first layout. + sb.statusEl.getEl().on('click', this.onStatusClick, this, {buffer:200}); + } + }, + beforedestroy:{ + single: true, + fn: this.onDestroy + } + }); }, // private @@ -144,7 +171,7 @@ Ext.ux.ValidationStatus = Ext.extend(Ext.Component, { // private showErrors : function(){ this.updateErrorList(); - this.getMsgEl().alignTo(this.statusBar.getEl(), this.listAlign).slideIn('b', {duration:.3, easing:'easeOut'}); + this.getMsgEl().alignTo(this.statusBar.getEl(), this.listAlign).slideIn('b', {duration:0.3, easing:'easeOut'}); this.statusBar.setText(this.hideText); this.form.getEl().on('click', this.hideErrors, this, {single:true}); // hide if the user clicks directly into the form }, @@ -153,7 +180,7 @@ Ext.ux.ValidationStatus = Ext.extend(Ext.Component, { hideErrors : function(){ var el = this.getMsgEl(); if(el.isVisible()){ - el.slideOut('b', {duration:.2, easing:'easeIn'}); + el.slideOut('b', {duration:0.2, easing:'easeIn'}); this.statusBar.setText(this.showText); } this.form.getEl().un('click', this.hideErrors, this); @@ -167,6 +194,6 @@ Ext.ux.ValidationStatus = Ext.extend(Ext.Component, { this.showErrors(); } } -});
- +});
+ \ No newline at end of file