Pman.Download.js
[Pman.Core] / Pman.Download.js
index 4855d5b..b70533f 100644 (file)
@@ -34,7 +34,7 @@ Pman.Download = function(cfg)
     this.params = {};
     
     Roo.apply(this, cfg);
-    
+     
     if (this.grid) {
         
         this.buildFromGrid();
@@ -42,7 +42,7 @@ Pman.Download = function(cfg)
     }
     
     
-    if (cfg.newWindow) {
+    if (cfg.newWindow && this.method == 'GET') {
             // as ie seems buggy...
         window.open( cfg.url + '?' + Roo.urlEncode(cfg.params || {}), '_blank');
         return ; 
@@ -125,10 +125,13 @@ Roo.apply(Pman.Download.prototype, {
     
     limit : 9999,
     
+    newWindow : false,
+    
+    method : 'GET',
+    
     // private..
     createCsvFrame: function()
     {
-        
         if (this.csvFrame) {
             document.body.removeChild(this.csvFrame);
         }
@@ -255,6 +258,9 @@ Roo.apply(Pman.Download.prototype, {
         }
         this.params.limit = this.limit;
         
+        // do it as a post, as args can get long..
+        this.params._get = 1;
+        this.method = 'POST';
         
     }