major doc changes
[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  * @children Roo.bootstrap.Component
12  * @parent Roo.bootstrap.TableRow
13  * Bootstrap TableCell class
14  * 
15  * @cfg {String} html cell contain text
16  * @cfg {String} cls cell class
17  * @cfg {String} tag cell tag (td|th) default td
18  * @cfg {String} abbr Specifies an abbreviated version of the content in a cell
19  * @cfg {String} align Aligns the content in a cell
20  * @cfg {String} axis Categorizes cells
21  * @cfg {String} bgcolor Specifies the background color of a cell
22  * @cfg {Number} charoff Sets the number of characters the content will be aligned from the character specified by the char attribute
23  * @cfg {Number} colspan Specifies the number of columns a cell should span
24  * @cfg {String} headers Specifies one or more header cells a cell is related to
25  * @cfg {Number} height Sets the height of a cell
26  * @cfg {String} nowrap Specifies that the content inside a cell should not wrap
27  * @cfg {Number} rowspan Sets the number of rows a cell should span
28  * @cfg {String} scope Defines a way to associate header cells and data cells in a table
29  * @cfg {String} valign Vertical aligns the content in a cell
30  * @cfg {Number} width Specifies the width of a cell
31  * 
32  * @constructor
33  * Create a new TableCell
34  * @param {Object} config The config object
35  */
36
37 Roo.bootstrap.TableCell = function(config){
38     Roo.bootstrap.TableCell.superclass.constructor.call(this, config);
39 };
40
41 Roo.extend(Roo.bootstrap.TableCell, Roo.bootstrap.Component,  {
42     
43     html: false,
44     cls: false,
45     tag: false,
46     abbr: false,
47     align: false,
48     axis: false,
49     bgcolor: false,
50     charoff: false,
51     colspan: false,
52     headers: false,
53     height: false,
54     nowrap: false,
55     rowspan: false,
56     scope: false,
57     valign: false,
58     width: false,
59     
60     
61     getAutoCreate : function(){
62         var cfg = Roo.apply({}, Roo.bootstrap.TableCell.superclass.getAutoCreate.call(this));
63         
64         cfg = {
65             tag: 'td'
66         };
67         
68         if(this.tag){
69             cfg.tag = this.tag;
70         }
71         
72         if (this.html) {
73             cfg.html=this.html
74         }
75         if (this.cls) {
76             cfg.cls=this.cls
77         }
78         if (this.abbr) {
79             cfg.abbr=this.abbr
80         }
81         if (this.align) {
82             cfg.align=this.align
83         }
84         if (this.axis) {
85             cfg.axis=this.axis
86         }
87         if (this.bgcolor) {
88             cfg.bgcolor=this.bgcolor
89         }
90         if (this.charoff) {
91             cfg.charoff=this.charoff
92         }
93         if (this.colspan) {
94             cfg.colspan=this.colspan
95         }
96         if (this.headers) {
97             cfg.headers=this.headers
98         }
99         if (this.height) {
100             cfg.height=this.height
101         }
102         if (this.nowrap) {
103             cfg.nowrap=this.nowrap
104         }
105         if (this.rowspan) {
106             cfg.rowspan=this.rowspan
107         }
108         if (this.scope) {
109             cfg.scope=this.scope
110         }
111         if (this.valign) {
112             cfg.valign=this.valign
113         }
114         if (this.width) {
115             cfg.width=this.width
116         }
117         
118         
119         return cfg;
120     }
121    
122 });
123
124  
125
126