Roo/bootstrap/Table.js
[roojs1] / Roo / bootstrap / Table.js
index c9e5a25..2c7dabd 100644 (file)
@@ -344,7 +344,11 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             if(this.footerShow){
                 cfg.cn.push(this.renderFooter());
             }
-            
+
+            if(!this.footerShow && this.summaryFooterShow) {
+                cfg.cn.push(this.renderSummaryFooter());
+            }
+
             // where does this come from?
             //cfg.cls+=  ' TableGrid';
         }
@@ -911,18 +915,13 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             tag: 'tfoot',
             cn : []
         };
-
-        var cm = this.cm;
         
         for(var i = 0, len = cm.getColumnCount(); i < len; i++){
             
-            var config = cm.config[i];
-            
             var c = {
                 tag: 'td',
                 cls : 'x-fcol-' + i,
                 style : '',
-                
                 html: ''
             };
             
@@ -974,16 +973,6 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
                 }
                 
             }, this);
-            if(!this.footerShow && this.summaryFooterShow) {
-                var cellObjects = [];
-    
-                var id = Roo.id();
-    
-                cellObjects.push({
-                    container : id,
-                    cfg : value 
-                })
-            }
         } else if (this.empty_results.length) {
             this.el.mask(this.empty_results, 'no-spinner');
         }
@@ -1000,6 +989,16 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
                 this.mainFoot.show();
             }
         }
+
+        if(!this.footerShow && this.summaryFooterShow) {
+
+            for(var i = 0, len = cm.getColumnCount(); i < len; i++){
+        
+                var value = cm.config[i].summaryFooter;
+
+                Roo.log('value [' + i + '] : ' + value);
+            }
+        }
         
         Roo.each(this.el.select('tbody td', true).elements, function(e){
             e.on('mouseover', _this.onMouseover, _this);