Roo/bootstrap/Table/TableBody.js
authorEdward <edward@roojs.com>
Wed, 30 Apr 2014 10:39:56 +0000 (18:39 +0800)
committerEdward <edward@roojs.com>
Wed, 30 Apr 2014 10:39:56 +0000 (18:39 +0800)
Roo/bootstrap/Table/TableBody.js

index 3089378..f364719 100644 (file)
@@ -1,6 +1,87 @@
-/* 
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/*
+ * - LGPL
+ *
+ * table body
+ * 
  */
 
+/**
+ * @class Roo.bootstrap.Table.TableBody
+ * @extends Roo.bootstrap.Component
+ * Bootstrap TableBody class
+ * @cfg {String} cls element class
+ * @cfg {String} tag element tag (thead|tbody|tfoot) default tbody
+ * @cfg {String} align Aligns the content inside the element
+ * @cfg {Number} charoff Sets the number of characters the content inside the element will be aligned from the character specified by the char attribute
+ * @cfg {String} valign Vertical aligns the content inside the <tbody> element
+ * 
+ * @constructor
+ * Create a new TableBody
+ * @param {Object} config The config object
+ */
+
+Roo.bootstrap.Table.TableBody = function(config){
+    Roo.bootstrap.Table.TableBody.superclass.constructor.call(this, config);
+};
+
+Roo.extend(Roo.bootstrap.Table.TableBody, Roo.bootstrap.Component,  {
+    
+    cls: false,
+    tag: false,
+    align: false,
+    charoff: false,
+    valign: false,
+    
+    getAutoCreate : function(){
+        var cfg = Roo.apply({}, Roo.bootstrap.Table.TableBody.superclass.getAutoCreate.call(this));
+       
+        cfg = {
+            tag: 'tbody'
+        }
+            
+        if (this.cls) {
+            cfg.cls=this.cls
+        }
+        if(this.tag){
+            cfg.tag = this.tag;
+        }
+       
+        if(this.align){
+            cfg.align = this.align;
+        }
+        if(this.charoff){
+            cfg.charoff = this.charoff;
+        }
+        if(this.valign){
+            cfg.valign = this.valign;
+        }
+        
+        return cfg;
+    }
+    
+    
+//    initEvents : function()
+//    {
+//        
+//        if(!this.store){
+//            return;
+//        }
+//        
+//        this.store = Roo.factory(this.store, Roo.data);
+//        this.store.on('load', this.onLoad, this);
+//        
+//        this.store.load();
+//        
+//    },
+//    
+//    onLoad: function () 
+//    {   
+//        this.fireEvent('load', this);
+//    }
+//    
+//   
+});
+
 
\ No newline at end of file