more quote identeiifers fixessss
[Pman.Core] / Pman.Gnumeric.js
index a7d77f1..d581916 100644 (file)
@@ -148,6 +148,13 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, {
     
     rowOffset : 0,
     
+    /**
+     * @type {String} format - either XLSX (if images are used) or XLS - as ssconvert does not do images that well.
+     */
+    
+    format : 'xlsx',
+    
+    
     /**
      * load:
      * run the connection, parse document and fire load event..
@@ -1709,22 +1716,28 @@ Roo.extend(Pman.Gnumeric, Roo.util.Observable, {
         }
         
         var ser = new XMLSerializer();
+       Roo.get(document.body).mask("Downloading");
         var x = new Pman.Download({
             method: 'POST',
             timeout : 120000, // quite a long wait.. 2 minutes.
             params : {
                xml : ser.serializeToString(this.doc),
-               format : 'xls', //xml
+               format : this.format,
                debug : 0
                
             },
             url : (this.downloadURL || (baseURL + '/GnumericToExcel/')) + name + '.xls',
             success : function() {
+               Roo.get(document.body).unmask();
                 Roo.MessageBox.alert("Alert", "File should have downloaded now");
                 if (callback) {
                     callback();
                 }
-            }
+            },
+           failure : function() {
+               Roo.get(document.body).unmask();
+               Roo.MessageBox.alert("Alert", "Download failed");
+           }
         });
          
     }