changeset 730:66812ad4b720

Show the window for importer response messages.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 17 Apr 2015 13:16:14 +0200
parents 7eb8ef8e68ca
children 70c964ac35fe
files app/view/window/FileUpload.js
diffstat 1 files changed, 16 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/window/FileUpload.js	Fri Apr 17 13:15:40 2015 +0200
+++ b/app/view/window/FileUpload.js	Fri Apr 17 13:16:14 2015 +0200
@@ -69,17 +69,30 @@
         });
         this.mon(uploader, 'uploadsuccess', win.uploadSuccess, win);
         this.mon(uploader, 'uploadfailure', win.uploadFailure, win);
-        console.log(button.up('window'));
         if (button.up('window').file !== null) {
             uploader.uploadItem(button.up('window').file);
         }
     },
 
-    uploadSuccess: function() {
+    uploadSuccess: function(file, response) {
         this.close();
+        var win = Ext.create('Lada.view.window.ImportResponse', {
+            data: response.response.responseText,
+            message: response.message,
+            fileName: file.config.fileApiObject.name,
+            title: 'Importergebnis'
+        });
+        win.show();
     },
 
-    uploadFailure: function() {
+    uploadFailure: function(file, response) {
         this.close();
+        var win = Ext.create('Lada.view.window.ImportResponse', {
+            data: response.response.responseText,
+            message: response.message,
+            fileName: file.config.fileApiObject.name,
+            title: 'Importergebnis'
+        });
+        win.show();
     }
 });

http://lada.wald.intevation.org