070401119582ca4b38376434020d113211b9f1b1
[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         
76         return cfg;
77     }
78    
79 });
80
81  
82
83