View | Details | Raw Unified | Return to bug 28058
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc (-6 lines)
Lines 1-6 Link Here
1
[% USE raw %]
2
[% USE Asset %]
3
[% USE TablesSettings %]
4
<!-- columns_settings.inc -->
5
[% Asset.js("js/tablesettings.js") | $raw %]
6
<!-- / columns_settings.inc -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/table_settings.inc (+6 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE Asset %]
3
[% USE TablesSettings %]
4
<!-- table_settings.js -->
5
[% Asset.js("js/table_settings.js") | $raw %]
6
<!-- / table_settings.js -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-1 / +1 lines)
Lines 191-197 Link Here
191
    [% INCLUDE 'datatables.inc' %]
191
    [% INCLUDE 'datatables.inc' %]
192
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
192
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
193
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
193
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
194
    [% INCLUDE 'columns_settings.inc' %]
194
    [% INCLUDE 'table_settings.inc' %]
195
    <script>
195
    <script>
196
        dt_overwrite_html_sorting_localeCompare();
196
        dt_overwrite_html_sorting_localeCompare();
197
197
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-1 / +1 lines)
Lines 812-818 Link Here
812
[% MACRO jsinclude BLOCK %]
812
[% MACRO jsinclude BLOCK %]
813
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
813
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
814
    [% INCLUDE 'datatables.inc' %]
814
    [% INCLUDE 'datatables.inc' %]
815
    [% INCLUDE 'columns_settings.inc' %]
815
    [% INCLUDE 'table_settings.inc' %]
816
    [% Asset.js("lib/hc-sticky.js") | $raw %]
816
    [% Asset.js("lib/hc-sticky.js") | $raw %]
817
    [% Asset.js("js/acq.js") | $raw %]
817
    [% Asset.js("js/acq.js") | $raw %]
818
    <script>
818
    <script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt (-1 / +1 lines)
Lines 310-316 Basket [% basket.basketno | html %] &rsaquo; Duplicate existing orders Link Here
310
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
310
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
311
    [% INCLUDE 'calendar.inc' %]
311
    [% INCLUDE 'calendar.inc' %]
312
    [% INCLUDE 'datatables.inc' %]
312
    [% INCLUDE 'datatables.inc' %]
313
    [% INCLUDE 'columns_settings.inc' %]
313
    [% INCLUDE 'table_settings.inc' %]
314
    [% Asset.js("js/autocomplete/patrons.js") | $raw %]
314
    [% Asset.js("js/autocomplete/patrons.js") | $raw %]
315
    [% Asset.js("js/acq.js") | $raw %]
315
    [% Asset.js("js/acq.js") | $raw %]
316
    [% Asset.js("js/funds_sorts.js") | $raw %]
