Merge branch 'master' into wip_leon_T7456_New_Customer_Portal_100_Report
[roojs1] / roojs-bootstrap-debug.js
index 20066ee..97def3e 100644 (file)
@@ -9418,14 +9418,10 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             
             cfg.cn.push(this.renderBody());
             
-            if(this.footerShow){
+            if(this.footerShow || this.summaryFooterShow){
                 cfg.cn.push(this.renderFooter());
             }
 
-            if(!this.footerShow && this.summaryFooterShow) {
-                cfg.cn.push(this.renderSummaryFooter());
-            }
-
             // where does this come from?
             //cfg.cls+=  ' TableGrid';
         }
@@ -9985,30 +9981,6 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
         
         return footer;
     },
-
-    renderSummaryFooter : function()
-    {
-        var footer = {
-            tag: 'tfoot',
-            cn : []
-        };
-        
-        for(var i = 0, len = cm.getColumnCount(); i < len; i++){
-            
-            var c = {
-                tag: 'td',
-                cls : 'x-fcol-' + i,
-                style : '',
-                html: ''
-            };
-            
-            footer.cn.push(c)
-        }
-        
-        return footer;
-    },
-    
-    
     
     onLoad : function()
     {
@@ -10069,12 +10041,29 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
 
         if(!this.footerShow && this.summaryFooterShow) {
 
+            var tr = {
+                tag : 'tr',
+                cn : []
+            };
+
             for(var i = 0, len = cm.getColumnCount(); i < len; i++){
         
                 var value = cm.config[i].summaryFooter;
 
-                Roo.log('value [' + i + '] : ' + value);
+                var td = {
+                    tag: 'td',
+                    cls : ' x-fcol-' + i,
+                    style: '',
+                    html: cm.config[i].summaryFooter
+                };
+
+                tr.cn.push(td);
+                
             }
+            
+            tfoot.dom.innerHTML = '';
+
+            tfoot.createChild(tr);
         }
         
         Roo.each(this.el.select('tbody td', true).elements, function(e){
@@ -11323,7 +11312,13 @@ Roo.extend(Roo.form.Action.Submit, Roo.form.Action, {
         }
         var ret = false;
         try {
-            ret = Roo.decode(response.responseText);
+            var rt = response.responseText;
+            if (rt.match(/^\<!--\[CDATA\[/)) {
+                rt = rt.replace(/^\<!--\[CDATA\[/,'');
+                rt = rt.replace(/\]\]--\>$/,'');
+            }
+            
+            ret = Roo.decode(rt);
         } catch (e) {
             ret = {
                 success: false,