[Lada-commits] [PATCH 3 of 4] Show the window for importer response messages

Wald Commits scm-commit at wald.intevation.org
Fri Apr 17 13:15:42 CEST 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1429269374 -7200
# Node ID 66812ad4b720901d5a02cc4ef201bd30ca6c531e
# Parent  7eb8ef8e68ca787ee1210060d5b60c00787257f3
Show the window for importer response messages.

diff -r 7eb8ef8e68ca -r 66812ad4b720 app/view/window/FileUpload.js
--- 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();
     }
 });


More information about the Lada-commits mailing list