Roo/bootstrap/TableBody.js
[roojs1] / Roo / bootstrap / TableBody.js
1 /*
2  * - LGPL
3  *
4  * table body
5  * 
6  */
7
8 /**
9  * @class Roo.bootstrap.TableBody
10  * @extends Roo.bootstrap.Component
11  * Bootstrap TableBody class
12  * @cfg {String} cls element class
13  * @cfg {String} tag element tag (thead|tbody|tfoot) default tbody
14  * @cfg {String} align Aligns the content inside the element
15  * @cfg {String} char Aligns the content inside the element to a character
16  * @cfg {Number} charoff Sets the number of characters the content inside the element will be aligned from the character specified by the char attribute
17  * @cfg {String} valign Vertical aligns the content inside the <tbody> element
18  * 
19  * @constructor
20  * Create a new TableBody
21  * @param {Object} config The config object
22  */
23
24 Roo.bootstrap.TableBody = function(config){
25     Roo.bootstrap.TableBody.superclass.constructor.call(this, config);
26 };
27
28 Roo.extend(Roo.bootstrap.TableBody, Roo.bootstrap.Component,  {
29     
30     cls: false,
31     tag: false,
32     align: false,
33     char: false,
34     charoff: false,
35     valign: false,
36     
37     getAutoCreate : function(){
38         var cfg = Roo.apply({}, Roo.bootstrap.TableBody.superclass.getAutoCreate.call(this));
39         
40         cfg = {
41             tag: 'tbody'
42         }
43         
44         if (this.cls) {
45             cfg.cls=this.cls
46         }
47         if(this.tag){
48             cfg.tag = this.tag;
49         }
50         
51         if(this.align){
52             cfg.align = this.align;
53         }
54         if(this.char){
55             cfg.char = this.char;
56         }
57         if(this.charoff){
58             cfg.charoff = this.charoff;
59         }
60         if(this.valign){
61             cfg.valign = this.valign;
62         }
63         
64         return cfg;
65     }
66    
67 });
68
69  
70
71