Roo/bootstrap/TableCell.js
[roojs1] / Roo / bootstrap / TableCell.js
1 /*
2  * - LGPL
3  *
4  * table cell
5  * 
6  */
7
8 /**
9  * @class Roo.bootstrap.TableCell
10  * @extends Roo.bootstrap.Component
11  * Bootstrap TableCell class
12  * @cfg {String} html cell contain text
13  * @cfg {String} cls cell class
14  * @cfg {String} tag cell tag (td|th) default td
15  * 
16  * @constructor
17  * Create a new TableCell
18  * @param {Object} config The config object
19  */
20
21 Roo.bootstrap.TableCell = function(config){
22     Roo.bootstrap.TableCell.superclass.constructor.call(this, config);
23 };
24
25 Roo.extend(Roo.bootstrap.TableCell, Roo.bootstrap.Component,  {
26     
27     html: false,
28     cls: false,
29     tag: false,
30     
31     getAutoCreate : function(){
32         var cfg = Roo.apply({}, Roo.bootstrap.TableCell.superclass.getAutoCreate.call(this));
33         
34         cfg = {
35             tag: 'td'
36         }
37         
38         if(this.tag){
39             cfg.tag = this.tag;
40         }
41         
42         if (this.html) {
43             cfg.html=this.html
44         }
45         if (this.cls) {
46             cfg.cls=this.cls
47         }
48         
49         return cfg;
50     }
51    
52 });
53
54  
55
56