X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..3789b528d8dd8aad4558e38e22d775bcab1cbd36:/docs/source/Text.html diff --git a/docs/source/Text.html b/docs/source/Text.html index 2e347577..11d29e2e 100644 --- a/docs/source/Text.html +++ b/docs/source/Text.html @@ -1,4 +1,21 @@ -
/**
+
+
+
+
+ The source code
+
+
+
+
+
+
+ /**
* @class Ext.form.field.Text
* @extends Ext.form.field.Base
@@ -68,42 +85,42 @@ Ext.define('Ext.form.field.Text', {
requires: ['Ext.form.field.VTypes', 'Ext.layout.component.field.Text'],
alternateClassName: ['Ext.form.TextField', 'Ext.form.Text'],
- /**
+ /**
* @cfg {String} vtypeText A custom error message to display in place of the default message provided
* for the <b><code>{@link #vtype}</code></b> currently set for this field (defaults to <tt>undefined</tt>).
* <b>Note</b>: only applies if <b><code>{@link #vtype}</code></b> is set, else ignored.
*/
- /**
+ /**
* @cfg {RegExp} stripCharsRe A JavaScript RegExp object used to strip unwanted content from the value
* before validation (defaults to <tt>undefined</tt>).
*/
- /**
+ /**
* @cfg {Number} size An initial value for the 'size' attribute on the text input element. This is only
* used if the field has no configured {@link #width} and is not given a width by its container's layout.
* Defaults to <tt>20</tt>.
*/
size: 20,
- /**
+ /**
* @cfg {Boolean} grow <tt>true</tt> if this field should automatically grow and shrink to its content
* (defaults to <tt>false</tt>)
*/
- /**
+ /**
* @cfg {Number} growMin The minimum width to allow when <code><b>{@link #grow}</b> = true</code> (defaults
* to <tt>30</tt>)
*/
growMin : 30,
- /**
+ /**
* @cfg {Number} growMax The maximum width to allow when <code><b>{@link #grow}</b> = true</code> (defaults
* to <tt>800</tt>)
*/
growMax : 800,
- /**
+ /**
* @cfg {String} growAppend
* A string that will be appended to the field's current value for the purposes of calculating the target
* field size. Only used when the {@link #grow} config is <tt>true</tt>. Defaults to a single capital "W"
@@ -112,32 +129,32 @@ Ext.define('Ext.form.field.Text', {
*/
growAppend: 'W',
- /**
+ /**
* @cfg {String} vtype A validation type name as defined in {@link Ext.form.field.VTypes} (defaults to <tt>undefined</tt>)
*/
- /**
+ /**
* @cfg {RegExp} maskRe An input mask regular expression that will be used to filter keystrokes that do
* not match (defaults to <tt>undefined</tt>)
*/
- /**
+ /**
* @cfg {Boolean} disableKeyFilter Specify <tt>true</tt> to disable input keystroke filtering (defaults
* to <tt>false</tt>)
*/
- /**
+ /**
* @cfg {Boolean} allowBlank Specify <tt>false</tt> to validate that the value's length is > 0 (defaults to
* <tt>true</tt>)
*/
allowBlank : true,
- /**
+ /**
* @cfg {Number} minLength Minimum input field length required (defaults to <tt>0</tt>)
*/
minLength : 0,
- /**
+ /**
* @cfg {Number} maxLength Maximum input field length allowed by validation (defaults to Number.MAX_VALUE).
* This behavior is intended to provide instant feedback to the user by improving usability to allow pasting
* and editing or overtyping and back tracking. To restrict the maximum number of characters that can be
@@ -145,34 +162,34 @@ Ext.define('Ext.form.field.Text', {
*/
maxLength : Number.MAX_VALUE,
- /**
+ /**
* @cfg {Boolean} enforceMaxLength True to set the maxLength property on the underlying input field. Defaults to <tt>false</tt>
*/
- /**
+ /**
* @cfg {String} minLengthText Error text to display if the <b><tt>{@link #minLength minimum length}</tt></b>
* validation fails (defaults to <tt>'The minimum length for this field is {minLength}'</tt>)
*/
minLengthText : 'The minimum length for this field is {0}',
- /**
+ /**
* @cfg {String} maxLengthText Error text to display if the <b><tt>{@link #maxLength maximum length}</tt></b>
* validation fails (defaults to <tt>'The maximum length for this field is {maxLength}'</tt>)
*/
maxLengthText : 'The maximum length for this field is {0}',
- /**
+ /**
* @cfg {Boolean} selectOnFocus <tt>true</tt> to automatically select any existing field text when the field
* receives input focus (defaults to <tt>false</tt>)
*/
- /**
+ /**
* @cfg {String} blankText The error text to display if the <b><tt>{@link #allowBlank}</tt></b> validation
* fails (defaults to <tt>'This field is required'</tt>)
*/
blankText : 'This field is required',
- /**
+ /**
* @cfg {Function} validator
* <p>A custom validation function to be called during field validation ({@link #getErrors})
* (defaults to <tt>undefined</tt>). If specified, this function will be called first, allowing the
@@ -191,19 +208,19 @@ Ext.define('Ext.form.field.Text', {
* </ul></div>
*/
- /**
+ /**
* @cfg {RegExp} regex A JavaScript RegExp object to be tested against the field value during validation
* (defaults to <tt>undefined</tt>). If the test fails, the field will be marked invalid using
* <b><tt>{@link #regexText}</tt></b>.
*/
- /**
+ /**
* @cfg {String} regexText The error text to display if <b><tt>{@link #regex}</tt></b> is used and the
* test fails during validation (defaults to <tt>''</tt>)
*/
regexText : '',
- /**
+ /**
* @cfg {String} emptyText
* <p>The default text to place into an empty field (defaults to <tt>undefined</tt>).</p>
* <p>Note that normally this value will be submitted to the server if this field is enabled; to prevent this
@@ -213,7 +230,7 @@ Ext.define('Ext.form.field.Text', {
* supported and should be avoided.</p>
*/
- /**
+ /**
* @cfg {String} emptyCls The CSS class to apply to an empty field to style the <b><tt>{@link #emptyText}</tt></b>
* (defaults to <tt>'x-form-empty-field'</tt>). This class is automatically added and removed as needed
* depending on the current field value.
@@ -222,7 +239,7 @@ Ext.define('Ext.form.field.Text', {
ariaRole: 'textbox',
- /**
+ /**
* @cfg {Boolean} enableKeyEvents <tt>true</tt> to enable the proxying of key events for the HTML input field (defaults to <tt>false</tt>)
*/
@@ -231,7 +248,7 @@ Ext.define('Ext.form.field.Text', {
initComponent : function(){
this.callParent();
this.addEvents(
- /**
+ /**
* @event autosize
* Fires when the <tt><b>{@link #autoSize}</b></tt> function is triggered and the field is
* resized according to the {@link #grow}/{@link #growMin}/{@link #growMax} configs as a result.
@@ -242,7 +259,7 @@ Ext.define('Ext.form.field.Text', {
*/
'autosize',
- /**
+ /**
* @event keydown
* Keydown input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
* is set to true.
@@ -250,7 +267,7 @@ Ext.define('Ext.form.field.Text', {
* @param {Ext.EventObject} e
*/
'keydown',
- /**
+ /**
* @event keyup
* Keyup input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
* is set to true.
@@ -258,7 +275,7 @@ Ext.define('Ext.form.field.Text', {
* @param {Ext.EventObject} e
*/
'keyup',
- /**
+ /**
* @event keypress
* Keypress input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
* is set to true.
@@ -292,14 +309,14 @@ Ext.define('Ext.form.field.Text', {
}
},
- /**
+ /**
* @private override - treat undefined and null values as equal to an empty string value
*/
isEqual: function(value1, value2) {
return String(Ext.value(value1, '')) === String(Ext.value(value2, ''));
},
- /**
+ /**
* @private
* If grow=true, invoke the autoSize method when the field's value is changed.
*/
@@ -325,7 +342,7 @@ Ext.define('Ext.form.field.Text', {
}
},
- /**
+ /**
* Performs any necessary manipulation of a raw String value to prepare it for {@link #stringToValue conversion}
* and/or {@link #validate validation}. For text fields this applies the configured {@link #stripCharsRe} to the
* raw value.
@@ -375,7 +392,7 @@ Ext.define('Ext.form.field.Text', {
this.fireEvent('keypress', this, e);
},
- /**
+ /**
* Resets the current field value to the originally-loaded value and clears any validation messages.
* Also adds <tt><b>{@link #emptyText}</b></tt> and <tt><b>{@link #emptyCls}</b></tt> if the
* original value was blank.
@@ -461,7 +478,7 @@ Ext.define('Ext.form.field.Text', {
}
},
- /**
+ /**
* Returns the raw String value of the field, without performing any normalization, conversion, or validation.
* Gets the current value of the input element if the field has been rendered, ignoring the value if it is the
* {@link #emptyText}. To get a normalized and converted value see {@link #getValue}.
@@ -476,7 +493,7 @@ Ext.define('Ext.form.field.Text', {
return v;
},
- /**
+ /**
* Sets a data value into the field and runs the change detection and validation. Also applies any configured
* {@link #emptyText} for text fields. To set the value directly without these inspections see {@link #setRawValue}.
* @param {Mixed} value The value to set
@@ -496,7 +513,7 @@ Ext.define('Ext.form.field.Text', {
return me;
},
- /**
+ /**
Validates a value according to the field's validation rules and returns an array of errors
for any failing validations. Validation rules are processed in the following order:
@@ -601,7 +618,7 @@ for any failing validations. Validation rules are processed in the following ord
return errors;
},
- /**
+ /**
* Selects text in this field
* @param {Number} start (optional) The index where the selection should start (defaults to 0)
* @param {Number} end (optional) The index where the selection should end (defaults to the text length)
@@ -633,7 +650,7 @@ for any failing validations. Validation rules are processed in the following ord
}
},
- /**
+ /**
* Automatically grows the field to accomodate the width of the text up to the maximum field width allowed.
* This only takes effect if <tt>{@link #grow} = true</tt>, and fires the {@link #autosize} event if the
* width changes.
@@ -656,7 +673,7 @@ for any failing validations. Validation rules are processed in the following ord
this.getActionEl().dom.setAttribute('aria-required', this.allowBlank === false);
},
- /**
+ /**
* @protected override
* To get the natural width of the inputEl, we do a simple calculation based on the
* 'size' config. We use hard-coded numbers to approximate what browsers do natively,
@@ -667,4 +684,6 @@ for any failing validations. Validation rules are processed in the following ord
}
});
-
\ No newline at end of file
+
+
+