Fix #6685 - more changes as per inspection master xls
[Pman.Core] / Pman.Download.js
index 2f16b24..4483120 100644 (file)
@@ -26,7 +26,7 @@ var t = new Pman.Download({
  
  * @cfg {String} csvCols  - use '*' to override grid coluns
  * @cfg {String} csvTitles - use '*' to override grid coluns
-
+ * @cfg {String} hiddenCols - default 'show'  (use 'hide' to not display them on download)
  
  
 * @cfg {Function} success (optional) MAY fire on download completed (fails on attachments)..
@@ -163,7 +163,7 @@ Pman.Download = function(cfg)
         }
         
     }
-    
+    Roo.MessageBox.alert("Downloading", "The file should download shortly");
     req.send(this.form);
     /*
     (function() {
@@ -196,6 +196,9 @@ Roo.apply(Pman.Download.prototype, {
     success : false,
     failure : false,
     
+    hiddenCols : 'show', // set to 'hide' to hide them..
+    
+    
     // private..
     //used by simple GET method.
     createCsvFrame: function()
@@ -328,6 +331,11 @@ Roo.apply(Pman.Download.prototype, {
         } else {
             
             Roo.each(this.grid.cm.config, function(c,i) {
+                
+                if (t.hiddenCols != 'show' && t.grid.cm.isHidden(i)) {
+                    return;
+                }
+                
                 t.params['csvCols['+i+']'] = c.dataIndex;
                 t.params['csvTitles['+i+']'] = c.header;