DataObjects/core.sql
[Pman.Core] / Pman.Download.js
index 6c42308..78999cd 100644 (file)
@@ -42,7 +42,7 @@ Pman.Download = function(cfg)
     }
     
     
-    if (cfg.newWindow) {
+    if (this.newWindow && this.method == 'GET') {
             // as ie seems buggy...
         window.open( cfg.url + '?' + Roo.urlEncode(cfg.params || {}), '_blank');
         return ; 
@@ -81,7 +81,7 @@ Pman.Download = function(cfg)
         tag: 'form',
         method : this.method,
         action : this.url,
-        target : this.csvFrame.id,
+        target : this.newWindow ? '_new' : this.csvFrame.id,
         enctype : 'multipart/form-data'
 
 
@@ -125,6 +125,10 @@ Roo.apply(Pman.Download.prototype, {
     
     limit : 9999,
     
+    newWindow : false,
+    
+    method : 'GET',
+    
     // private..
     createCsvFrame: function()
     {
@@ -254,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';
         
     }