316
    [% Asset.js("js/funds_sorts.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt (-1 / +1 lines)
Lines 148-154 Link Here
148
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
148
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
149
[% INCLUDE 'calendar.inc' %]
149
[% INCLUDE 'calendar.inc' %]
150
    [% INCLUDE 'datatables.inc' %]
150
    [% INCLUDE 'datatables.inc' %]
151
    [% INCLUDE 'columns_settings.inc' %]
151
    [% INCLUDE 'table_settings.inc' %]
152
    [% Asset.js("js/autocomplete/patrons.js") | $raw %]
152
    [% Asset.js("js/autocomplete/patrons.js") | $raw %]
153
    <script>
153
    <script>
154
        var MSG_REMOVE_PATRON = _("Remove");
154
        var MSG_REMOVE_PATRON = _("Remove");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt (-1 / +1 lines)
Lines 287-293 Link Here
287
[% MACRO jsinclude BLOCK %]
287
[% MACRO jsinclude BLOCK %]
288
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
288
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
289
    [% INCLUDE 'datatables.inc' %]
289
    [% INCLUDE 'datatables.inc' %]
290
    [% INCLUDE 'columns_settings.inc' %]
290
    [% INCLUDE 'table_settings.inc' %]
291
    [% INCLUDE 'calendar.inc' %]
291
    [% INCLUDE 'calendar.inc' %]
292
    <script>
292
    <script>
293
        var late_orderst;
293
        var late_orderst;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt (-1 / +1 lines)
Lines 647-653 Link Here
647
        </script>
647
        </script>
648
    [% ELSIF op == 'list' %]
648
    [% ELSIF op == 'list' %]
649
        [% INCLUDE 'datatables.inc' %]
649
        [% INCLUDE 'datatables.inc' %]
650
        [% INCLUDE 'columns_settings.inc' %]
650
        [% INCLUDE 'table_settings.inc' %]
651
        [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
651
        [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
652
652
653
        <script>
653
        <script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt (-1 / +1 lines)
Lines 350-356 Link Here
350
[% MACRO jsinclude BLOCK %]
350
[% MACRO jsinclude BLOCK %]
351
    [% Asset.js("js/admin-menu.js") | $raw %]
351
    [% Asset.js("js/admin-menu.js") | $raw %]
352
    [% INCLUDE 'datatables.inc' %]
352
    [% INCLUDE 'datatables.inc' %]
353
    [% INCLUDE 'columns_settings.inc' %]
353
    [% INCLUDE 'table_settings.inc' %]
354
    <script>
354
    <script>
355
        $(document).ready(function() {
355
        $(document).ready(function() {
356
            var columns_settings = []; // Empty because there are no columns we want to be configurable
356
            var columns_settings = []; // Empty because there are no columns we want to be configurable
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt (-1 / +1 lines)
Lines 317-323 Link Here
317
[% MACRO jsinclude BLOCK %]
317
[% MACRO jsinclude BLOCK %]
318
    [% Asset.js("js/admin-menu.js") | $raw %]
318
    [% Asset.js("js/admin-menu.js") | $raw %]
319
    [% INCLUDE 'datatables.inc' %]
319
    [% INCLUDE 'datatables.inc' %]
320
    [% INCLUDE 'columns_settings.inc' %]
320
    [% INCLUDE 'table_settings.inc' %]
321
    [% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %]
321
    [% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %]
322
    [% INCLUDE 'str/tinymce_i18n.inc' %]
322
    [% INCLUDE 'str/tinymce_i18n.inc' %]
323
    <script>
323
    <script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt (-1 / +1 lines)
Lines 687-693 Link Here
687
    [% Asset.js("js/messaging-preference-form.js") | $raw %]
687
    [% Asset.js("js/messaging-preference-form.js") | $raw %]
688
    [% INCLUDE 'calendar.inc' %]
688
    [% INCLUDE 'calendar.inc' %]
689
    [% INCLUDE 'datatables.inc' %]
689
    [% INCLUDE 'datatables.inc' %]
690
    [% INCLUDE 'columns_settings.inc' %]
690
    [% INCLUDE 'table_settings.inc' %]
691
    <script>
691
    <script>
692
        var columns_settings = [% TablesSettings.GetColumns( 'admin', 'categories', 'patron_categories', 'json' ) | $raw %];
692
        var columns_settings = [% TablesSettings.GetColumns( 'admin', 'categories', 'patron_categories', 'json' ) | $raw %];
693
    </script>
693
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt (-1 / +1 lines)
Lines 266-272 Link Here
266
[% MACRO jsinclude BLOCK %]
266
[% MACRO jsinclude BLOCK %]
267
    [% Asset.js("js/admin-menu.js") | $raw %]
267
    [% Asset.js("js/admin-menu.js") | $raw %]
268
    [% INCLUDE 'datatables.inc' %]
268
    [% INCLUDE 'datatables.inc' %]
269
    [% INCLUDE 'columns_settings.inc' %]
269
    [% INCLUDE 'table_settings.inc' %]
270
    <script>
270
    <script>
271
271
272
        function check_currency(val) {
272
        function check_currency(val) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt (-1 / +1 lines)
Lines 574-580 Data deleted Link Here
574
    [% Asset.js("js/admin-menu.js") | $raw %]
574
    [% Asset.js("js/admin-menu.js") | $raw %]
575
    [% INCLUDE 'greybox.inc' %]
575
    [% INCLUDE 'greybox.inc' %]
576
    [% INCLUDE 'datatables.inc' %]
576
    [% INCLUDE 'datatables.inc' %]
577
    [% INCLUDE 'columns_settings.inc' %]
577
    [% INCLUDE 'table_settings.inc' %]
578
    <script>
578
    <script>
579
         $(document).ready(function() {
579
         $(document).ready(function() {
580
            $('#icons').tabs();
580
            $('#icons').tabs();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-1 / +1 lines)
Lines 1279-1285 Note that permanent location is a code, and location may be an authval. Link Here
1279
    [% END %]
1279
    [% END %]
1280
    [% INCLUDE 'datatables.inc' %]
1280
    [% INCLUDE 'datatables.inc' %]
1281
    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
1281
    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
1282
    [% INCLUDE 'columns_settings.inc' %]
1282
    [% INCLUDE 'table_settings.inc' %]
1283
    [% Asset.js("js/browser.js") | $raw %]
1283
    [% Asset.js("js/browser.js") | $raw %]
1284
    <script>
1284
    <script>
1285
        var browser;
1285
        var browser;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt (-1 / +1 lines)
Lines 128-134 Link Here
128
128
129
[% MACRO jsinclude BLOCK %]
129
[% MACRO jsinclude BLOCK %]
130
[% INCLUDE 'datatables.inc' %]
130
[% INCLUDE 'datatables.inc' %]
131
[% INCLUDE 'columns_settings.inc' %]
131
[% INCLUDE 'table_settings.inc' %]
132
    <script id="js">
132
    <script id="js">
133
        $(document).ready(function() {
133
        $(document).ready(function() {
134
            var columns_settings = [% TablesSettings.GetColumns('catalogue', 'detail', 'checkoutshistory-table', 'json') %];
134
            var columns_settings = [% TablesSettings.GetColumns('catalogue', 'detail', 'checkoutshistory-table', 'json') %];
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-1 / +1 lines)
Lines 13-19 Link Here
13
</script>
13
</script>
14
[% INCLUDE 'select2.inc' %]
14
[% INCLUDE 'select2.inc' %]
15
[% Asset.js("js/cataloging.js") | $raw %]
15
[% Asset.js("js/cataloging.js") | $raw %]
16
[% INCLUDE 'columns_settings.inc' %]
16
[% INCLUDE 'table_settings.inc' %]
17
[% Asset.js("js/browser.js") | $raw %]
17
[% Asset.js("js/browser.js") | $raw %]
18
[% INCLUDE 'calendar.inc' %]
18
[% INCLUDE 'calendar.inc' %]
19
[% INCLUDE 'str/cataloging_additem.inc' %]
19
[% INCLUDE 'str/cataloging_additem.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt (-1 / +1 lines)
Lines 234-240 Link Here
234
        [% END %]
234
        [% END %]
235
235
236
[% MACRO jsinclude BLOCK %]
236
[% MACRO jsinclude BLOCK %]
237
    [% INCLUDE 'columns_settings.inc' %]
237
    [% INCLUDE 'table_settings.inc' %]
238
    [% INCLUDE 'datatables.inc' %]
238
    [% INCLUDE 'datatables.inc' %]
239
    [% INCLUDE 'z3950_search.inc' %]
239
    [% INCLUDE 'z3950_search.inc' %]
240
    [% Asset.js("js/z3950_search.js") | $raw %]
240
    [% Asset.js("js/z3950_search.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +1 lines)
Lines 1103-1109 Link Here
1103
[% MACRO jsinclude BLOCK %]
1103
[% MACRO jsinclude BLOCK %]
1104
    [% INCLUDE 'calendar.inc' %]
1104
    [% INCLUDE 'calendar.inc' %]
1105
    [% INCLUDE 'datatables.inc' %]
1105
    [% INCLUDE 'datatables.inc' %]
1106
    [% INCLUDE 'columns_settings.inc' %]
1106
    [% INCLUDE 'table_settings.inc' %]
1107
    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
1107
    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
1108
    [% INCLUDE 'timepicker.inc' %]
1108
    [% INCLUDE 'timepicker.inc' %]
1109
    [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %]
1109
    [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt (-1 / +1 lines)
Lines 242-248 Link Here
242
[% MACRO jsinclude BLOCK %]
242
[% MACRO jsinclude BLOCK %]
243
    [% INCLUDE 'calendar.inc' %]
243
    [% INCLUDE 'calendar.inc' %]
244
    [% INCLUDE 'datatables.inc' %]
244
    [% INCLUDE 'datatables.inc' %]
245
    [% INCLUDE 'columns_settings.inc' %]
245
    [% INCLUDE 'table_settings.inc' %]
246
    <script>
246
    <script>
247
        function clone_parent(node) {
247
        function clone_parent(node) {
248
            var parent = node.parentNode;
248
            var parent = node.parentNode;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt (-1 / +1 lines)
Lines 293-299 Link Here
293
[% MACRO jsinclude BLOCK %]
293
[% MACRO jsinclude BLOCK %]
294
    [% INCLUDE 'calendar.inc' %]
294
    [% INCLUDE 'calendar.inc' %]
295
    [% INCLUDE 'datatables.inc' %]
295
    [% INCLUDE 'datatables.inc' %]
296
    [% INCLUDE 'columns_settings.inc' %]
296
    [% INCLUDE 'table_settings.inc' %]
297
    <script>
297
    <script>
298
        $(document).ready(function() {
298
        $(document).ready(function() {
299
          var columns_settings = [% TablesSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') | $raw %];
299
          var columns_settings = [% TablesSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') | $raw %];
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt (-1 / +1 lines)
Lines 191-197 Link Here
191
[% MACRO jsinclude BLOCK %]
191
[% MACRO jsinclude BLOCK %]
192
    [% INCLUDE 'calendar.inc' %]
192
    [% INCLUDE 'calendar.inc' %]
193
    [% INCLUDE 'datatables.inc' %]
193
    [% INCLUDE 'datatables.inc' %]
194
    [% INCLUDE 'columns_settings.inc' %]
194
    [% INCLUDE 'table_settings.inc' %]
195
    <script>
195
    <script>
196
        var columns_settings = [% TablesSettings.GetColumns( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
196
        var columns_settings = [% TablesSettings.GetColumns( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
197
        $(document).ready(function() {
197
        $(document).ready(function() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-1 / +1 lines)
Lines 981-987 Link Here
981
981
982
[% MACRO jsinclude BLOCK %]
982
[% MACRO jsinclude BLOCK %]
983
    [% INCLUDE 'datatables.inc' %]
983
    [% INCLUDE 'datatables.inc' %]
984
    [% INCLUDE 'columns_settings.inc' %]
984
    [% INCLUDE 'table_settings.inc' %]
985
    [% INCLUDE 'calendar.inc' %]
985
    [% INCLUDE 'calendar.inc' %]
986
    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
986
    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
987
    [% Asset.js("js/pages/circulation.js") | $raw %]
987
    [% Asset.js("js/pages/circulation.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt (-1 / +1 lines)
Lines 232-238 Link Here
232
232
233
[% MACRO jsinclude BLOCK %]
233
[% MACRO jsinclude BLOCK %]
234
    [% INCLUDE 'datatables.inc' %]
234
    [% INCLUDE 'datatables.inc' %]
235
    [% INCLUDE 'columns_settings.inc' %]
235
    [% INCLUDE 'table_settings.inc' %]
236
    <script>
236
    <script>
237
        $(document).ready(function() {
237
        $(document).ready(function() {
238
            var holdst;
238
            var holdst;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt (-1 / +1 lines)
Lines 130-136 Link Here
130
130
131
[% MACRO jsinclude BLOCK %]
131
[% MACRO jsinclude BLOCK %]
132
    [% INCLUDE 'datatables.inc' %]
132
    [% INCLUDE 'datatables.inc' %]
133
    [% INCLUDE 'columns_settings.inc' %]
133
    [% INCLUDE 'table_settings.inc' %]
134
    <script>
134
    <script>
135
        var holdst_columns_settings = [% TablesSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdst', 'json' ) | $raw %];
135
        var holdst_columns_settings = [% TablesSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdst', 'json' ) | $raw %];
136
        var holdso_columns_settings = [% TablesSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdso', 'json' ) | $raw %];
136
        var holdso_columns_settings = [% TablesSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdso', 'json' ) | $raw %];
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt (-1 / +1 lines)
Lines 284-290 Link Here
284
284
285
[% MACRO jsinclude BLOCK %]
285
[% MACRO jsinclude BLOCK %]
286
    [% INCLUDE 'datatables.inc' %]
286
    [% INCLUDE 'datatables.inc' %]
287
    [% INCLUDE 'columns_settings.inc' %]
287
    [% INCLUDE 'table_settings.inc' %]
288
    <script>
288
    <script>
289
        var columns_settings = [% TablesSettings.GetColumns( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
289
        var columns_settings = [% TablesSettings.GetColumns( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
290
        $(document).ready(function(){
290
        $(document).ready(function(){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt (-1 / +1 lines)
Lines 89-95 Link Here
89
89
90
[% MACRO jsinclude BLOCK %]
90
[% MACRO jsinclude BLOCK %]
91
    [% INCLUDE 'datatables.inc' %]
91
    [% INCLUDE 'datatables.inc' %]
92
    [% INCLUDE 'columns_settings.inc' %]
92
    [% INCLUDE 'table_settings.inc' %]
93
    <script>
93
    <script>
94
        var columns_settings = [% TablesSettings.GetColumns( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %];
94
        var columns_settings = [% TablesSettings.GetColumns( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %];
95
        $(document).ready(function() {
95
        $(document).ready(function() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-1 / +1 lines)
Lines 832-838 Link Here
832
832
833
[% MACRO jsinclude BLOCK %]
833
[% MACRO jsinclude BLOCK %]
834
    [% INCLUDE 'datatables.inc' %]
834
    [% INCLUDE 'datatables.inc' %]
835
    [% INCLUDE 'columns_settings.inc' %]
835
    [% INCLUDE 'table_settings.inc' %]
836
    [% INCLUDE 'calendar.inc' %]
836
    [% INCLUDE 'calendar.inc' %]
837
    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
837
    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
838
    <script>
838
    <script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-1 / +1 lines)
Lines 337-343 Link Here
337
337
338
[% MACRO jsinclude BLOCK %]
338
[% MACRO jsinclude BLOCK %]
339
    [% INCLUDE 'datatables.inc' %]
339
    [% INCLUDE 'datatables.inc' %]
340
    [% INCLUDE 'columns_settings.inc' %]
340
    [% INCLUDE 'table_settings.inc' %]
341
    [% INCLUDE 'str/members-menu.inc' %]
341
    [% INCLUDE 'str/members-menu.inc' %]
342
    [% Asset.js("js/members-menu.js") | $raw %]
342
    [% Asset.js("js/members-menu.js") | $raw %]
343
    <script>
343
    <script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt (-1 / +1 lines)
Lines 132-138 Link Here
132
132
133
[% MACRO jsinclude BLOCK %]
133
[% MACRO jsinclude BLOCK %]
134
    [% INCLUDE 'datatables.inc' %]
134
    [% INCLUDE 'datatables.inc' %]
135
    [% INCLUDE 'columns_settings.inc' %]
135
    [% INCLUDE 'table_settings.inc' %]
136
    [% INCLUDE 'str/members-menu.inc' %]
136
    [% INCLUDE 'str/members-menu.inc' %]
137
    [% Asset.js("js/members-menu.js") | $raw %]
137
    [% Asset.js("js/members-menu.js") | $raw %]
138
    <script>
138
    <script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt (-1 / +1 lines)
Lines 54-60 Link Here
54
        [% INCLUDE 'str/members-menu.inc' %]
54
        [% INCLUDE 'str/members-menu.inc' %]
55
        [% Asset.js("js/members-menu.js") | $raw %]
55
        [% Asset.js("js/members-menu.js") | $raw %]
56
        [% INCLUDE 'datatables.inc' %]
56
        [% INCLUDE 'datatables.inc' %]
57
        [% INCLUDE 'columns_settings.inc' %]
57
        [% INCLUDE 'table_settings.inc' %]
58
        [% INCLUDE 'calendar.inc' %]
58
        [% INCLUDE 'calendar.inc' %]
59
        <script>
59
        <script>
60
            var prefilters = '[% prefilters | html %]';
60
            var prefilters = '[% prefilters | html %]';
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt (-1 / +1 lines)
Lines 212-218 Link Here
212
212
213
[% MACRO jsinclude BLOCK %]
213
[% MACRO jsinclude BLOCK %]
214
    [% INCLUDE 'datatables.inc' %]
214
    [% INCLUDE 'datatables.inc' %]
215
    [% INCLUDE 'columns_settings.inc' %]
215
    [% INCLUDE 'table_settings.inc' %]
216
    [% INCLUDE 'str/members-menu.inc' %]
216
    [% INCLUDE 'str/members-menu.inc' %]
217
    [% Asset.js("lib/hc-sticky.js") | $raw %]
217
    [% Asset.js("lib/hc-sticky.js") | $raw %]
218
    [% Asset.js("js/members-menu.js") | $raw %]
218
    [% Asset.js("js/members-menu.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-1 / +1 lines)
Lines 929-935 Link Here
929
[% MACRO jsinclude BLOCK %]
929
[% MACRO jsinclude BLOCK %]
930
    [% INCLUDE 'datatables.inc' %]
930
    [% INCLUDE 'datatables.inc' %]
931
    [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %]
931
    [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %]
932
    [% INCLUDE 'columns_settings.inc' %]
932
    [% INCLUDE 'table_settings.inc' %]
933
    [% INCLUDE 'calendar.inc' %]
933
    [% INCLUDE 'calendar.inc' %]
934
    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
934
    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
935
    [% INCLUDE 'timepicker.inc' %]
935
    [% INCLUDE 'timepicker.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-1 / +1 lines)
Lines 187-193 Link Here
187
    [% INCLUDE 'str/members-menu.inc' %]
187
    [% INCLUDE 'str/members-menu.inc' %]
188
    [% Asset.js("js/members-menu.js") | $raw %]
188
    [% Asset.js("js/members-menu.js") | $raw %]
189
    [% INCLUDE 'datatables.inc' %]
189
    [% INCLUDE 'datatables.inc' %]
190
    [% INCLUDE 'columns_settings.inc' %]
190
    [% INCLUDE 'table_settings.inc' %]
191
    <script>
191
    <script>
192
        function enableCheckboxActions(){
192
        function enableCheckboxActions(){
193
            // Enable/disable controls if checkboxes are checked
193
            // Enable/disable controls if checkboxes are checked
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (-1 / +1 lines)
Lines 147-153 Link Here
147
    [% INCLUDE 'str/members-menu.inc' %]
147
    [% INCLUDE 'str/members-menu.inc' %]
148
    [% Asset.js("js/members-menu.js") | $raw %]
148
    [% Asset.js("js/members-menu.js") | $raw %]
149
    [% INCLUDE 'datatables.inc' %]
149
    [% INCLUDE 'datatables.inc' %]
150
    [% INCLUDE 'columns_settings.inc' %]
150
    [% INCLUDE 'table_settings.inc' %]
151
    <script id="js">
151
    <script id="js">
152
        $(document).ready(function() {
152
        $(document).ready(function() {
153
            var columns_settings = [% TablesSettings.GetColumns('members', 'checkouthistory', 'checkouthistory-table', 'json') %];
153
            var columns_settings = [% TablesSettings.GetColumns('members', 'checkouthistory', 'checkouthistory-table', 'json') %];
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt (-1 / +1 lines)
Lines 4-10 Link Here
4
[% USE TablesSettings %]
4
[% USE TablesSettings %]
5
[% SET footerjs = 1 %]
5
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'columns_settings.inc' %]
7
[% INCLUDE 'table_settings.inc' %]
8
<title>Koha &rsaquo; Tools &rsaquo; Patron lists &rsaquo; [% list.name | html %] &rsaquo; Add patrons</title>
8
<title>Koha &rsaquo; Tools &rsaquo; Patron lists &rsaquo; [% list.name | html %] &rsaquo; Add patrons</title>
9
[% INCLUDE 'doc-head-close.inc' %]
9
[% INCLUDE 'doc-head-close.inc' %]
10
10
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt (-1 / +1 lines)
Lines 195-201 Link Here
195
[% MACRO jsinclude BLOCK %]
195
[% MACRO jsinclude BLOCK %]
196
    [% INCLUDE 'format_price.inc' %]
196
    [% INCLUDE 'format_price.inc' %]
197
    [% INCLUDE 'datatables.inc' %]
197
    [% INCLUDE 'datatables.inc' %]
198
    [% INCLUDE 'columns_settings.inc' %]
198
    [% INCLUDE 'table_settings.inc' %]
199
    [% Asset.js("lib/jquery/plugins/jquery.jeditable.mini.js") | $raw %]
199
    [% Asset.js("lib/jquery/plugins/jquery.jeditable.mini.js") | $raw %]
200
    <script>
200
    <script>
201
    function moneyFormat(textObj) {
201
    function moneyFormat(textObj) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt (-1 / +1 lines)
Lines 335-341 Link Here
335
[% MACRO jsinclude BLOCK %]
335
[% MACRO jsinclude BLOCK %]
336
    [% INCLUDE 'calendar.inc' %]
336
    [% INCLUDE 'calendar.inc' %]
337
    [% INCLUDE 'datatables.inc' %]
337
    [% INCLUDE 'datatables.inc' %]
338
    [% INCLUDE 'columns_settings.inc' %]
338
    [% INCLUDE 'table_settings.inc' %]
339
    <script>
339
    <script>
340
        function changeRemovedDateTrStatus() {
340
        function changeRemovedDateTrStatus() {
341
            var Cellvalue = $("input[name='Cellvalue']:checked").val();
341
            var Cellvalue = $("input[name='Cellvalue']:checked").val();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-1 / +1 lines)
Lines 1358-1364 Link Here
1358
    [% INCLUDE 'calendar.inc' %]
1358
    [% INCLUDE 'calendar.inc' %]
1359
    [% INCLUDE 'datatables.inc' %]
1359
    [% INCLUDE 'datatables.inc' %]
1360
    [% IF ( saved1 ) %]
1360
    [% IF ( saved1 ) %]
1361
        [% INCLUDE 'columns_settings.inc' %]
1361
        [% INCLUDE 'table_settings.inc' %]
1362
    [% END %]
1362
    [% END %]
1363
    [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
1363
    [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
1364
    [% Asset.js( "lib/codemirror/overlay.min.js" ) | $raw %]
1364
    [% Asset.js( "lib/codemirror/overlay.min.js" ) | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt (-1 / +1 lines)
Lines 207-213 Link Here
207
[% MACRO jsinclude BLOCK %]
207
[% MACRO jsinclude BLOCK %]
208
    [% INCLUDE 'datatables.inc' %]
208
    [% INCLUDE 'datatables.inc' %]
209
    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
209
    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
210
    [% INCLUDE 'columns_settings.inc' %]
210
    [% INCLUDE 'table_settings.inc' %]
211
    <script>
211
    <script>
212
        $(document).ready(function() {
212
        $(document).ready(function() {
213
            var columns_settings = [% TablesSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %];
213
            var columns_settings = [% TablesSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %];
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt (-1 / +1 lines)
Lines 169-175 Link Here
169
169
170
[% MACRO jsinclude BLOCK %]
170
[% MACRO jsinclude BLOCK %]
171
    [% INCLUDE 'datatables.inc' %]
171
    [% INCLUDE 'datatables.inc' %]
172
    [% INCLUDE 'columns_settings.inc' %]
172
    [% INCLUDE 'table_settings.inc' %]
173
    <script>
173
    <script>
174
        var columns_settings = [% TablesSettings.GetColumns( 'reports', 'orders_by_fund', 'funds-table', 'json' ) | $raw %];
174
        var columns_settings = [% TablesSettings.GetColumns( 'reports', 'orders_by_fund', 'funds-table', 'json' ) | $raw %];
175
        [% SET table_settings = TablesSettings.GetTableSettings( 'reports', 'orders_by_fund', 'funds-table' ) %];
175
        [% SET table_settings = TablesSettings.GetTableSettings( 'reports', 'orders_by_fund', 'funds-table' ) %];
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-1 / +1 lines)
Lines 1011-1017 Link Here
1011
[% MACRO jsinclude BLOCK %]
1011
[% MACRO jsinclude BLOCK %]
1012
    [% INCLUDE 'datatables.inc' %]
1012
    [% INCLUDE 'datatables.inc' %]
1013
    [% INCLUDE 'calendar.inc' %]
1013
    [% INCLUDE 'calendar.inc' %]
1014
    [% INCLUDE 'columns_settings.inc' %]
1014
    [% INCLUDE 'table_settings.inc' %]
1015
    [% Asset.js("lib/hc-sticky.js") | $raw %]
1015
    [% Asset.js("lib/hc-sticky.js") | $raw %]
1016
    [% Asset.js("js/circ-patron-search-results.js") | $raw %]
1016
    [% Asset.js("js/circ-patron-search-results.js") | $raw %]
1017
    [% INCLUDE 'select2.inc' %]
1017
    [% INCLUDE 'select2.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt (-1 / +1 lines)
Lines 516-522 Link Here
516
    [% Asset.js("js/mana.js") | $raw %]
516
    [% Asset.js("js/mana.js") | $raw %]
517
    [% INCLUDE 'datatables.inc' %]
517
    [% INCLUDE 'datatables.inc' %]
518
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
518
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
519
    [% INCLUDE 'columns_settings.inc' %]
519
    [% INCLUDE 'table_settings.inc' %]
520
    <script>
520
    <script>
521
        // the english words used in display purposes
521
        // the english words used in display purposes
522
        var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern",
522
        var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern",
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-1 / +1 lines)
Lines 1294-1300 Link Here
1294
    [% END %]
1294
    [% END %]
1295
    [% IF op == 'else' %]
1295
    [% IF op == 'else' %]
1296
        [% INCLUDE 'datatables.inc' %]
1296
        [% INCLUDE 'datatables.inc' %]
1297
        [% INCLUDE 'columns_settings.inc' %]
1297
        [% INCLUDE 'table_settings.inc' %]
1298
        <script>
1298
        <script>
1299
            $(document).ready(function() {
1299
            $(document).ready(function() {
1300
                $('#suggestiontabs').tabs();
1300
                $('#suggestiontabs').tabs();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt (-1 / +1 lines)
Lines 592-598 Link Here
592
[% MACRO jsinclude BLOCK %]
592
[% MACRO jsinclude BLOCK %]
593
    [% Asset.js("js/tools-menu.js") | $raw %]
593
    [% Asset.js("js/tools-menu.js") | $raw %]
594
    [% INCLUDE 'datatables.inc' %]
594
    [% INCLUDE 'datatables.inc' %]
595
    [% INCLUDE 'columns_settings.inc' %]
595
    [% INCLUDE 'table_settings.inc' %]
596
    [% Asset.js("lib/hc-sticky.js") | $raw %]
596
    [% Asset.js("lib/hc-sticky.js") | $raw %]
597
    [% Asset.js("lib/jquery/plugins/jquery.insertatcaret.js") | $raw %]
597
    [% Asset.js("lib/jquery/plugins/jquery.insertatcaret.js") | $raw %]
598
    <script>
598
    <script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt (-1 / +1 lines)
Lines 612-618 Link Here
612
[% MACRO jsinclude BLOCK %]
612
[% MACRO jsinclude BLOCK %]
613
    [% Asset.js("js/tools-menu.js") | $raw %]
613
    [% Asset.js("js/tools-menu.js") | $raw %]
614
    [% INCLUDE 'datatables.inc' %]
614
    [% INCLUDE 'datatables.inc' %]
615
    [% INCLUDE 'columns_settings.inc' %]
615
    [% INCLUDE 'table_settings.inc' %]
616
    [% Asset.js("js/pages/stockrotation.js") | $raw %]
616
    [% Asset.js("js/pages/stockrotation.js") | $raw %]
617
    <script>
617
    <script>
618
        var stock_rotation_items_columns_settings = [% TablesSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %];
618
        var stock_rotation_items_columns_settings = [% TablesSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %];
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt (-1 / +1 lines)
Lines 271-277 Link Here
271
    [% Asset.js("js/tools-menu.js") | $raw %]
271
    [% Asset.js("js/tools-menu.js") | $raw %]
272
    [% INCLUDE 'datatables.inc' %]
272
    [% INCLUDE 'datatables.inc' %]
273
    [% Asset.js("js/file-upload.js") | $raw %]
273
    [% Asset.js("js/file-upload.js") | $raw %]
274
    [% INCLUDE 'columns_settings.inc' %]
274
    [% INCLUDE 'table_settings.inc' %]
275
    <script>
275
    <script>
276
        function StartUpload() {
276
        function StartUpload() {
277
            if( $('#fileToUpload').prop('files').length == 0 ) return;
277
            if( $('#fileToUpload').prop('files').length == 0 ) return;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt (-1 / +1 lines)
Lines 430-436 Link Here
430
[% MACRO jsinclude BLOCK %]
430
[% MACRO jsinclude BLOCK %]
431
    [% INCLUDE 'calendar.inc' %]
431
    [% INCLUDE 'calendar.inc' %]
432
    [% INCLUDE 'datatables.inc' %]
432
    [% INCLUDE 'datatables.inc' %]
433
    [% INCLUDE 'columns_settings.inc' %]
433
    [% INCLUDE 'table_settings.inc' %]
434
    [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
434
    [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
435
    [% Asset.js("js/tools-menu.js") | $raw %]
435
    [% Asset.js("js/tools-menu.js") | $raw %]
436
    [% Asset.js("lib/hc-sticky.js") | $raw %]
436
    [% Asset.js("lib/hc-sticky.js") | $raw %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/table_settings.inc (+6 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE Asset %]
3
[% USE TablesSettings %]
4
<!-- table_settings.js -->
5
[% Asset.js("js/table_settings.js") | $raw %]
6
<!-- / table_settings.js -->
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt (-1 / +1 lines)
Lines 117-123 Link Here
117
[% INCLUDE 'opac-bottom.inc' %]
117
[% INCLUDE 'opac-bottom.inc' %]
118
[% BLOCK jsinclude %]
118
[% BLOCK jsinclude %]
119
    [% INCLUDE 'datatables.inc' %]
119
    [% INCLUDE 'datatables.inc' %]
120
    [% INCLUDE 'columns_settings.inc' %]
120
    [% INCLUDE 'table_settings.inc' %]
121
    <script>
121
    <script>
122
        $(document).ready(function() {
122
        $(document).ready(function() {
123
            columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'course-items-table', 'json' ) | $raw %];
123
            columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'course-items-table', 'json' ) | $raw %];
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt (-1 / +1 lines)
Lines 71-77 Link Here
71
[% INCLUDE 'opac-bottom.inc' %]
71
[% INCLUDE 'opac-bottom.inc' %]
72
[% BLOCK jsinclude %]
72
[% BLOCK jsinclude %]
73
    [% INCLUDE 'datatables.inc' %]
73
    [% INCLUDE 'datatables.inc' %]
74
    [% INCLUDE 'columns_settings.inc' %]
74
    [% INCLUDE 'table_settings.inc' %]
75
    <script>
75
    <script>
76
        $(document).ready(function() {
76
        $(document).ready(function() {
77
            columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'course_reserves_table', 'json' ) | $raw %]
77
            columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'course_reserves_table', 'json' ) | $raw %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-1 / +1 lines)
Lines 1438-1444 Link Here
1438
1438
1439
[% BLOCK jsinclude %]
1439
[% BLOCK jsinclude %]
1440
    [% INCLUDE 'datatables.inc' %]
1440
    [% INCLUDE 'datatables.inc' %]
1441
    [% INCLUDE 'columns_settings.inc' %]
1441
    [% INCLUDE 'table_settings.inc' %]
1442
    [% INCLUDE greybox.inc %]
1442
    [% INCLUDE greybox.inc %]
1443
    [% IF ( OpacStarRatings != 'disable' ) %][% Asset.js("lib/jquery/plugins/jquery.barrating.min.js") | $raw %][% END %]
1443
    [% IF ( OpacStarRatings != 'disable' ) %][% Asset.js("lib/jquery/plugins/jquery.barrating.min.js") | $raw %][% END %]
1444
1444
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt (-1 / +1 lines)
Lines 161-167 Link Here
161
[% INCLUDE 'opac-bottom.inc' %]
161
[% INCLUDE 'opac-bottom.inc' %]
162
[% BLOCK jsinclude %]
162
[% BLOCK jsinclude %]
163
[% INCLUDE 'datatables.inc' %]
163
[% INCLUDE 'datatables.inc' %]
164
[% INCLUDE 'columns_settings.inc' %]
164
[% INCLUDE 'table_settings.inc' %]
165
<script>
165
<script>
166
    $(document).ready(function() {
166
    $(document).ready(function() {
167
        $('#sort').change(function() {
167
        $('#sort').change(function() {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt (-1 / +1 lines)
Lines 204-210 Link Here
204
[% INCLUDE 'opac-bottom.inc' %]
204
[% INCLUDE 'opac-bottom.inc' %]
205
[% BLOCK jsinclude %]
205
[% BLOCK jsinclude %]
206
[% INCLUDE 'datatables.inc' %]
206
[% INCLUDE 'datatables.inc' %]
207
[% INCLUDE 'columns_settings.inc' %]
207
[% INCLUDE 'table_settings.inc' %]
208
<script>
208
<script>
209
    $(document).ready(function(){
209
    $(document).ready(function(){
210
        [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
210
        [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc (-30 / +27 lines)
Lines 1-61 Link Here
1
[% USE TablesSettings %]
1
/* global dataTablesDefaults columnsInit __ */
2
/* exported KohaTable */
2
3
3
<script>
4
function KohaTable(selector, dt_parameters, columns_settings) {
4
function KohaTable(selector, dt_parameters, columns_settings) {
5
    var id = 0;
5
    var id = 0;
6
    var hidden_ids = [];
6
    var hidden_ids = [];
7
    var included_ids = [];
7
    var included_ids = [];
8
    $(columns_settings).each( function() {
8
    $(columns_settings).each(function () {
9
        var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( selector+' th' );
9
        var named_id = $('thead th[data-colname="' + this.columnname + '"]', selector).index(selector + ' th');
10
10
11
        var used_id = dt_parameters.bKohaColumnsUseNames ? named_id : id;
11
        var used_id = dt_parameters.bKohaColumnsUseNames ? named_id : id;
12
        if ( used_id == -1 ) return;
12
        if (used_id == -1) return;
13
13
14
        if ( this['is_hidden'] == "1" ) {
14
        if (this['is_hidden'] == "1") {
15
            hidden_ids.push( used_id );
15
            hidden_ids.push(used_id);
16
        }
16
        }
17
        if ( this['cannot_be_toggled'] == "0" ) {
17
        if (this['cannot_be_toggled'] == "0") {
18
            included_ids.push( used_id );
18
            included_ids.push(used_id);
19
        }
19
        }
20
        id++;
20
        id++;
21
    });
21
    });
22
22
23
    // By default we include all visible columns in exports and print unless they have the "noExport" class
23
    // By default we include all visible columns in exports and print unless they have the "noExport" class
24
    var exportColumns = ":visible:not(.noExport)";
24
    var exportColumns = ":visible:not(.noExport)";
25
    if( dt_parameters.hasOwnProperty("exportColumns") ){
25
    if (dt_parameters.hasOwnProperty("exportColumns")) {
26
        // A custom buttons configuration has been passed from the page
26
        // A custom buttons configuration has been passed from the page
27
        exportColumns = dt_parameters["exportColumns"];
27
        exportColumns = dt_parameters["exportColumns"];
28
    }
28
    }
29
    // Data which has the "noExport" class should not appear in print or export
29
    // Data which has the "noExport" class should not appear in print or export
30
    var export_format = {
30
    var export_format = {
31
        body: function ( data, row, column, node ) {
31
        body: function (data, row, column, node) {
32
            var newnode = $(node);
32
            var newnode = $(node);
33
33
34
            if ( newnode.find(".noExport").length > 0 ) {
34
            if (newnode.find(".noExport").length > 0) {
35
                newnode = newnode.clone();
35
                newnode = newnode.clone();
36
                newnode.find(".noExport").remove();
36
                newnode.find(".noExport").remove();
37
            }
37
            }
38
38
39
            return newnode.text().replace( /\n/g, ' ' ).trim();
39
            return newnode.text().replace(/\n/g, ' ').trim();
40
        }
40
        }
41
    }
41
    };
42
42
43
    // Add a "Clear filter" button to table filter form field
43
    // Add a "Clear filter" button to table filter form field
44
    dt_parameters[ "buttons" ] = [
44
    dt_parameters["buttons"] = [
45
        {
45
        {
46
            fade: 100,
46
            fade: 100,
47
            className: "dt_button_clear_filter",
47
            className: "dt_button_clear_filter",
48
            titleAttr: _("Clear filter"),
48
            titleAttr: __("Clear filter"),
49
            enabled: false,
49
            enabled: false,
50
            text: '<i class="fa fa-lg fa-remove" aria-hidden="true"></i> <span class="dt-button-text">' + _("Clear filter") + '</span>',
50
            text: '<i class="fa fa-lg fa-remove" aria-hidden="true"></i> <span class="dt-button-text">' + __("Clear filter") + '</span>',
51
            action: function ( e, dt, node, config ) {
51
            action: function (e, dt, node) {
52
                dt.search( "" ).draw("page");
52
                dt.search("").draw("page");
53
                node.addClass("disabled");
53
                node.addClass("disabled");
54
            }
54
            }
55
        },
55
        },
56
        {
56
        {
57
            extend: 'csvHtml5',
57
            extend: 'csvHtml5',
58
            text: _("CSV"),
58
            text: __("CSV"),
59
            exportOptions: {
59
            exportOptions: {
60
                columns: exportColumns,
60
                columns: exportColumns,
61
                format: export_format
61
                format: export_format
Lines 63-69 function KohaTable(selector, dt_parameters, columns_settings) { Link Here
63
        },
63
        },
64
        {
64
        {
65
            extend: 'copyHtml5',
65
            extend: 'copyHtml5',
66
            text: _("Copy"),
66
            text: __("Copy"),
67
            exportOptions: {
67
            exportOptions: {
68
                columns: exportColumns,
68
                columns: exportColumns,
69
                format: export_format
69
                format: export_format
Lines 71-77 function KohaTable(selector, dt_parameters, columns_settings) { Link Here
71
        },
71
        },
72
        {
72
        {
73
            extend: 'print',
73
            extend: 'print',
74
            text: _("Print"),
74
            text: __("Print"),
75
            exportOptions: {
75
            exportOptions: {
76
                columns: exportColumns,
76
                columns: exportColumns,
77
                format: export_format
77
                format: export_format
Lines 79-93 function KohaTable(selector, dt_parameters, columns_settings) { Link Here
79
        }
79
        }
80
    ];
80
    ];
81
81
82
    if( included_ids.length > 0 ){
82
    if (included_ids.length > 0) {
83
        dt_parameters[ "buttons" ].push(
83
        dt_parameters["buttons"].push(
84
            {
84
            {
85
                extend: 'colvis',
85
                extend: 'colvis',
86
                fade: 100,
86
                fade: 100,
87
                columns: included_ids,
87
                columns: included_ids,
88
                className: "columns_controls",
88
                className: "columns_controls",
89
                titleAttr: _("Columns settings"),
89
                titleAttr: __("Columns settings"),
90
                text: '<i class="fa fa-lg fa-gear" aria-hidden="true"></i> <span class="dt-button-text">' + _("Columns") + '</span>',
90
                text: '<i class="fa fa-lg fa-gear" aria-hidden="true"></i> <span class="dt-button-text">' + __("Columns") + '</span>',
91
                exportOptions: {
91
                exportOptions: {
92
                    columns: exportColumns
92
                    columns: exportColumns
93
                }
93
                }
Lines 96-102 function KohaTable(selector, dt_parameters, columns_settings) { Link Here
96
    }
96
    }
97
97
98
    var table = $(selector);
98
    var table = $(selector);
99
    var new_parameters = {}
99
    var new_parameters = {};
100
    $.extend(true, new_parameters, dataTablesDefaults, dt_parameters);
100
    $.extend(true, new_parameters, dataTablesDefaults, dt_parameters);
101
    var default_column_defs = [
101
    var default_column_defs = [
102
        { "aTargets": ["string-sort"], "sType": "string" },
102
        { "aTargets": ["string-sort"], "sType": "string" },
Lines 123-127 function KohaTable(selector, dt_parameters, columns_settings) { Link Here
123
123
124
    return table;
124
    return table;
125
}
125
}
126
127
</script>
128
- 

Return to bug 28058