Lines 1-6
Link Here
|
1 |
[% USE ColumnsSettings %] |
1 |
[% USE ColumnsSettings %] |
2 |
|
2 |
|
3 |
<script type="text/javascript"> |
3 |
<script> |
4 |
function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) { |
4 |
function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) { |
5 |
var counter = 0; |
5 |
var counter = 0; |
6 |
var hidden_ids = []; |
6 |
var hidden_ids = []; |
Lines 20-60
function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) {
Link Here
|
20 |
} |
20 |
} |
21 |
counter++; |
21 |
counter++; |
22 |
}); |
22 |
}); |
|
|
23 |
|
24 |
var exportColumns = ":visible"; |
25 |
if( dt_parameters.hasOwnProperty("exportColumns") ){ |
26 |
// A custom buttons configuration has been passed from the page |
27 |
exportColumns = dt_parameters["exportColumns"]; |
28 |
} |
29 |
|
23 |
dt_parameters[ "buttons" ] = [ |
30 |
dt_parameters[ "buttons" ] = [ |
24 |
{ |
31 |
{ |
25 |
extend: 'colvis', |
32 |
extend: 'colvis', |
26 |
columns: included_ids, |
33 |
columns: included_ids, |
27 |
text: _("Column visibility"), |
34 |
text: _("Column visibility"), |
28 |
exportOptions: { |
35 |
exportOptions: { |
29 |
columns: ':visible' |
36 |
columns: exportColumns |
30 |
}, |
37 |
}, |
31 |
}, |
38 |
}, |
32 |
{ |
39 |
{ |
33 |
extend: 'excelHtml5', |
40 |
extend: 'excelHtml5', |
34 |
text: _("Excel"), |
41 |
text: _("Excel"), |
35 |
exportOptions: { |
42 |
exportOptions: { |
36 |
columns: ':visible' |
43 |
columns: exportColumns |
37 |
}, |
44 |
}, |
38 |
}, |
45 |
}, |
39 |
{ |
46 |
{ |
40 |
extend: 'csvHtml5', |
47 |
extend: 'csvHtml5', |
41 |
text: _("CSV"), |
48 |
text: _("CSV"), |
42 |
exportOptions: { |
49 |
exportOptions: { |
43 |
columns: ':visible' |
50 |
columns: exportColumns |
44 |
}, |
51 |
}, |
45 |
}, |
52 |
}, |
46 |
{ |
53 |
{ |
47 |
extend: 'copyHtml5', |
54 |
extend: 'copyHtml5', |
48 |
text: _("Copy"), |
55 |
text: _("Copy"), |
49 |
exportOptions: { |
56 |
exportOptions: { |
50 |
columns: ':visible' |
57 |
columns: exportColumns |
51 |
}, |
58 |
}, |
52 |
}, |
59 |
}, |
53 |
{ |
60 |
{ |
54 |
extend: 'print', |
61 |
extend: 'print', |
55 |
text: _("Print"), |
62 |
text: _("Print"), |
56 |
exportOptions: { |
63 |
exportOptions: { |
57 |
columns: ':visible' |
64 |
columns: exportColumns |
58 |
}, |
65 |
}, |
59 |
}, |
66 |
}, |
60 |
]; |
67 |
]; |