]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * @deprecated 5.0\r | |
3 | * Provides a convenient wrapper for TextFields that adds a clickable trigger button.\r | |
4 | * (looks like a combobox by default).\r | |
5 | *\r | |
6 | * As of Ext JS 5.0 this class has been deprecated. It is recommended to use a\r | |
7 | * {@link Ext.form.field.Text Text Field} with the {@link Ext.form.field.Text#triggers\r | |
8 | * triggers} config instead. This class is provided for compatibility reasons but is\r | |
9 | * not used internally by the framework.\r | |
10 | */\r | |
11 | Ext.define('Ext.form.field.Trigger', {\r | |
12 | extend:'Ext.form.field.Text',\r | |
13 | alias: ['widget.triggerfield', 'widget.trigger'],\r | |
14 | requires: ['Ext.dom.Helper', 'Ext.util.ClickRepeater'],\r | |
15 | alternateClassName: ['Ext.form.TriggerField', 'Ext.form.TwinTriggerField', 'Ext.form.Trigger'],\r | |
16 | \r | |
17 | /**\r | |
18 | * @cfg {String} triggerCls\r | |
19 | * An additional CSS class used to style the trigger button. The trigger will always get the {@link Ext.form.trigger.Trigger#baseCls}\r | |
20 | * by default and triggerCls will be **appended** if specified.\r | |
21 | */\r | |
22 | triggerCls: Ext.baseCSSPrefix + 'form-arrow-trigger',\r | |
23 | \r | |
24 | inheritableStatics: {\r | |
25 | /**\r | |
26 | * @private\r | |
27 | * @static\r | |
28 | * @inheritable\r | |
29 | */\r | |
30 | warnDeprecated: function() {\r | |
31 | //<debug>\r | |
32 | // TODO: can we make this warning depend on compat level?\r | |
33 | Ext.log.warn('Ext.form.field.Trigger is deprecated. Use Ext.form.field.Text instead.');\r | |
34 | //</debug>\r | |
35 | }\r | |
36 | },\r | |
37 | \r | |
38 | onClassExtended: function() {\r | |
39 | this.warnDeprecated();\r | |
40 | },\r | |
41 | \r | |
42 | constructor: function(config) {\r | |
43 | this.self.warnDeprecated();\r | |
44 | this.callParent([config]);\r | |
45 | }\r | |
46 | });\r |