Mercurial > lada > lada-client
diff app/controller/Proben.js @ 400:4fdc09ebf21d
Enable multiselect in probe list and download LAF export via POST request.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 04 Sep 2013 09:56:22 +0200 |
parents | c5188d71ef87 |
children | 85238577adc9 |
line wrap: on
line diff
--- a/app/controller/Proben.js Fri Aug 30 13:57:46 2013 +0200 +++ b/app/controller/Proben.js Wed Sep 04 09:56:22 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');