fix #8131 - chinese translations
[Pman.Core] / Pman.Download.js
index 4483120..f4584d2 100644 (file)
@@ -18,12 +18,13 @@ var t = new Pman.Download({
 * 
 * @constructor
 * @param {Object} cfg   Configuration object.
+* @cfg {Object}  params  params to send
 * @cfg {String} url     Location to download from.
-* @cfg {String} method     GET or POST (default GET), POST will create a form, and post that into the hidden frame.
+* @cfg {String} method (GET|POST)    GET or POST (default GET), POST will create a form, and post that into the hidden frame.
 * @cfg {Boolean} newWindow (optional) download to new window
 * @cfg {String} doctype (optional) download PDF to new window
 * @cfg {Boolean} limit (optional) limit for grid downloads.
+* @cfg {Boolean} showDownloading default false - show a dialog indicating that the file is downloading
  * @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)
@@ -163,7 +164,9 @@ Pman.Download = function(cfg)
         }
         
     }
-    Roo.MessageBox.alert("Downloading", "The file should download shortly");
+    if (this.showDownloading) {
+        Roo.MessageBox.alert("Downloading", "The file should download shortly");
+    }
     req.send(this.form);
     /*
     (function() {
@@ -198,7 +201,7 @@ Roo.apply(Pman.Download.prototype, {
     
     hiddenCols : 'show', // set to 'hide' to hide them..
     
-    
+    showDownloading : false,
     // private..
     //used by simple GET method.
     createCsvFrame: function()
@@ -308,7 +311,7 @@ Roo.apply(Pman.Download.prototype, {
             
         });
         
-         if(ds.sortInfo && ds.remoteSort){
+        if(ds.sortInfo && ds.remoteSort){
             var pn = ds.paramNames;
             this.params[pn["sort"]] = ds.sortInfo.field;
             this.params[pn["dir"]] = ds.sortInfo.direction;