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.tag){
45             cfg.tag = this.tag;
46         }
47         
48         if (this.html) {
49             cfg.html=this.html
50         }
51         if (this.cls) {
52             cfg.cls=this.cls
53         }
54         
55         return cfg;
56     }
57    
58 });
59
60  
61
62