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