aa9df22a0a293b0c80cae1ef7b638dd642275a7a
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Resources / Public / JavaScript / Wizard / Elements / Basic / Hidden.js
1 Ext.namespace('TYPO3.Form.Wizard.Elements.Basic');
2
3 /**
4 * The HIDDEN element
5 *
6 * @class TYPO3.Form.Wizard.Elements.Basic.Hidden
7 * @extends TYPO3.Form.Wizard.Elements
8 */
9 TYPO3.Form.Wizard.Elements.Basic.Hidden = Ext.extend(TYPO3.Form.Wizard.Elements, {
10 /**
11 * @cfg {String} elementClass
12 * An extra CSS class that will be added to this component's Element
13 */
14 elementClass: 'hidden',
15
16 /**
17 * @cfg {Mixed} tpl
18 * An Ext.Template, Ext.XTemplate or an array of strings to form an
19 * Ext.XTemplate. Used in conjunction with the data and tplWriteMode
20 * configurations.
21 */
22 tpl: new Ext.XTemplate(
23 '<div class="overflow-hidden">',
24 '<input {[this.getAttributes(values.attributes)]} />',
25 '</div>',
26 {
27 compiled: true,
28 getAttributes: function(attributes) {
29 var attributesHtml = '';
30 Ext.iterate(attributes, function(key, value) {
31 if (value) {
32 attributesHtml += key + '="' + value + '" ';
33 }
34 }, this);
35 return attributesHtml;
36 }
37 }
38 ),
39
40 /**
41 * Constructor
42 *
43 * Add the configuration object to this component
44 * @param config
45 */
46 constructor: function(config) {
47 Ext.apply(this, {
48 configuration: {
49 attributes: {
50 'accesskey': '',
51 'class': '',
52 'contenteditable': '',
53 'contextmenu': '',
54 'dir': '',
55 'draggable': '',
56 'dropzone': '',
57 'hidden': '',
58 'id': '',
59 'lang': '',
60 'spellcheck': '',
61 'style': '',
62 'tabindex': '',
63 'title': '',
64 'translate': '',
65
66 'name': '',
67 'type': 'hidden',
68 'value': ''
69 },
70 filters: {},
71 validation: {}
72 }
73 });
74 TYPO3.Form.Wizard.Elements.Basic.Hidden.superclass.constructor.apply(this, arguments);
75 }
76 });
77
78 Ext.reg('typo3-form-wizard-elements-basic-hidden', TYPO3.Form.Wizard.Elements.Basic.Hidden);