X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..92c2b89db26be16707f4a805d3303ab2531006e1:/docs/source/Field.html diff --git a/docs/source/Field.html b/docs/source/Field.html index d56a3c92..874066c2 100644 --- a/docs/source/Field.html +++ b/docs/source/Field.html @@ -88,7 +88,7 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, { */ fieldClass : 'x-form-field',
/** - * @cfg {String} msgTargetThe location where the message text set through {@link #markInvalid} should display. + * @cfg {String} msgTarget
The location where the message text set through {@link #markInvalid} should display. * Must be one of the following values:
*qtip
Display a quick tip containing the message when the user hovers over the field. This is the default.
@@ -291,7 +291,7 @@ var form = new Ext.form.FormPanel({
}
return String(this.getValue()) !== String(this.originalValue);
},
-
+
/**
* Sets the read only state of this field.
* @param {Boolean} readOnly Whether the field should be read only.
@@ -432,13 +432,13 @@ var form = new Ext.form.FormPanel({
validateValue : function(value){
return true;
},
-
+
/**
* Gets the active error message for this field.
* @return {String} Returns the active error message on the field, if there is no error, an empty string is returned.
*/
getActiveError : function(){
- return this.activeError || '';
+ return this.activeError || '';
},
/**
@@ -505,7 +505,12 @@ var form = new Ext.form.FormPanel({
this.el.findParent('.x-form-field-wrap', 5, true); // else direct field wrap
},
- // private
+ // Alignment for 'under' target
+ alignErrorEl : function(){
+ this.errorEl.setWidth(this.getErrorCt().getWidth(true) - 20);
+ },
+
+ // Alignment for 'side' target
alignErrorIcon : function(){
this.errorIcon.alignTo(this.el, 'tl-tr', [2, 0]);
},
@@ -612,8 +617,12 @@ Ext.form.MessageTargets = {
return;
}
field.errorEl = elp.createChild({cls:'x-form-invalid-msg'});
- field.errorEl.setWidth(elp.getWidth(true)-20);
+ field.on('resize', field.alignErrorEl, field);
+ field.on('destroy', function(){
+ Ext.destroy(this.errorEl);
+ }, field);
}
+ field.alignErrorEl();
field.errorEl.update(msg);
Ext.form.Field.msgFx[field.msgFx].show(field.errorEl, field);
},
@@ -636,19 +645,21 @@ Ext.form.MessageTargets = {
return;
}
field.errorIcon = elp.createChild({cls:'x-form-invalid-icon'});
+ field.on('resize', field.alignErrorIcon, field);
+ field.on('destroy', function(){
+ Ext.destroy(this.errorIcon);
+ }, field);
}
field.alignErrorIcon();
field.errorIcon.dom.qtip = msg;
field.errorIcon.dom.qclass = 'x-form-invalid-tip';
field.errorIcon.show();
- field.on('resize', field.alignErrorIcon, field);
},
clear: function(field){
field.el.removeClass(field.invalidClass);
if(field.errorIcon){
field.errorIcon.dom.qtip = '';
field.errorIcon.hide();
- field.un('resize', field.alignErrorIcon, field);
}else{
field.el.dom.title = '';
}