Roo/form/TextItem.js
[roojs1] / Roo / form / TextItem.js
1 /*
2  * Based on:
3  * Ext JS Library 1.1.1
4  * Copyright(c) 2006-2007, Ext JS, LLC.
5  *
6  * Originally Released Under LGPL - original licence link has changed is not relivant.
7  *
8  * Fork - LGPL
9  * <script type="text/javascript">
10  */
11  
12 /**
13  * @class Roo.form.TextItem
14  * @extends Roo.BoxComponent
15  * Base class for form fields that provides default event handling, sizing, value handling and other functionality.
16  * @constructor
17  * Creates a new TextItem
18  * @param {Object} config Configuration options
19  */
20 Roo.form.TextItem = function(config){
21     Roo.form.TextItem.superclass.constructor.call(this, config);
22 };
23
24 Roo.extend(Roo.form.TextItem, Roo.BoxComponent,  {
25     
26     /**
27      * @cfg {String} tag the tag for this item (default div)
28      */
29     tag : 'div',
30     /**
31      * @cfg {String} html the content for this item
32      */
33     html : '',
34     /**
35      * @cfg {String} cls the class for this item
36      */
37     cls : '',
38     
39     getAutoCreate : function()
40     {
41         var cfg = {
42             id: this.id,
43             tag: this.tag,
44             html: this.html
45         }
46         
47         if(this.cls) {
48             cfg.cls = this.cls;
49         }
50         
51         return cfg;
52     }
53     
54 });