DataObjects/ProjectDirectory.php
[Pman.Core] / Pman.Download.js
index 4caced0..6ca8ce4 100644 (file)
@@ -21,8 +21,9 @@ var t = new Pman.Download({
 * @cfg {String} method     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 {Function} success (optional) MAY fire on download completed (fails on attachments)..
-     
+* @cfg {Number} timeout (optional) in milliseconds before it gives up (default 30000 = 30s)
 */
+
 Pman.Download = function(cfg)
 {
  
@@ -58,6 +59,7 @@ Pman.Download = function(cfg)
         return;
     }
     
+    
     Roo.log("creating form?");
     
     var b = Roo.get(document.body);
@@ -89,7 +91,7 @@ Pman.Download = function(cfg)
     (function() {
         submit = true;
         this.form.dom.submit();
-        this.cleanup.defer(30000,this);
+        this.cleanup.defer(cfg.timeout || 30000,this);
     }).defer(100, this);