changeset 401:87c1579f320d

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 04 Sep 2013 09:57:07 +0200
parents 4fdc09ebf21d (diff) d0a9a1c31441 (current diff)
children 60a2812568cb
files
diffstat 2 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Proben.js	Fri Aug 30 16:07:43 2013 +0200
+++ b/app/controller/Proben.js	Wed Sep 04 09:57:07 2013 +0200
@@ -155,9 +155,23 @@
      */
     downloadFile: function(button) {
         var grid = button.up('grid');
-        var selection = grid.getView().getSelectionModel().getSelection()[0];
-        var url = "server/rest/export/laf/" + selection.get('probeId');
-        window.open(url, "_blank");
+        var selection = grid.getView().getSelectionModel().getSelection();
+        var hiddenItems = [];
+        for (var i = 0; i < selection.length; i++) {
+            hiddenItems.push({xtype: 'hiddenfield', name: 'probeId', value: selection[i].get('probeId')});
+        }
+        console.log('create download form.');
+        var hiddenForm = Ext.create('Ext.form.Panel', {
+            title: 'hiddenForm',
+            standardSubmit: true,
+            url: 'server/rest/export/laf',
+            timeout: 120,
+            height: 0,
+            width: 0,
+            hidden: true,
+            items: hiddenItems
+        });
+        hiddenForm.getForm().submit();
     },
     editItem: function(grid, record) {
         console.log('Editing Probe');
--- a/app/view/proben/List.js	Fri Aug 30 16:07:43 2013 +0200
+++ b/app/view/proben/List.js	Wed Sep 04 09:57:07 2013 +0200
@@ -5,6 +5,7 @@
     extend: 'Ext.grid.Panel',
     alias: 'widget.probenlist',
     store: 'ProbenList',
+    multiSelect: true,
     viewConfig: {
         maxHeight: 350,
         emptyText: 'Keine Proben gefunden.',

http://lada.wald.intevation.org