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  * @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     
44     getAutoCreate : function(){
45         var cfg = Roo.apply({}, Roo.bootstrap.TableCell.superclass.getAutoCreate.call(this));
46         
47         cfg = {
48             tag: 'td'
49         }
50         
51         if(this.tag){
52             cfg.tag = this.tag;
53         }
54         
55         if (this.html) {
56             cfg.html=this.html
57         }
58         if (this.cls) {
59             cfg.cls=this.cls
60         }
61         
62         return cfg;
63     }
64    
65 });
66
67  
68
69