changeset 938:fe85a4d23370

LadaPrint removed superfluous debug message and made printer more generic. In theory it should also be capable of printing messprogramme without further changes.
author Dustin Demuth <dustin@intevation.de>
date Wed, 30 Sep 2015 15:47:56 +0200
parents 6739bfdb743e
children cbc0c3fdada6
files app/controller/FilterResult.js
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/FilterResult.js	Wed Sep 30 15:24:25 2015 +0200
+++ b/app/controller/FilterResult.js	Wed Sep 30 15:47:56 2015 +0200
@@ -219,12 +219,12 @@
     printSelection: function(button) {
         var grid = button.up('grid');
         var selection = grid.getView().getSelectionModel().getSelection();
-        console.log(selection);
         var i18n = Lada.getApplication().bundle;
         var me = this;
         var columns = [];
         var columnNames = [];
-        var visibleColumns = {}
+        var visibleColumns = [];
+        var displayName = '';
         var data = [];
 
         // Write the columns to an array
@@ -241,10 +241,14 @@
         }
 
         //Retrieve visible columns' id's and names.
+        // and set displayName
         try {
             var grid = button.up('filterresultgrid');
             var cman = grid.columnManager;
             var cols = cman.getColumns();
+
+            displayName = grid.down('tbtext').text;
+
             for (key in cols) {
                 if (cols[key].dataIndex) {
                     visibleColumns[cols[key].dataIndex] = cols[key].text;
@@ -305,7 +309,7 @@
             'outputFormat': 'pdf',
             'attributes': {
                 'title': 'Auszug aus LADA',
-                'displayName': 'Proben',
+                'displayName': displayName,
                 'table': {
                     'columns': columnNames,
                     'data': data

http://lada.wald.intevation.org