Bug 18791: Export visible columns only
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 13 Apr 2018 16:53:32 +0000 (13:53 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 13 Apr 2018 16:55:22 +0000 (13:55 -0300)
We certainly will want to improve that and explicitely list the columns
to export. For instance the actions and checkboxes should not be
exported, even if visible.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc

index d2e86df..636cc5a 100644 (file)
@@ -25,22 +25,37 @@ function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) {
             extend: 'colvis',
             columns: included_ids,
             text: _("Column visibility"),
+            exportOptions: {
+                columns: ':visible'
+            },
         },
         {
             extend: 'excelHtml5',
             text: _("Excel"),
+            exportOptions: {
+                columns: ':visible'
+            },
         },
         {
             extend: 'csvHtml5',
             text: _("CSV"),
+            exportOptions: {
+                columns: ':visible'
+            },
         },
         {
             extend: 'copyHtml5',
             text: _("Copy"),
+            exportOptions: {
+                columns: ':visible'
+            },
         },
         {
             extend: 'print',
             text: _("Print"),
+            exportOptions: {
+                columns: ':visible'
+            },
         },
     ];