|
Lines 1-3
Link Here
|
|
|
1 |
[% USE Koha %] |
| 1 |
[% USE TablesSettings %] |
2 |
[% USE TablesSettings %] |
| 2 |
<!-- columns_settings.inc --> |
3 |
<!-- columns_settings.inc --> |
| 3 |
|
4 |
|
|
Lines 41-55
function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) {
Link Here
|
| 41 |
} |
42 |
} |
| 42 |
} |
43 |
} |
| 43 |
|
44 |
|
|
|
45 |
var export_numeric = { |
| 46 |
body: function ( data, row, column, node ) { |
| 47 |
var newnode = $(node); |
| 48 |
|
| 49 |
if ( newnode.find(".noExport").length > 0 ) { |
| 50 |
newnode = newnode.clone(); |
| 51 |
newnode.find(".noExport").remove(); |
| 52 |
} |
| 53 |
let tp = newnode.text().replace( /\n/g, ' ' ).trim(); |
| 54 |
tp = $('<p>' + tp + '</p>').text(); |
| 55 |
return $.isNumeric(tp.replace(',', '.')) ? tp.replace(',', '.') : tp; |
| 56 |
} |
| 57 |
} |
| 58 |
|
| 44 |
var export_buttons = [ |
59 |
var export_buttons = [ |
| 45 |
{ |
|
|
| 46 |
extend: 'excelHtml5', |
| 47 |
text: _("Excel"), |
| 48 |
exportOptions: { |
| 49 |
columns: exportColumns, |
| 50 |
format: export_format |
| 51 |
}, |
| 52 |
}, |
| 53 |
{ |
60 |
{ |
| 54 |
extend: 'csvHtml5', |
61 |
extend: 'csvHtml5', |
| 55 |
text: _("CSV"), |
62 |
text: _("CSV"), |
|
Lines 76-81
function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) {
Link Here
|
| 76 |
} |
83 |
} |
| 77 |
]; |
84 |
]; |
| 78 |
|
85 |
|
|
|
86 |
[% IF Koha.Preference("CurrencyFormat") != 'FR' %] |
| 87 |
export_buttons.unshift ( |
| 88 |
{ |
| 89 |
extend: 'excelHtml5', |
| 90 |
text: _("Excel"), |
| 91 |
exportOptions: { |
| 92 |
columns: exportColumns, |
| 93 |
format: export_format |
| 94 |
}, |
| 95 |
} |
| 96 |
); |
| 97 |
[% ELSE %] |
| 98 |
export_buttons.unshift ( |
| 99 |
{ |
| 100 |
extend: 'excelHtml5', |
| 101 |
text: _("Excel"), |
| 102 |
exportOptions: { |
| 103 |
columns: exportColumns, |
| 104 |
format: export_numeric |
| 105 |
}, |
| 106 |
} |
| 107 |
); |
| 108 |
[% END %] |
| 109 |
|
| 79 |
dt_parameters[ "buttons" ] = [ |
110 |
dt_parameters[ "buttons" ] = [ |
| 80 |
{ |
111 |
{ |
| 81 |
fade: 100, |
112 |
fade: 100, |
| 82 |
- |
|
|