Mercurial > lada > lada-client
diff app/view/window/FileUpload.js @ 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 | e002234d7da5 |
children | 3bc19188fc3a |
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(); } });