[Lada-commits] [PATCH] LadaPrint removed superfluous debug message and made printer more generic. In theory it should also be capable of printing messprogramme without further changes

Wald Commits scm-commit at wald.intevation.org
Wed Sep 30 15:48:04 CEST 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1443620876 -7200
# Node ID fe85a4d23370b0467d821cfdfda7155529b7ed1c
# Parent  6739bfdb743e022803348b1045219ca02b571dc8
LadaPrint removed superfluous debug message and made printer more generic. In theory it should also be capable of printing messprogramme without further changes.

diff -r 6739bfdb743e -r fe85a4d23370 app/controller/FilterResult.js
--- 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


More information about the Lada-commits mailing list