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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-2 / +1 lines)
Lines 224-236 Link Here
224
    [% INCLUDE 'datatables.inc' %]
224
    [% INCLUDE 'datatables.inc' %]
225
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
225
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
226
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
226
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
227
    [% INCLUDE 'columns_settings.inc' %]
228
    <script>
227
    <script>
229
        dt_overwrite_html_sorting_localeCompare();
228
        dt_overwrite_html_sorting_localeCompare();
230
229
231
        $(document).ready(function() {
230
        $(document).ready(function() {
232
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'acq_acqui-home', 'accounts', 'json' ) | $raw %];
231
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'acq_acqui-home', 'accounts', 'json' ) | $raw %];
233
            var oTable = KohaTable("accounts", {
232
            $("#accounts").kohaTable({
234
                "drawCallback": function ( oSettings ) {
233
                "drawCallback": function ( oSettings ) {
235
                    if ( oSettings.aiDisplay.length == 0 )
234
                    if ( oSettings.aiDisplay.length == 0 )
236
                    {
235
                    {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt (-3 / +2 lines)
Lines 313-319 Link Here
313
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
313
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
314
    [% INCLUDE 'calendar.inc' %]
314
    [% INCLUDE 'calendar.inc' %]
315
    [% INCLUDE 'datatables.inc' %]
315
    [% INCLUDE 'datatables.inc' %]
316
    [% INCLUDE 'columns_settings.inc' %]
317
    [% Asset.js("js/acq.js") | $raw %]
316
    [% Asset.js("js/acq.js") | $raw %]
318
    [% Asset.js("js/funds_sorts.js") | $raw %]
317
    [% Asset.js("js/funds_sorts.js") | $raw %]
319
    <script>
318
    <script>
Lines 330-337 Link Here
330
        var MSG_NO_FUND_SELECTED = _("No fund selected.");
329
        var MSG_NO_FUND_SELECTED = _("No fund selected.");
331
        $(document).ready(function() {
330
        $(document).ready(function() {
332
            $('span.hint').hide();
331
            $('span.hint').hide();
333
            KohaTable("table_orders", {
332
            $("#table_orders").kohatable({
334
                "paginate": false
333
                paginate: false,
335
            });
334
            });
336
335
337
            [% IF op == 'search' OR op == 'select' %]
336
            [% IF op == 'search' OR op == 'select' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt (-4 / +6 lines)
Lines 160-173 Link Here
160
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
160
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
161
[% INCLUDE 'calendar.inc' %]
161
[% INCLUDE 'calendar.inc' %]
162
    [% INCLUDE 'datatables.inc' %]
162
    [% INCLUDE 'datatables.inc' %]
163
    [% INCLUDE 'columns_settings.inc' %]
164
    <script>
163
    <script>
165
        var MSG_REMOVE_PATRON = _("Remove");
164
        var MSG_REMOVE_PATRON = _("Remove");
166
        $(document).ready(function() {
165
        $(document).ready(function() {
167
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
166
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
168
            KohaTable("histsearcht", {
167
            $("#histsearcht").kohaTable(
169
                "pagingType": "full"
168
                {
170
            }, table_settings );
169
                    pagingType: "full",
170
                },
171
                table_settings
172
            );
171
173
172
            function AddPatron( patron_name, value, container, input_name ) {
174
            function AddPatron( patron_name, value, container, input_name ) {
173
                div = "<div id='borrower_" + value + "'>" + patron_name + " ( <a href='#' class='removePatron'><i class='fa fa-trash-can' aria-hidden='true'></i> " + MSG_REMOVE_PATRON + " </a> ) <input type='hidden' name='" + input_name + "' value='" + value + "' /></div>";
175
                div = "<div id='borrower_" + value + "'>" + patron_name + " ( <a href='#' class='removePatron'><i class='fa fa-trash-can' aria-hidden='true'></i> " + MSG_REMOVE_PATRON + " </a> ) <input type='hidden' name='" + input_name + "' value='" + value + "' /></div>";
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt (-2 / +1 lines)
Lines 330-336 Link Here
330
[% MACRO jsinclude BLOCK %]
330
[% MACRO jsinclude BLOCK %]
331
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
331
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
332
    [% INCLUDE 'datatables.inc' %]
332
    [% INCLUDE 'datatables.inc' %]
333
    [% INCLUDE 'columns_settings.inc' %]
334
    [% INCLUDE 'calendar.inc' %]
333
    [% INCLUDE 'calendar.inc' %]
335
    <script>
334
    <script>
336
        var late_orderst;
335
        var late_orderst;
Lines 347-353 Link Here
347
        $(document).ready(function() {
346
        $(document).ready(function() {
348
347
349
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %];
348
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %];
350
            late_orderst = KohaTable("late_orders", {
349
            late_orderst = $("#late_orders").kohaTable({
351
                "sorting": [[ 1, "asc" ]],
350
                "sorting": [[ 1, "asc" ]],
352
                "pagingType": "full",
351
                "pagingType": "full",
353
                "autoWidth": false,
352
                "autoWidth": false,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt (-2 / +1 lines)
Lines 687-699 Link Here
687
687
688
    [% ELSIF op == 'list' %]
688
    [% ELSIF op == 'list' %]
689
        [% INCLUDE 'datatables.inc' %]
689
        [% INCLUDE 'datatables.inc' %]
690
        [% INCLUDE 'columns_settings.inc' %]
691
        [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
690
        [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
692
691
693
        <script>
692
        <script>
694
            $(document).ready(function() {
693
            $(document).ready(function() {
695
                [% IF budgets %]
694
                [% IF budgets %]
696
                    var oTable = KohaTable("budgeth", {
695
                    var oTable = $("#budgeth").kohaTable({
697
                        "drawCallback": function ( oSettings ) {
696
                        "drawCallback": function ( oSettings ) {
698
                            if ( oSettings.aiDisplay.length == 0 )
697
                            if ( oSettings.aiDisplay.length == 0 )
699
                            {
698
                            {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt (-4 / +3 lines)
Lines 402-414 Link Here
402
[% MACRO jsinclude BLOCK %]
402
[% MACRO jsinclude BLOCK %]
403
    [% Asset.js("js/admin-menu.js") | $raw %]
403
    [% Asset.js("js/admin-menu.js") | $raw %]
404
    [% INCLUDE 'datatables.inc' %]
404
    [% INCLUDE 'datatables.inc' %]
405
    [% INCLUDE 'columns_settings.inc' %]
406
    <script>
405
    <script>
407
        $(document).ready(function() {
406
        $(document).ready(function() {
408
407
409
            KohaTable("categoriest", {
408
            $("#categoriest").kohaTable({
410
                "order": [[ 0, "asc" ]],
409
                order: [[0, "asc"]],
411
                "pagingType": "full"
410
                pagingType: "full",
412
            });
411
            });
413
412
414
            if ( $("#branches option:selected").length < 1 ) {
413
            if ( $("#branches option:selected").length < 1 ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt (-4 / +2 lines)
Lines 287-293 Link Here
287
[% MACRO jsinclude BLOCK %]
287
[% MACRO jsinclude BLOCK %]
288
    [% Asset.js("js/admin-menu.js") | $raw %]
288
    [% Asset.js("js/admin-menu.js") | $raw %]
289
    [% INCLUDE 'datatables.inc' %]
289
    [% INCLUDE 'datatables.inc' %]
290
    [% INCLUDE 'columns_settings.inc' %]
291
    <script>
290
    <script>
292
291
293
        function check_currency(val) {
292
        function check_currency(val) {
Lines 302-310 Link Here
302
        }
301
        }
303
302
304
        $(document).ready(function() {
303
        $(document).ready(function() {
305
            columns_settings = [% TablesSettings.GetTableSettings( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %]
304
            let table_settings = [% TablesSettings.GetTableSettings( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %]
306
            var issuest = KohaTable("currencies-table", {
305
            $("#currencies-table").kohaTable({}, table_settings);
307
            }, columns_settings );
308
306
309
            // prevents users to check active with a currency != 1
307
            // prevents users to check active with a currency != 1
310
            $("#rate").keyup(function() {
308
            $("#rate").keyup(function() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/desks.tt (-3 / +2 lines)
Lines 224-234 Link Here
224
[% MACRO jsinclude BLOCK %]
224
[% MACRO jsinclude BLOCK %]
225
    [% Asset.js("js/admin-menu.js") | $raw %]
225
    [% Asset.js("js/admin-menu.js") | $raw %]
226
    [% INCLUDE 'datatables.inc' %]
226
    [% INCLUDE 'datatables.inc' %]
227
    [% INCLUDE 'columns_settings.inc' %]
228
    <script>
227
    <script>
229
        $(document).ready(function() {
228
        $(document).ready(function() {
230
            KohaTable("table_desks", {
229
            $("#table_desks").kohaTable({
231
                "order": [[ 1, "asc" ]]
230
                order: [[1, "asc"]],
232
            });
231
            });
233
        });
232
        });
234
    </script>
233
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt (-4 / +6 lines)
Lines 542-548 Link Here
542
    [% Asset.js("js/admin-menu.js") | $raw %]
542
    [% Asset.js("js/admin-menu.js") | $raw %]
543
    [% INCLUDE 'greybox.inc' %]
543
    [% INCLUDE 'greybox.inc' %]
544
    [% INCLUDE 'datatables.inc' %]
544
    [% INCLUDE 'datatables.inc' %]
545
    [% INCLUDE 'columns_settings.inc' %]
546
    <script>
545
    <script>
547
         $(document).ready(function() {
546
         $(document).ready(function() {
548
            var table_settings = [% TablesSettings.GetTableSettings( 'admin', 'itemtypes', 'table_item_type', 'json' ) | $raw %];
547
            var table_settings = [% TablesSettings.GetTableSettings( 'admin', 'itemtypes', 'table_item_type', 'json' ) | $raw %];
Lines 551-559 Link Here
551
            [% END %]
550
            [% END %]
552
551
553
            $(document).ready(function() {
552
            $(document).ready(function() {
554
                KohaTable("table_item_type", {
553
                $("#table_item_type").kohatable(
555
                "pagingType": "full"
554
                    {
556
                }, table_settings);
555
                        pagingType: "full",
556
                    },
557
                    table_settings
558
                );
557
            });
559
            });
558
560
559
            $( "#itemtypeentry" ).validate({
561
            $( "#itemtypeentry" ).validate({
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (-5 / +7 lines)
Lines 407-413 Link Here
407
[% MACRO jsinclude BLOCK %]
407
[% MACRO jsinclude BLOCK %]
408
    [% Asset.js("js/admin-menu.js") | $raw %]
408
    [% Asset.js("js/admin-menu.js") | $raw %]
409
    [% INCLUDE 'datatables.inc' %]
409
    [% INCLUDE 'datatables.inc' %]
410
    [% INCLUDE 'columns_settings.inc' %]
411
    <script>
410
    <script>
412
        $(document).ready(function() {
411
        $(document).ready(function() {
413
412
Lines 456-465 Link Here
456
455
457
            $(".patron_attributes_types").each(function(){
456
            $(".patron_attributes_types").each(function(){
458
                var tableid = $(this).attr("id");
457
                var tableid = $(this).attr("id");
459
                KohaTable( tableid, {
458
                $(tableid).kohaTable(
460
                    "paginate": false,
459
                    {
461
                    'autoWidth': false,
460
                        paginate: false,
462
                }, null );
461
                        autoWidth: false,
462
                    },
463
                    null
464
                );
463
            });
465
            });
464
        });
466
        });
465
    </script>
467
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-8 / +12 lines)
Lines 1465-1482 Link Here
1465
    [% Asset.js("js/admin-menu.js") | $raw %]
1465
    [% Asset.js("js/admin-menu.js") | $raw %]
1466
    [% INCLUDE 'datatables.inc' %]
1466
    [% INCLUDE 'datatables.inc' %]
1467
    [% INCLUDE 'calendar.inc' %]
1467
    [% INCLUDE 'calendar.inc' %]
1468
    [% INCLUDE 'columns_settings.inc' %]
1469
    [% INCLUDE 'format_price.inc' %]
1468
    [% INCLUDE 'format_price.inc' %]
1470
    <script>
1469
    <script>
1471
         $(document).ready(function() {
1470
         $(document).ready(function() {
1472
            KohaTable("default-circulation-rules", {
1471
            $("#default-circulation-rules").kohaTable({
1473
                "columnDefs": [
1472
                columnDefs: [
1474
                    { "visible": false, "targets": [ 0,2 ] },
1473
                    { visible: false, targets: [0, 2] },
1475
                    { "orderable": false, "targets": ["_all"] }
1474
                    { orderable: false, targets: ["_all"] },
1476
                ],
1475
                ],
1477
                "orderFixed": [ [0,'asc'], [1,'asc'], [2,'asc'], [3,'asc'] ],
1476
                orderFixed: [
1478
                "paginate": false,
1477
                    [0, "asc"],
1479
                "autoWidth": false
1478
                    [1, "asc"],
1479
                    [2, "asc"],
1480
                    [3, "asc"],
1481
                ],
1482
                paginate: false,
1483
                autoWidth: false,
1480
            });
1484
            });
1481
        });
1485
        });
1482
1486
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-12 / +17 lines)
Lines 1655-1661 Link Here
1655
        <script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
1655
        <script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
1656
    [% END %]
1656
    [% END %]
1657
    [% INCLUDE 'datatables.inc' %]
1657
    [% INCLUDE 'datatables.inc' %]
1658
    [% INCLUDE 'columns_settings.inc' %]
1659
    [% INCLUDE 'js-date-format.inc' %]
1658
    [% INCLUDE 'js-date-format.inc' %]
1660
    [% Asset.js("lib/dayjs/plugin/isSameOrAfter.js") | $raw %]
1659
    [% Asset.js("lib/dayjs/plugin/isSameOrAfter.js") | $raw %]
1661
    [% Asset.js("lib/dayjs/plugin/isSameOrBefore.js") | $raw %]
1660
    [% Asset.js("lib/dayjs/plugin/isSameOrBefore.js") | $raw %]
Lines 2017-2028 Link Here
2017
2016
2018
            [% IF Koha.Preference('AcquisitionDetails') %]
2017
            [% IF Koha.Preference('AcquisitionDetails') %]
2019
                var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %];
2018
                var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %];
2020
                var acquisitiondetails_table = KohaTable("orders", {
2019
                var acquisitiondetails_table = $("#orders").kohaTable(
2021
                    "dom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
2020
                    {
2022
                    "paginate": false,
2021
                        dom: 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
2023
                    "autoWidth": false,
2022
                        paginate: false,
2024
                    "order": [[ 4, "desc" ]],
2023
                        autoWidth: false,
2025
                }, table_settings);
2024
                        order: [[4, "desc"]],
2025
                    },
2026
                    table_settings
2027
                );
2026
            [% END %]
2028
            [% END %]
2027
2029
2028
            [% IF suggestions.count %]
2030
            [% IF suggestions.count %]
Lines 2037-2047 Link Here
2037
2039
2038
            [% IF ( reviews ) %]
2040
            [% IF ( reviews ) %]
2039
                var comment_table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'comments-table', 'json') | $raw %];
2041
                var comment_table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'comments-table', 'json') | $raw %];
2040
                var comments_table = KohaTable("comments_table", {
2042
                var comments_table = $("#comments_table").kohatable(
2041
                    "paginate": false,
2043
                    {
2042
                    "autoWidth": false,
2044
                        paginate: false,
2043
                    "order": [[ 2, "desc" ]],
2045
                        autoWidth: false,
2044
                }, comment_table_settings);
2046
                        order: [[2, "desc"]],
2047
                    },
2048
                    comment_table_settings
2049
                );
2045
            [% END %]
2050
            [% END %]
2046
        });
2051
        });
2047
2052
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt (-6 / +8 lines)
Lines 136-142 Link Here
136
136
137
[% MACRO jsinclude BLOCK %]
137
[% MACRO jsinclude BLOCK %]
138
[% INCLUDE 'datatables.inc' %]
138
[% INCLUDE 'datatables.inc' %]
139
[% INCLUDE 'columns_settings.inc' %]
140
    <script id="js">
139
    <script id="js">
141
        $(document).ready(function() {
140
        $(document).ready(function() {
142
            var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'checkoutshistory-table', 'json') | $raw %];
141
            var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'checkoutshistory-table', 'json') | $raw %];
Lines 144-154 Link Here
144
                // Remove the patron column definition
143
                // Remove the patron column definition
145
                table_settings['columns'].splice(0,1);
144
                table_settings['columns'].splice(0,1);
146
            [% END %]
145
            [% END %]
147
            var table = KohaTable("table_issues", {
146
            var table = $("#table_issues").kohaTable(
148
                "dom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
147
                {
149
                "order": [[ 5, "desc" ]],
148
                    dom: 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
150
                "pagingType": "full_numbers"
149
                    order: [[5, "desc"]],
151
            }, table_settings);
150
                    pagingType: "full_numbers",
151
                },
152
                table_settings
153
            );
152
        });
154
        });
153
    </script>
155
    </script>
154
[% END %]
156
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt (-2 / +1 lines)
Lines 360-366 Link Here
360
360
361
[% MACRO jsinclude BLOCK %]
361
[% MACRO jsinclude BLOCK %]
362
    [% INCLUDE 'datatables.inc' %]
362
    [% INCLUDE 'datatables.inc' %]
363
    [% INCLUDE 'columns_settings.inc' %]
364
    [% INCLUDE 'select2.inc' %]
363
    [% INCLUDE 'select2.inc' %]
365
    <script>
364
    <script>
366
        var authorised_values = [% authorised_values_json | $raw %];
365
        var authorised_values = [% authorised_values_json | $raw %];
Lines 629-635 Link Here
629
            };
628
            };
630
629
631
            var table_settings = [% TablesSettings.GetTableSettings( 'catalogue', 'itemsearch', 'results', 'json' ) | $raw %];
630
            var table_settings = [% TablesSettings.GetTableSettings( 'catalogue', 'itemsearch', 'results', 'json' ) | $raw %];
632
            KohaTable('results' , {
631
            $('#results').kohaTable( {
633
                "bKohaColumnsUseNames": true,
632
                "bKohaColumnsUseNames": true,
634
                "destroy": true,
633
                "destroy": true,
635
                "serverSide": true,
634
                "serverSide": true,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt (-4 / +6 lines)
Lines 273-279 Link Here
273
273
274
[% MACRO jsinclude BLOCK %]
274
[% MACRO jsinclude BLOCK %]
275
    [% INCLUDE 'datatables.inc' %]
275
    [% INCLUDE 'datatables.inc' %]
276
    [% INCLUDE 'columns_settings.inc' %]
277
    <script>
276
    <script>
278
277
279
         $(document).ready(function() {
278
         $(document).ready(function() {
Lines 319-327 Link Here
319
            });
318
            });
320
319
321
            var table_settings = [% TablesSettings.GetTableSettings( 'cataloguing', 'addbooks', 'reservoir-table', 'json' ) | $raw %]
320
            var table_settings = [% TablesSettings.GetTableSettings( 'cataloguing', 'addbooks', 'reservoir-table', 'json' ) | $raw %]
322
            var reservoirt = KohaTable("reservoir-table", {
321
            var reservoirt = $("#reservoir-table").kohaTable(
323
                "pagingType": "simple"
322
                {
324
            }, table_settings );
323
                    pagingType: "simple",
324
                },
325
                table_settings
326
            );
325
        });
327
        });
326
328
327
        /* this function open a popup to search on z3950 server.  */
329
        /* this function open a popup to search on z3950 server.  */
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt (-9 / +9 lines)
Lines 259-279 Link Here
259
        [% END %]
259
        [% END %]
260
260
261
[% MACRO jsinclude BLOCK %]
261
[% MACRO jsinclude BLOCK %]
262
    [% INCLUDE 'columns_settings.inc' %]
263
    [% INCLUDE 'datatables.inc' %]
262
    [% INCLUDE 'datatables.inc' %]
264
    [% INCLUDE 'z3950_search.inc' %]
263
    [% INCLUDE 'z3950_search.inc' %]
265
    [% Asset.js("js/z3950_search.js") | $raw %]
264
    [% Asset.js("js/z3950_search.js") | $raw %]
266
    <script>
265
    <script>
267
        $(document).ready(function(){
266
        $(document).ready(function(){
268
            var table_settings = [% TablesSettings.GetTableSettings( 'cataloguing', 'z3950_search', 'resultst', 'json' ) | $raw %];
267
            var table_settings = [% TablesSettings.GetTableSettings( 'cataloguing', 'z3950_search', 'resultst', 'json' ) | $raw %];
269
            var thetable = KohaTable("resultst", {
268
            var thetable = $("#resultst").kohaTable(
270
                "columnDefs": [
269
                {
271
                    { "targets": [ 1 ], "type": "nsb-nse" },
270
                    columnDefs: [{ targets: [1], type: "nsb-nse" }],
272
                ],
271
                    paginate: false,
273
                "paginate": false,
272
                    searching: false,
274
                "searching": false,
273
                    info: false,
275
                "info": false
274
                },
276
            }, table_settings );
275
                table_settings
276
            );
277
            InitLastAction();
277
            InitLastAction();
278
        });
278
        });
279
279
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt (-5 / +7 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' %]
297
    [% INCLUDE 'select2.inc' %]
296
    [% INCLUDE 'select2.inc' %]
298
    [% INCLUDE 'js-date-format.inc' %]
297
    [% INCLUDE 'js-date-format.inc' %]
299
    [% PROCESS 'modal-claims-js' %]
298
    [% PROCESS 'modal-claims-js' %]
Lines 338-347 Link Here
338
                table_settings['columns'].splice(13, 1);
337
                table_settings['columns'].splice(13, 1);
339
            [% END %]
338
            [% END %]
340
339
341
            KohaTable("overduest", {
340
            $("#overduest").kohatable(
342
                "pagingType": "full",
341
                {
343
                "autoWidth": false,
342
                    pagingType: "full",
344
            }, table_settings);
343
                    autoWidth: false,
344
                },
345
                table_settings
346
            );
345
347
346
            $("#showall").on("change", function(){
348
            $("#showall").on("change", function(){
347
                update_date_due_filters_visibility();
349
                update_date_due_filters_visibility();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt (-7 / +12 lines)
Lines 303-309 Link Here
303
[% MACRO jsinclude BLOCK %]
303
[% MACRO jsinclude BLOCK %]
304
    [% INCLUDE 'calendar.inc' %]
304
    [% INCLUDE 'calendar.inc' %]
305
    [% INCLUDE 'datatables.inc' %]
305
    [% INCLUDE 'datatables.inc' %]
306
    [% INCLUDE 'columns_settings.inc' %]
307
    <script>
306
    <script>
308
        function get_options(column){
307
        function get_options(column){
309
            let regex = /(<([^>]+)>)/ig; // Remove html tags
308
            let regex = /(<([^>]+)>)/ig; // Remove html tags
Lines 330-341 Link Here
330
329
331
330
332
            var table_settings = [% TablesSettings.GetTableSettings('circ', 'holds', 'holds-to-pull', 'json') | $raw %];
331
            var table_settings = [% TablesSettings.GetTableSettings('circ', 'holds', 'holds-to-pull', 'json') | $raw %];
333
            var holdst = KohaTable("holdst", {
332
            var holdst = $("#holdst").kohaTable(
334
                "pagingType": "full_numbers",
333
                {
335
                "columnDefs": [
334
                    pagingType: "full_numbers",
336
                    { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] },
335
                    columnDefs: [
337
                ],
336
                        { orderable: false, searchable: false, targets: ["NoSort"] },
338
            }, table_settings, true, null, filters_options);
337
                    ],
338
                },
339
                table_settings,
340
                true,
341
                null,
342
                filters_options
343
            );
339
        });
344
        });
340
    </script>
345
    </script>
341
[% END %]
346
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt (-9 / +14 lines)
Lines 201-219 Link Here
201
[% MACRO jsinclude BLOCK %]
201
[% MACRO jsinclude BLOCK %]
202
    [% INCLUDE 'calendar.inc' %]
202
    [% INCLUDE 'calendar.inc' %]
203
    [% INCLUDE 'datatables.inc' %]
203
    [% INCLUDE 'datatables.inc' %]
204
    [% INCLUDE 'columns_settings.inc' %]
205
    <script>
204
    <script>
206
        var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
205
        var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
207
        $(document).ready(function() {
206
        $(document).ready(function() {
208
            KohaTable("holds-ratios", {
207
            $("#holds-ratios").kohaTable(
209
                "order": [ [2,'desc'], [3,'asc'] ],
208
                {
210
                  "columnDefs": [
209
                    order: [
211
                      { "type": "anti-the", "targets":  [ "anti-the" ] },
210
                        [2, "desc"],
212
                      { "type": "natural", "targets":  [ "natural" ] },
211
                        [3, "asc"],
213
                    ],
212
                    ],
214
                "pagingType": "full",
213
                    columnDefs: [
215
                "autoWidth": false
214
                        { type: "anti-the", targets: ["anti-the"] },
216
            }, table_settings);
215
                        { type: "natural", targets: ["natural"] },
216
                    ],
217
                    pagingType: "full",
218
                    autoWidth: false,
219
                },
220
                table_settings
221
            );
217
       });
222
       });
218
  </script>
223
  </script>
219
[% END %]
224
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-8 / +10 lines)
Lines 1458-1464 Link Here
1458
1458
1459
[% MACRO jsinclude BLOCK %]
1459
[% MACRO jsinclude BLOCK %]
1460
    [% INCLUDE 'datatables.inc' %]
1460
    [% INCLUDE 'datatables.inc' %]
1461
    [% INCLUDE 'columns_settings.inc' %]
1462
    [% INCLUDE 'calendar.inc' %]
1461
    [% INCLUDE 'calendar.inc' %]
1463
    [% Asset.js("js/pages/circulation.js") | $raw %]
1462
    [% Asset.js("js/pages/circulation.js") | $raw %]
1464
    [% Asset.js("js/modal_printer.js") | $raw %]
1463
    [% Asset.js("js/modal_printer.js") | $raw %]
Lines 1519-1531 Link Here
1519
                Dopop('/cgi-bin/koha/recalls/recall_pickup_slip.pl?recall_id=[% recall_id | uri %]');
1518
                Dopop('/cgi-bin/koha/recalls/recall_pickup_slip.pl?recall_id=[% recall_id | uri %]');
1520
            [% END %]
1519
            [% END %]
1521
1520
1522
            var returns_table = KohaTable("checkedintable", {
1521
            var returns_table = $("#checkedintable").kohaTable(
1523
                    "searching":false,
1522
                {
1524
                    "paginate":false,
1523
                    searching: false,
1525
                    "info": false,
1524
                    paginate: false,
1526
                    "ordering":false,
1525
                    info: false,
1527
                    "dom": '<"table_controls"B>rt',
1526
                    ordering: false,
1528
                    }, table_settings);
1527
                    dom: '<"table_controls"B>rt',
1528
                },
1529
                table_settings
1530
            );
1529
1531
1530
            $("#exemptcheck").change(function () {
1532
            $("#exemptcheck").change(function () {
1531
                if (this.checked == true) {
1533
                if (this.checked == true) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt (-6 / +8 lines)
Lines 325-331 Link Here
325
325
326
[% MACRO jsinclude BLOCK %]
326
[% MACRO jsinclude BLOCK %]
327
    [% INCLUDE 'datatables.inc' %]
327
    [% INCLUDE 'datatables.inc' %]
328
    [% INCLUDE 'columns_settings.inc' %]
329
    <script>
328
    <script>
330
        $(document).ready(function() {
329
        $(document).ready(function() {
331
            var holdst;
330
            var holdst;
Lines 344-354 Link Here
344
            $('#holdst thead input').on('change keyup keydown', filterColumn);
343
            $('#holdst thead input').on('change keyup keydown', filterColumn);
345
344
346
            var table_settings = [% TablesSettings.GetTableSettings('circ', 'view_holdsqueue', 'holds-table', 'json') | $raw %];
345
            var table_settings = [% TablesSettings.GetTableSettings('circ', 'view_holdsqueue', 'holds-table', 'json') | $raw %];
347
            var holdst = KohaTable("holdst", {
346
            var holdst = $("#holdst").kohaTable(
348
                "dom": 'B<"clearfix">t',
347
                {
349
                "orderCellsTop":  true,
348
                    dom: 'B<"clearfix">t',
350
                "paginate": false
349
                    orderCellsTop: true,
351
            }, table_settings);
350
                    paginate: false,
351
                },
352
                table_settings
353
            );
352
354
353
        });
355
        });
354
    </script>
356
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt (-16 / +23 lines)
Lines 210-216 Link Here
210
210
211
[% MACRO jsinclude BLOCK %]
211
[% MACRO jsinclude BLOCK %]
212
    [% INCLUDE 'datatables.inc' %]
212
    [% INCLUDE 'datatables.inc' %]
213
    [% INCLUDE 'columns_settings.inc' %]
214
    <script>
213
    <script>
215
        var MSG_CANCEL_SELECTED = _("Cancel selected (%s)");
214
        var MSG_CANCEL_SELECTED = _("Cancel selected (%s)");
216
        var holdst_table_settings  = [% TablesSettings.GetTableSettings( 'circ', 'holds_awaiting_pickup', 'holdst',  'json' ) | $raw %];
215
        var holdst_table_settings  = [% TablesSettings.GetTableSettings( 'circ', 'holds_awaiting_pickup', 'holdst',  'json' ) | $raw %];
Lines 218-238 Link Here
218
        var holdscr_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds_awaiting_pickup', 'holdscr', 'json' ) | $raw %];
217
        var holdscr_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds_awaiting_pickup', 'holdscr', 'json' ) | $raw %];
219
218
220
        $(document).ready(function() {
219
        $(document).ready(function() {
221
220
            $("#holdst").kohaTable(
222
            KohaTable("holdst", {
221
                {
223
                "pagingType": "full",
222
                    pagingType: "full",
224
                "order": [[1, 'asc']]
223
                    order: [[1, "asc"]],
225
            }, holdst_table_settings);
224
                },
226
225
                holdst_table_settings
227
            KohaTable("holdso", {
226
            );
228
                "pagingType": "full",
227
229
                "order": [[1, 'asc']]
228
            $("#holdso").kohaTable(
230
            }, holdso_table_settings);
229
                {
231
230
                    pagingType: "full",
232
            KohaTable("holdscr", {
231
                    order: [[1, "asc"]],
233
                "pagingType": "full",
232
                },
234
                "order": [[1, 'asc']]
233
                holdso_table_settings
235
            }, holdscr_table_settings);
234
            );
235
236
            $("#holdscr").kohaTable(
237
                {
238
                    pagingType: "full",
239
                    order: [[1, "asc"]],
240
                },
241
                holdscr_table_settings
242
            );
236
243
237
            let cancel_link;
244
            let cancel_link;
238
245
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt (-5 / +7 lines)
Lines 322-328 Link Here
322
322
323
[% MACRO jsinclude BLOCK %]
323
[% MACRO jsinclude BLOCK %]
324
    [% INCLUDE 'datatables.inc' %]
324
    [% INCLUDE 'datatables.inc' %]
325
    [% INCLUDE 'columns_settings.inc' %]
326
    <script>
325
    <script>
327
        var table_settings = [% TablesSettings.GetTableSettings( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
326
        var table_settings = [% TablesSettings.GetTableSettings( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
328
        $(document).ready(function(){
327
        $(document).ready(function(){
Lines 336-345 Link Here
336
                $('#rm_items').submit();
335
                $('#rm_items').submit();
337
            });
336
            });
338
337
339
            var rtable = KohaTable("course_reserves_table", {
338
            var rtable = $("#course_reserves_table").kohaTable(
340
                "pagingType": "full",
339
                {
341
                "autoWidth": false,
340
                    pagingType: "full",
342
            }, table_settings );
341
                    autoWidth: false,
342
                },
343
                table_settings
344
            );
343
345
344
            $("#course_reserves_table").on( 'click', " .delete_item", function(e){
346
            $("#course_reserves_table").on( 'click', " .delete_item", function(e){
345
                e.preventDefault();
347
                e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt (-5 / +7 lines)
Lines 93-106 Link Here
93
93
94
[% MACRO jsinclude BLOCK %]
94
[% MACRO jsinclude BLOCK %]
95
    [% INCLUDE 'datatables.inc' %]
95
    [% INCLUDE 'datatables.inc' %]
96
    [% INCLUDE 'columns_settings.inc' %]
97
    <script>
96
    <script>
98
        var table_settings = [% TablesSettings.GetTableSettings( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %];
97
        var table_settings = [% TablesSettings.GetTableSettings( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %];
99
        $(document).ready(function() {
98
        $(document).ready(function() {
100
            var ctable = KohaTable("course_reserves_table", {
99
            var ctable = $("#course_reserves_table").kohaTable(
101
                "pagingType": "full",
100
                {
102
                "autoWidth": false
101
                    pagingType: "full",
103
            }, table_settings );
102
                    autoWidth: false,
103
                },
104
                table_settings
105
            );
104
        });
106
        });
105
    </script>
107
    </script>
106
[% END %]
108
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-6 / +8 lines)
Lines 395-401 Link Here
395
[% MACRO jsinclude BLOCK %]
395
[% MACRO jsinclude BLOCK %]
396
    [% INCLUDE 'datatables.inc' %]
396
    [% INCLUDE 'datatables.inc' %]
397
    [% INCLUDE 'format_price.inc' %]
397
    [% INCLUDE 'format_price.inc' %]
398
    [% INCLUDE 'columns_settings.inc' %]
399
    [% INCLUDE 'str/members-menu.inc' %]
398
    [% INCLUDE 'str/members-menu.inc' %]
400
    [% Asset.js("js/members-menu.js") | $raw %]
399
    [% Asset.js("js/members-menu.js") | $raw %]
401
    <script>
400
    <script>
Lines 407-417 Link Here
407
            var txtActivefilter = _("Filter paid transactions");
406
            var txtActivefilter = _("Filter paid transactions");
408
            var txtInactivefilter = _("Show all transactions");
407
            var txtInactivefilter = _("Show all transactions");
409
            var table_settings = [% TablesSettings.GetTableSettings('members', 'fines', 'account-fines', 'json') | $raw %];
408
            var table_settings = [% TablesSettings.GetTableSettings('members', 'fines', 'account-fines', 'json') | $raw %];
410
            var table_account_fines = KohaTable("table_account_fines", {
409
            var table_account_fines = $("#table_account_fines").kohaTable(
411
                "pagingType": "full",
410
                {
412
                "order": [[0, 'desc']],
411
                    pagingType: "full",
413
                "dom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
412
                    order: [[0, "desc"]],
414
            }, table_settings);
413
                    dom: 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
414
                },
415
                table_settings
416
            );
415
            $("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
417
            $("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
416
            $('#filter_transacs').click(function(e) {
418
            $('#filter_transacs').click(function(e) {
417
                e.preventDefault();
419
                e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt (-5 / +7 lines)
Lines 139-145 Link Here
139
139
140
[% MACRO jsinclude BLOCK %]
140
[% MACRO jsinclude BLOCK %]
141
    [% INCLUDE 'datatables.inc' %]
141
    [% INCLUDE 'datatables.inc' %]
142
    [% INCLUDE 'columns_settings.inc' %]
143
    [% INCLUDE 'str/members-menu.inc' %]
142
    [% INCLUDE 'str/members-menu.inc' %]
144
    [% Asset.js("js/members-menu.js") | $raw %]
143
    [% Asset.js("js/members-menu.js") | $raw %]
145
    <script>
144
    <script>
Lines 149-158 Link Here
149
              //Remove item type column settings
148
              //Remove item type column settings
150
              table_settings['columns'] = table_settings['columns'].filter(function(c){return c['columnname'] != 'itemtype';});
149
              table_settings['columns'] = table_settings['columns'].filter(function(c){return c['columnname'] != 'itemtype';});
151
            [% END %]
150
            [% END %]
152
            var table = KohaTable("table_holdshistory", {
151
            var table = $("#table_holdshistory").kohatable(
153
                "pagingType": "full",
152
                {
154
                "order": [[4, 'desc']]
153
                    pagingType: "full",
155
            }, table_settings);
154
                    order: [[4, "desc"]],
155
                },
156
                table_settings
157
            );
156
        });
158
        });
157
    </script>
159
    </script>
158
[% END %]
160
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt (-4 / +3 lines)
Lines 451-466 Link Here
451
[% MACRO jsinclude BLOCK %]
451
[% MACRO jsinclude BLOCK %]
452
    [% INCLUDE 'calendar.inc' %]
452
    [% INCLUDE 'calendar.inc' %]
453
    [% INCLUDE 'datatables.inc' %]
453
    [% INCLUDE 'datatables.inc' %]
454
    [% INCLUDE 'columns_settings.inc' %]
455
    <script>
454
    <script>
456
        $(document).ready(function() {
455
        $(document).ready(function() {
457
            $(".delete").click(function(){
456
            $(".delete").click(function(){
458
                return confirm(_("Are you sure you want to delete this delivery?"));
457
                return confirm(_("Are you sure you want to delete this delivery?"));
459
            });
458
            });
460
        });
459
        });
461
        KohaTable("deliveries", {
460
        $("#deliveries").kohaTable({
462
            "pagingType": "full",
461
            pagingType: "full",
463
            "autoWidth": false,
462
            autoWidth: false,
464
        });
463
        });
465
    </script>
464
    </script>
466
    [% INCLUDE 'str/members-menu.inc' %]
465
    [% INCLUDE 'str/members-menu.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt (-16 / +24 lines)
Lines 216-245 Link Here
216
[% MACRO jsinclude BLOCK %]
216
[% MACRO jsinclude BLOCK %]
217
    [% INCLUDE 'slip-print.inc' #printThenClose %]
217
    [% INCLUDE 'slip-print.inc' #printThenClose %]
218
    [% INCLUDE 'datatables.inc' %]
218
    [% INCLUDE 'datatables.inc' %]
219
    [% INCLUDE 'columns_settings.inc' %]
220
    <script>
219
    <script>
221
        var checkouts_columns = [% TablesSettings.GetTableSettings( 'circ', 'print_summary', 'print-summary-checkouts', 'json' ) | $raw %];
220
        var checkouts_columns = [% TablesSettings.GetTableSettings( 'circ', 'print_summary', 'print-summary-checkouts', 'json' ) | $raw %];
222
        var holds_columns = [% TablesSettings.GetTableSettings( 'circ', 'print_summary', 'print-summary-holds', 'json' ) | $raw %];
221
        var holds_columns = [% TablesSettings.GetTableSettings( 'circ', 'print_summary', 'print-summary-holds', 'json' ) | $raw %];
223
        var fines_columns = [% TablesSettings.GetTableSettings( 'circ', 'print_summary', 'print-summary-fines', 'json' ) | $raw %];
222
        var fines_columns = [% TablesSettings.GetTableSettings( 'circ', 'print_summary', 'print-summary-fines', 'json' ) | $raw %];
224
223
225
        function initTables(){
224
        function initTables(){
226
            KohaTable("print-summary-checkouts", {
225
            $("#print-summary-checkouts").kohaTable(
227
                "dom": '<"dt-info"><"top pager"<"table_controls"B>>t',
226
                {
228
                "paging": false,
227
                    dom: '<"dt-info"><"top pager"<"table_controls"B>>t',
229
                "autoWidth": false,
228
                    paging: false,
230
            }, checkouts_columns);
229
                    autoWidth: false,
230
                },
231
                checkouts_columns
232
            );
231
233
232
            KohaTable("print-summary-holds", {
234
            $("#print-summary-holds").kohaTable(
233
                "dom": '<"dt-info"><"top pager"<"table_controls"B>>t',
235
                {
234
                "paging": false,
236
                    dom: '<"dt-info"><"top pager"<"table_controls"B>>t',
235
                "autoWidth": false,
237
                    paging: false,
236
            }, holds_columns);
238
                    autoWidth: false,
239
                },
240
                holds_columns
241
            );
237
242
238
            KohaTable("print-summary-fines", {
243
            $("#print-summary-fines").kohatable(
239
                "dom": '<"dt-info"><"top pager"<"table_controls"B>>t',
244
                {
240
                "paging": false,
245
                    dom: '<"dt-info"><"top pager"<"table_controls"B>>t',
241
                "autoWidth": false,
246
                    paging: false,
242
            }, fines_columns);
247
                    autoWidth: false,
248
                },
249
                fines_columns
250
            );
243
        }
251
        }
244
252
245
        if( autoprint ){
253
        if( autoprint ){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-5 / +7 lines)
Lines 226-232 Link Here
226
    [% INCLUDE 'str/members-menu.inc' %]
226
    [% INCLUDE 'str/members-menu.inc' %]
227
    [% Asset.js("js/members-menu.js") | $raw %]
227
    [% Asset.js("js/members-menu.js") | $raw %]
228
    [% INCLUDE 'datatables.inc' %]
228
    [% INCLUDE 'datatables.inc' %]
229
    [% INCLUDE 'columns_settings.inc' %]
230
    <script>
229
    <script>
231
        function enableCheckboxActions(){
230
        function enableCheckboxActions(){
232
            // Enable/disable controls if checkboxes are checked
231
            // Enable/disable controls if checkboxes are checked
Lines 281-290 Link Here
281
            });
280
            });
282
281
283
            var table_settings = [% TablesSettings.GetTableSettings('members', 'pay', 'pay-fines-table', 'json') | $raw %];
282
            var table_settings = [% TablesSettings.GetTableSettings('members', 'pay', 'pay-fines-table', 'json') | $raw %];
284
            KohaTable("finest", {
283
            $("#finest").kohaTable(
285
                "paging": false,
284
                {
286
                "autoWidth": false
285
                    paging: false,
287
            }, table_settings );
286
                    autoWidth: false,
287
                },
288
                table_settings
289
            );
288
        });
290
        });
289
    </script>
291
    </script>
290
[% END %]
292
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (-5 / +8 lines)
Lines 175-181 Link Here
175
    [% INCLUDE 'str/members-menu.inc' %]
175
    [% INCLUDE 'str/members-menu.inc' %]
176
    [% Asset.js("js/members-menu.js") | $raw %]
176
    [% Asset.js("js/members-menu.js") | $raw %]
177
    [% INCLUDE 'datatables.inc' %]
177
    [% INCLUDE 'datatables.inc' %]
178
    [% INCLUDE 'columns_settings.inc' %]
179
    [% INCLUDE 'modals/checkout_renewals.inc' %]
178
    [% INCLUDE 'modals/checkout_renewals.inc' %]
180
    [% INCLUDE 'js-date-format.inc' %]
179
    [% INCLUDE 'js-date-format.inc' %]
181
    [% INCLUDE 'js-patron-format.inc' %]
180
    [% INCLUDE 'js-patron-format.inc' %]
Lines 183-197 Link Here
183
    <script id="js">
182
    <script id="js">
184
        $(document).ready(function() {
183
        $(document).ready(function() {
185
            [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
184
            [% IF Koha.Preference('RecordStaffUserOnCheckout') %]
185
                // FIXME This cannot work without bKohaColumnsUseNames
186
                var column_sort = 11;
186
                var column_sort = 11;
187
            [% ELSE %]
187
            [% ELSE %]
188
                var column_sort = 10;
188
                var column_sort = 10;
189
            [% END %]
189
            [% END %]
190
            var table_settings = [% TablesSettings.GetTableSettings('members', 'checkouthistory', 'checkouthistory-table', 'json') | $raw %];
190
            var table_settings = [% TablesSettings.GetTableSettings('members', 'checkouthistory', 'checkouthistory-table', 'json') | $raw %];
191
            var table = KohaTable("table_readingrec", {
191
            var table = $("#table_readingrec").kohaTable(
192
                "pagingType": "full",
192
                {
193
                "order": [[column_sort, 'desc']]
193
                    pagingType: "full",
194
            }, table_settings);
194
                    order: [[column_sort, "desc"]],
195
                },
196
                table_settings
197
            );
195
198
196
            let table_dt = table.DataTable();
199
            let table_dt = table.DataTable();
197
            $("#tabs a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) {
200
            $("#tabs a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt (-4 / +6 lines)
Lines 5-11 Link Here
5
[% PROCESS 'i18n.inc' %]
5
[% PROCESS 'i18n.inc' %]
6
[% SET footerjs = 1 %]
6
[% SET footerjs = 1 %]
7
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
8
[% INCLUDE 'columns_settings.inc' %]
9
<title>[% FILTER collapse %]
8
<title>[% FILTER collapse %]
10
    [% list.name | html %] &rsaquo;
9
    [% list.name | html %] &rsaquo;
11
    [% t("Patron lists") | html %] &rsaquo;
10
    [% t("Patron lists") | html %] &rsaquo;
Lines 244-252 Link Here
244
            $('#patrons_to_add_fieldset').hide();
243
            $('#patrons_to_add_fieldset').hide();
245
244
246
                var table_settings = [% TablesSettings.GetTableSettings('members', 'patron-lists', 'patron-list-table', 'json') | $raw %]
245
                var table_settings = [% TablesSettings.GetTableSettings('members', 'patron-lists', 'patron-list-table', 'json') | $raw %]
247
                KohaTable('patron-list-table', {
246
                $("#patron-list-table").kohaTable(
248
                    "pagingType": "full"
247
                    {
249
                }, table_settings);
248
                        pagingType: "full",
249
                    },
250
                    table_settings
251
                );
250
252
251
            function AddPatron( patron_name, value, container, input_name ) {
253
            function AddPatron( patron_name, value, container, input_name ) {
252
                div = "<div id='borrower_" + value + "'>" + patron_name + " ( <a href='#' class='removePatron'><i class='fa fa-trash-can' aria-hidden='true'></i> " + MSG_REMOVE_PATRON + " </a> ) <input type='hidden' name='" + input_name + "' value='" + value + "' /></div>";
254
                div = "<div id='borrower_" + value + "'>" + patron_name + " ( <a href='#' class='removePatron'><i class='fa fa-trash-can' aria-hidden='true'></i> " + MSG_REMOVE_PATRON + " </a> ) <input type='hidden' name='" + input_name + "' value='" + value + "' /></div>";
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt (-3 / +2 lines)
Lines 271-277 Link Here
271
    [% Asset.js("js/tools-menu.js") | $raw %]
271
    [% Asset.js("js/tools-menu.js") | $raw %]
272
    [% INCLUDE 'calendar.inc' %]
272
    [% INCLUDE 'calendar.inc' %]
273
    [% INCLUDE 'datatables.inc' %]
273
    [% INCLUDE 'datatables.inc' %]
274
    [% INCLUDE 'columns_settings.inc' %]
275
    <script>
274
    <script>
276
        $(document).ready(function(){
275
        $(document).ready(function(){
277
            $(".uninstall_plugin").on("click", function(){
276
            $(".uninstall_plugin").on("click", function(){
Lines 284-291 Link Here
284
                $("#plugin-search-form").submit();
283
                $("#plugin-search-form").submit();
285
            });
284
            });
286
285
287
            KohaTable("installed_plugins", {
286
            $("#installed_plugins").kohaTable({
288
                "paginate": false
287
                paginate: false,
289
            });
288
            });
290
        });
289
        });
291
    </script>
290
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt (-6 / +9 lines)
Lines 246-252 Link Here
246
[% MACRO jsinclude BLOCK %]
246
[% MACRO jsinclude BLOCK %]
247
    [% INCLUDE 'format_price.inc' %]
247
    [% INCLUDE 'format_price.inc' %]
248
    [% INCLUDE 'datatables.inc' %]
248
    [% INCLUDE 'datatables.inc' %]
249
    [% INCLUDE 'columns_settings.inc' %]
250
    <script>
249
    <script>
251
    function moneyFormat(textObj) {
250
    function moneyFormat(textObj) {
252
        var newValue = textObj.value;
251
        var newValue = textObj.value;
Lines 435-445 Link Here
435
        });
434
        });
436
435
437
        var items_table_settings = [% TablesSettings.GetTableSettings('pos', 'pay', 'invoices', 'json') | $raw %];
436
        var items_table_settings = [% TablesSettings.GetTableSettings('pos', 'pay', 'invoices', 'json') | $raw %];
438
        var items_table = KohaTable("invoices", {
437
        var items_table = $("#invoices").kohatable(
439
               "pagingType": "full",
438
            {
440
               "order": [[ 0, "asc" ]],
439
                pagingType: "full",
441
               "autoWidth": false
440
                order: [[0, "asc"]],
442
        }, items_table_settings, false);
441
                autoWidth: false,
442
            },
443
            items_table_settings,
444
            false
445
        );
443
446
444
        $("#invoices").on("click", ".add_button", function(e) {
447
        $("#invoices").on("click", ".add_button", function(e) {
445
            e.preventDefault();
448
            e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt (-5 / +8 lines)
Lines 341-347 Link Here
341
[% MACRO jsinclude BLOCK %]
341
[% MACRO jsinclude BLOCK %]
342
    [% INCLUDE 'calendar.inc' %]
342
    [% INCLUDE 'calendar.inc' %]
343
    [% INCLUDE 'datatables.inc' %]
343
    [% INCLUDE 'datatables.inc' %]
344
    [% INCLUDE 'columns_settings.inc' %]
345
    <script>
344
    <script>
346
        function changeRemovedDateTrStatus() {
345
        function changeRemovedDateTrStatus() {
347
            var Cellvalue = $("input[name='Cellvalue']:checked").val();
346
            var Cellvalue = $("input[name='Cellvalue']:checked").val();
Lines 365-370 Link Here
365
            });
364
            });
366
            changeRemovedDateTrStatus();
365
            changeRemovedDateTrStatus();
367
366
367
            // FIXME This does not work, we need to pass table settings, not the columns
368
            columns_settings = [% FILTER collapse %]
368
            columns_settings = [% FILTER collapse %]
369
                [
369
                [
370
                    {
370
                    {
Lines 390-399 Link Here
390
                ];
390
                ];
391
            [% END %]
391
            [% END %]
392
392
393
            var catalogue_stats = KohaTable("catalogue_stats", {
393
            var catalogue_stats = $("#catalogue_stats").kohaTable(
394
                'autoWidth': false,
394
                {
395
                'paging': false,
395
                    autoWidth: false,
396
            }, columns_settings );
396
                    paging: false,
397
                },
398
                columns_settings
399
            );
397
        });
400
        });
398
    </script>
401
    </script>
399
[% END %]
402
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-9 / +10 lines)
Lines 1562-1568 Link Here
1562
    [% INCLUDE 'calendar.inc' %]
1562
    [% INCLUDE 'calendar.inc' %]
1563
    [% INCLUDE 'datatables.inc' %]
1563
    [% INCLUDE 'datatables.inc' %]
1564
    [% IF ( saved1 ) %]
1564
    [% IF ( saved1 ) %]
1565
        [% INCLUDE 'columns_settings.inc' %]
1566
        [% Asset.js( "lib/jsdiff/jsdiff.min.js" ) | $raw %]
1565
        [% Asset.js( "lib/jsdiff/jsdiff.min.js" ) | $raw %]
1567
    [% END %]
1566
    [% END %]
1568
    [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
1567
    [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
Lines 2017-2031 Link Here
2017
2016
2018
            [% IF (saved1) %]
2017
            [% IF (saved1) %]
2019
                var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'saved-sql', 'table_reports', 'json' ) | $raw %];
2018
                var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'saved-sql', 'table_reports', 'json' ) | $raw %];
2020
                var rtable = KohaTable("table_reports", {
2019
                var rtable = $("#table_reports").kohaTable(
2021
                    "autoWidth": false,
2020
                    {
2022
                    "pagingType": 'full',
2021
                        autoWidth: false,
2023
                    "order": [[ 1, "asc" ]],
2022
                        pagingType: "full",
2024
                    "language": {
2023
                        order: [[1, "asc"]],
2025
                        "zeroRecords": _("No matching reports found")
2024
                        language: {
2025
                            zeroRecords: _("No matching reports found"),
2026
                        },
2026
                    },
2027
                    },
2027
2028
                    table_settings
2028
                }, table_settings);
2029
                );
2029
                let table_dt = rtable.DataTable();
2030
                let table_dt = rtable.DataTable();
2030
2031
2031
                $("#tabs a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) {
2032
                $("#tabs a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt (-9 / +13 lines)
Lines 205-227 Link Here
205
205
206
[% MACRO jsinclude BLOCK %]
206
[% MACRO jsinclude BLOCK %]
207
    [% INCLUDE 'datatables.inc' %]
207
    [% INCLUDE 'datatables.inc' %]
208
    [% INCLUDE 'columns_settings.inc' %]
209
    <script>
208
    <script>
210
        $(document).ready(function() {
209
        $(document).ready(function() {
211
            var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %];
210
            var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %];
212
            [% IF csv_profiles.count %]
211
            [% IF csv_profiles.count %]
213
                // Add the first (checkbox) column if it is displayed
212
                // Add the first (checkbox) column if it is displayed
213
                // FIXME This cannot work without bKohaColumnsUseNames
214
                table_settings['columns'].unshift({cannot_be_modified: 1, cannot_be_toggled: 1, columnname: 'itemnumber', is_hidden: 0});
214
                table_settings['columns'].unshift({cannot_be_modified: 1, cannot_be_toggled: 1, columnname: 'itemnumber', is_hidden: 0});
215
            [% END %]
215
            [% END %]
216
216
217
            var lostitems_table = KohaTable("lostitems-table", {
217
            var lostitems_table = $("#lostitems-table").kohaTable(
218
                "order": [],
218
                {
219
                "columnDefs": [
219
                    order: [],
220
                    { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] }
220
                    columnDefs: [
221
                ],
221
                        { orderable: false, searchable: false, targets: ["NoSort"] },
222
                "autoWidth": false,
222
                    ],
223
                "paginate": false,
223
                    autoWidth: false,
224
            }, table_settings, 'with_filters');
224
                    paginate: false,
225
                },
226
                table_settings,
227
                "with_filters"
228
            );
225
229
226
            function itemSelectionBuildExportLink() {
230
            function itemSelectionBuildExportLink() {
227
                var itemnumbers = new Array();
231
                var itemnumbers = new Array();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt (-4 / +6 lines)
Lines 172-184 Link Here
172
172
173
[% MACRO jsinclude BLOCK %]
173
[% MACRO jsinclude BLOCK %]
174
    [% INCLUDE 'datatables.inc' %]
174
    [% INCLUDE 'datatables.inc' %]
175
    [% INCLUDE 'columns_settings.inc' %]
176
    <script>
175
    <script>
177
        var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'orders_by_fund', 'funds-table', 'json' ) | $raw %];
176
        var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'orders_by_fund', 'funds-table', 'json' ) | $raw %];
178
        $(document).ready( function () {
177
        $(document).ready( function () {
179
            var funds_table = KohaTable("funds", {
178
            var funds_table = $("#funds").kohaTable(
180
                'autoWidth': false,
179
                {
181
            }, table_settings );
180
                    autoWidth: false,
181
                },
182
                table_settings
183
            );
182
184
183
            showallbudgets = $('#budgetfilter').html();
185
            showallbudgets = $('#budgetfilter').html();
184
            $('#budgetfilter .b_inactive').remove();
186
            $('#budgetfilter .b_inactive').remove();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-5 / +7 lines)
Lines 1481-1487 Link Here
1481
[% MACRO jsinclude BLOCK %]
1481
[% MACRO jsinclude BLOCK %]
1482
    [% INCLUDE 'datatables.inc' %]
1482
    [% INCLUDE 'datatables.inc' %]
1483
    [% INCLUDE 'calendar.inc' %]
1483
    [% INCLUDE 'calendar.inc' %]
1484
    [% INCLUDE 'columns_settings.inc' %]
1485
    [% INCLUDE 'select2.inc' %]
1484
    [% INCLUDE 'select2.inc' %]
1486
    [% Asset.js("js/holds.js") | $raw%]
1485
    [% Asset.js("js/holds.js") | $raw%]
1487
    [% Asset.js("js/form-submit.js") | $raw%]
1486
    [% Asset.js("js/form-submit.js") | $raw%]
Lines 1494-1503 Link Here
1494
    <script>
1493
    <script>
1495
        $(document).ready(function () {
1494
        $(document).ready(function () {
1496
            hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %];
1495
            hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %];
1497
            KohaTable("patron_holds_table", {
1496
            $("#patron_holds_table").kohaTable(
1498
                "bPaginate":false,
1497
                {
1499
                "bKohaColumnsUseNames": true,
1498
                    bPaginate: false,
1500
           }, hold_table_settings);
1499
                    bKohaColumnsUseNames: true,
1500
                },
1501
                hold_table_settings
1502
            );
1501
        });
1503
        });
1502
        var biblionumbers = [[% biblionumbers.join(', ') | $raw %]];
1504
        var biblionumbers = [[% biblionumbers.join(', ') | $raw %]];
1503
        var borrowernumber = "[% patron.borrowernumber | $raw %]";
1505
        var borrowernumber = "[% patron.borrowernumber | $raw %]";
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt (-11 / +12 lines)
Lines 444-450 Link Here
444
    [% Asset.js("js/mana.js") | $raw %]
444
    [% Asset.js("js/mana.js") | $raw %]
445
    [% INCLUDE 'datatables.inc' %]
445
    [% INCLUDE 'datatables.inc' %]
446
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
446
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
447
    [% INCLUDE 'columns_settings.inc' %]
448
    <script>
447
    <script>
449
        // the english words used in display purposes
448
        // the english words used in display purposes
450
        var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose hemisphere:"),_("Northern"),_("Southern",
449
        var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose hemisphere:"),_("Northern"),_("Southern",
Lines 457-472 Link Here
457
            })
456
            })
458
457
459
            var table_settings = [% TablesSettings.GetTableSettings( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
458
            var table_settings = [% TablesSettings.GetTableSettings( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
460
            var table = KohaTable("orders", {
459
            var table = $("#orders").kohaTable(
461
                "columnDefs": [
460
                {
462
                    { "visible": false, "targets": [ 'NoVisible' ] },
461
                    columnDefs: [
463
                    { "orderable": false, "targets": ["_all"] },
462
                        { visible: false, targets: ["NoVisible"] },
464
                ],
463
                        { orderable: false, targets: ["_all"] },
465
464
                    ],
466
                "paginate": false,
465
                    paginate: false,
467
                "autoWidth": false,
466
                    autoWidth: false,
468
                "ordering": false,
467
                    ordering: false,
469
            }, table_settings);
468
                },
469
                table_settings
470
            );
470
471
471
            [% IF orders_grouped.size %]
472
            [% IF orders_grouped.size %]
472
                $(table).treetable({
473
                $(table).treetable({
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-5 / +7 lines)
Lines 1381-1387 Link Here
1381
    [% END %]
1381
    [% END %]
1382
    [% IF op == 'else' %]
1382
    [% IF op == 'else' %]
1383
        [% INCLUDE 'datatables.inc' %]
1383
        [% INCLUDE 'datatables.inc' %]
1384
        [% INCLUDE 'columns_settings.inc' %]
1385
        <script>
1384
        <script>
1386
            $(document).ready(function() {
1385
            $(document).ready(function() {
1387
                if( $("#suggestiontabs .tab-pane.active").length < 1 ){
1386
                if( $("#suggestiontabs .tab-pane.active").length < 1 ){
Lines 1392-1401 Link Here
1392
1391
1393
                [% FOREACH suggestion IN suggestions %]
1392
                [% FOREACH suggestion IN suggestions %]
1394
                    [% IF suggestion.suggestions.size %]
1393
                    [% IF suggestion.suggestions.size %]
1395
                        KohaTable("table_[% suggestion.suggestiontype | html %]", {
1394
                        $("#table_[% suggestion.suggestiontype | html %]").kohaTable(
1396
                            "sorting": [[ 4, "asc" ]],
1395
                            {
1397
                            "autoWidth": false,
1396
                                sorting: [[4, "asc"]],
1398
                        }, table_settings );
1397
                                autoWidth: false,
1398
                            },
1399
                            table_settings
1400
                        );
1399
                    [% END %]
1401
                    [% END %]
1400
                [% END %]
1402
                [% END %]
1401
1403
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt (-2 / +1 lines)
Lines 402-408 Link Here
402
[% MACRO jsinclude BLOCK %]
402
[% MACRO jsinclude BLOCK %]
403
    [% INCLUDE 'datatables.inc' %]
403
    [% INCLUDE 'datatables.inc' %]
404
    [% INCLUDE 'calendar.inc' %]
404
    [% INCLUDE 'calendar.inc' %]
405
    [% INCLUDE 'columns_settings.inc' %]
406
    <script>
405
    <script>
407
        function checkForm() {
406
        function checkForm() {
408
            if ( $('#uploadbarcodes').val() && $('#barcodelist').val() ) {
407
            if ( $('#uploadbarcodes').val() && $('#barcodelist').val() ) {
Lines 456-462 Link Here
456
455
457
        $(document).ready(function(){
456
        $(document).ready(function(){
458
            var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'inventory', 'inventoryt', 'json' ) | $raw %];
457
            var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'inventory', 'inventoryt', 'json' ) | $raw %];
459
            inventorydt = KohaTable("inventoryt", {
458
            inventorydt = $("#inventoryt").kohaTable({
460
                "pagingType": 'full_numbers',
459
                "pagingType": 'full_numbers',
461
                [% IF compareinv2barcd %]
460
                [% IF compareinv2barcd %]
462
                    // sort on callnumber
461
                    // sort on callnumber
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (-6 / +8 lines)
Lines 466-472 Link Here
466
[% MACRO jsinclude BLOCK %]
466
[% MACRO jsinclude BLOCK %]
467
    [% INCLUDE 'calendar.inc' %]
467
    [% INCLUDE 'calendar.inc' %]
468
    [% INCLUDE 'datatables.inc' %]
468
    [% INCLUDE 'datatables.inc' %]
469
    [% INCLUDE 'columns_settings.inc' %]
470
    [% Asset.js("js/tools-menu.js") | $raw %]
469
    [% Asset.js("js/tools-menu.js") | $raw %]
471
    [% Asset.js("js/members-patron-selections.js") | $raw %]
470
    [% Asset.js("js/members-patron-selections.js") | $raw %]
472
    <script>
471
    <script>
Lines 484-494 Link Here
484
        [% END %]
483
        [% END %]
485
        $(document).ready(function() {
484
        $(document).ready(function() {
486
            [% IF borrowers %]
485
            [% IF borrowers %]
487
                let patron_table = KohaTable("borrowerst", {
486
                let patron_table = $("#borrowerst").kohaTable(
488
                    "order": [[ 1, "asc" ]],
487
                    {
489
                    "autoWidth": true,
488
                        order: [[1, "asc"]],
490
                    "scrollX": true,
489
                        autoWidth: true,
491
                }, table_settings);
490
                        scrollX: true,
491
                    },
492
                    table_settings
493
                );
492
494
493
                $("#selectallbutton").click(function() {
495
                $("#selectallbutton").click(function() {
494
                    $("#borrowerst").find("input:checkbox").each(function() {
496
                    $("#borrowerst").find("input:checkbox").each(function() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt (-3 / +1 lines)
Lines 353-359 Link Here
353
    [% Asset.js("js/tools-menu.js") | $raw %]
353
    [% Asset.js("js/tools-menu.js") | $raw %]
354
    [% INCLUDE 'datatables.inc' %]
354
    [% INCLUDE 'datatables.inc' %]
355
    [% Asset.js("js/file-upload.js") | $raw %]
355
    [% Asset.js("js/file-upload.js") | $raw %]
356
    [% INCLUDE 'columns_settings.inc' %]
357
    <script>
356
    <script>
358
        function StartUpload() {
357
        function StartUpload() {
359
            if( $('#fileToUpload').prop('files').length == 0 ) return;
358
            if( $('#fileToUpload').prop('files').length == 0 ) return;
Lines 486-493 Link Here
486
            table_settings['columns'].splice(5, 1);
485
            table_settings['columns'].splice(5, 1);
487
        [% END %]
486
        [% END %]
488
        $(document).ready(function() {
487
        $(document).ready(function() {
489
            KohaTable("uploadresults",{
488
            $("#uploadresults").kohaTable({}, table_settings);
490
            }, table_settings);
491
489
492
            [% IF msg %]
490
            [% IF msg %]
493
                ShowAlerts( [% msg | html %] );
491
                ShowAlerts( [% msg | html %] );
(-)a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js (-7 / +10 lines)
Lines 1-4 Link Here
1
/* global KOHA searchid biblionumber frameworkcode popup op LABEL_EDIT_ITEM LABEL_DELETE_ITEM MSG_FORM_NOT_SUBMITTED MSG_MANDATORY_FIELDS_EMPTY MSG_ADD_MULTIPLE_ITEMS MSG_ENTER_NUM_ITEMS MSG_CONFIRM_DELETE_ITEM MSG_CONFIRM_ADD_ITEM columns_settings CheckMandatorySubfields CheckMultipleAdd */
1
/* global KOHA searchid biblionumber frameworkcode popup op LABEL_EDIT_ITEM LABEL_DELETE_ITEM MSG_FORM_NOT_SUBMITTED MSG_MANDATORY_FIELDS_EMPTY MSG_ADD_MULTIPLE_ITEMS MSG_ENTER_NUM_ITEMS MSG_CONFIRM_DELETE_ITEM MSG_CONFIRM_ADD_ITEM table_settings CheckMandatorySubfields CheckMultipleAdd */
2
2
3
var browser = KOHA.browser(searchid, parseInt(biblionumber, 10));
3
var browser = KOHA.browser(searchid, parseInt(biblionumber, 10));
4
browser.show();
4
browser.show();
Lines 41-52 $(document).ready(function(){ Link Here
41
    // Skip the first column
41
    // Skip the first column
42
    table_settings['columns'].unshift( { cannot_be_toggled: "1" } );
42
    table_settings['columns'].unshift( { cannot_be_toggled: "1" } );
43
43
44
    var itemst = KohaTable("itemst", {
44
    var itemst = $("#itemst").kohaTable(
45
        "paging":  false,
45
        {
46
        "info":  false,
46
            paging: false,
47
        "autoWidth":  false,
47
            info: false,
48
        "bKohaColumnsUseNames": true
48
            autoWidth: false,
49
    }, table_settings);
49
            bKohaColumnsUseNames: true,
50
        },
51
        table_settings
52
    );
50
53
51
    var multiCopyControl = $("#add_multiple_copies_span");
54
    var multiCopyControl = $("#add_multiple_copies_span");
52
    var addMultipleBlock = $("#addmultiple");
55
    var addMultipleBlock = $("#addmultiple");
(-)a/koha-tmpl/intranet-tmpl/prog/js/categories.js (-2 / +1 lines)
Lines 33-40 jQuery.validator.addMethod( Link Here
33
);
33
);
34
34
35
$(document).ready(function () {
35
$(document).ready(function () {
36
    KohaTable(
36
    $("#patron_categories").kohaTable(
37
        "patron_categories",
38
        {
37
        {
39
            columnDefs: [
38
            columnDefs: [
40
                {
39
                {
(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (-2 / +2 lines)
Lines 50-56 function LoadIssuesTable() { Link Here
50
            c => c.columnname == "export"
50
            c => c.columnname == "export"
51
        ).is_hidden = 1;
51
        ).is_hidden = 1;
52
    }
52
    }
53
    issuesTable = KohaTable("issues-table", {
53
    issuesTable = $("#issues-table").kohaTable({
54
        "language":  {
54
        "language":  {
55
            "emptyTable":  msg_loading,
55
            "emptyTable":  msg_loading,
56
            "processing": msg_loading,
56
            "processing": msg_loading,
Lines 814-820 $(document).ready(function() { Link Here
814
    var relativesIssuesTable;
814
    var relativesIssuesTable;
815
    $("#relatives-issues-tab").click( function() {
815
    $("#relatives-issues-tab").click( function() {
816
        if ( ! relativesIssuesTable ) {
816
        if ( ! relativesIssuesTable ) {
817
            relativesIssuesTable = KohaTable("relatives-issues-table", {
817
            relativesIssuesTable = $("#relatives-issues-table").kohaTable({
818
                "autoWidth":  false,
818
                "autoWidth":  false,
819
                "dom": '<"table_controls"B>rt',
819
                "dom": '<"table_controls"B>rt',
820
                "order":  [],
820
                "order":  [],
(-)a/koha-tmpl/intranet-tmpl/prog/js/holds.js (-1 / +1 lines)
Lines 126-132 $(document).ready(function() { Link Here
126
        var holds = new Array();
126
        var holds = new Array();
127
        if ( ! holdsTable ) {
127
        if ( ! holdsTable ) {
128
            var title;
128
            var title;
129
            holdsTable = KohaTable("holds-table", {
129
            holdsTable = $("#holds-table").kohaTable({
130
                "autoWidth": false,
130
                "autoWidth": false,
131
                "dom": '<"table_controls"B>rt',
131
                "dom": '<"table_controls"B>rt',
132
                "columns": [
132
                "columns": [
(-)a/koha-tmpl/intranet-tmpl/prog/js/ill-availability.js (-1 / +1 lines)
Lines 234-240 $(document).ready(function() { Link Here
234
                    .find('.dt-paging');
234
                    .find('.dt-paging');
235
                pagination.toggle(this.api().page.info().pages > 1);
235
                pagination.toggle(this.api().page.info().pages > 1);
236
            }
236
            }
237
            KohaTable(service.id, tableDef, table_settings);
237
            $("#" + service.id).kohaTable(tableDef, table_settings);
238
        });
238
        });
239
    }
239
    }
240
240
(-)a/koha-tmpl/intranet-tmpl/prog/js/ill-batch-modal.js (-1 / +1 lines)
Lines 944-950 Link Here
944
    };
944
    };
945
945
946
    function buildTable(identifiers) {
946
    function buildTable(identifiers) {
947
        table = KohaTable('identifier-table', {
947
        table = $('#identifier-table').kohaTable({
948
            processing: true,
948
            processing: true,
949
            ordering: false,
949
            ordering: false,
950
            paging: false,
950
            paging: false,
(-)a/koha-tmpl/intranet-tmpl/prog/js/ill-batch-table.js (-2 / +1 lines)
Lines 44-52 Link Here
44
    };
44
    };
45
45
46
    // Initialise the Datatable
46
    // Initialise the Datatable
47
    // FIXME: This should be a kohaTable not KohaTable
48
    var initTable = function () {
47
    var initTable = function () {
49
        return KohaTable("ill-batch-requests", {
48
        return $("#ill-batch-requests").kohaTable({
50
            data: batchesProxy.data,
49
            data: batchesProxy.data,
51
            columns: [
50
            columns: [
52
                {
51
                {
(-)a/koha-tmpl/intranet-tmpl/prog/js/letter.js (-5 / +8 lines)
Lines 1-5 Link Here
1
/* Variables defined in letter.tt: */
1
/* Variables defined in letter.tt: */
2
/* global _ module add_form copy_form no_op_set code interface theme KohaTable table_settings */
2
/* global _ module add_form copy_form no_op_set code interface theme kohaTable table_settings */
3
3
4
var modal_loading = "<div id=\"loading\"><img src=\"" + interface + "/" + theme + "/img/spinner-small.gif\" alt=\"\" /> "+ __('Loading...') +"</div>";
4
var modal_loading = "<div id=\"loading\"><img src=\"" + interface + "/" + theme + "/img/spinner-small.gif\" alt=\"\" /> "+ __('Loading...') +"</div>";
5
5
Lines 57-66 function confirmFormatOverwrite( event ) { Link Here
57
}
57
}
58
58
59
$(document).ready(function() {
59
$(document).ready(function() {
60
    var ntable = KohaTable("lettert", {
60
    var ntable = $("#lettert").kohaTable(
61
        "autoWidth": false,
61
        {
62
        "paging": false,
62
            autoWidth: false,
63
    }, table_settings);
63
            paging: false,
64
        },
65
        table_settings
66
    );
64
67
65
    if( no_op_set ){
68
    if( no_op_set ){
66
        $('#branch').change(function() {
69
        $('#branch').change(function() {
(-)a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js (-3 / +2 lines)
Lines 1-4 Link Here
1
/* global __ KohaTable table_settings */
1
/* global __ kohaTable table_settings */
2
$(document).ready(function() {
2
$(document).ready(function() {
3
    window.modaction_legend_innerhtml = $("#modaction_legend").text();
3
    window.modaction_legend_innerhtml = $("#modaction_legend").text();
4
    window.action_submit_value = $("#action_submit").val();
4
    window.action_submit_value = $("#action_submit").val();
Lines 104-111 $(document).ready(function() { Link Here
104
        updateAllEvery();
104
        updateAllEvery();
105
    });
105
    });
106
106
107
    KohaTable("templatest", {
107
    $("#templatest").kohaTable({}, table_settings);
108
    }, table_settings);
109
108
110
    $(".confirm-delete-action").on("click", function(){
109
    $(".confirm-delete-action").on("click", function(){
111
        return confirm( __("Are you sure you wish to delete this template action?") );
110
        return confirm( __("Are you sure you wish to delete this template action?") );
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js (-7 / +7 lines)
Lines 1-4 Link Here
1
/* global KohaTable allColumns Cookies */
1
/* global kohaTable allColumns Cookies */
2
// Set expiration date for cookies
2
// Set expiration date for cookies
3
var date = new Date();
3
var date = new Date();
4
date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000));
4
date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000));
Lines 118-130 function hideAllColumns() { Link Here
118
}
118
}
119
119
120
$(document).ready(function () {
120
$(document).ready(function () {
121
    var items_table = KohaTable("itemst", {
121
    var items_table = $("#itemst").kohaTable({
122
        "columnDefs":  [
122
        columnDefs: [
123
            { "targets":  [0, 1], "orderable":  false, "searchable":  true },
123
            { targets: [0, 1], orderable: false, searchable: true },
124
            { "targets":  [0], "visible":  false },
124
            { targets: [0], visible: false },
125
            { "type":  "anti-the", "targets":  ["anti-the"] }
125
            { type: "anti-the", targets: ["anti-the"] },
126
        ],
126
        ],
127
        "paging":  false,
127
        paging: false,
128
    });
128
    });
129
129
130
    hideColumns();
130
    hideColumns();
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js (-17 / +23 lines)
Lines 1-4 Link Here
1
/* global KohaTable columns_settings Sortable */
1
/* global kohaTable columns_settings Sortable */
2
2
3
function init() {
3
function init() {
4
    $('#ajax_status').hide();
4
    $('#ajax_status').hide();
Lines 67-87 $(document).ready(function() { Link Here
67
        });
67
        });
68
    }
68
    }
69
69
70
    KohaTable("stock_rotation_manage_items", {
70
    $("#stock_rotation_manage_items").kohaTable(
71
        "columnDefs":  [
71
        {
72
            { "orderable":  false, "searchable":  false, "targets":  [ 'NoSort' ] },
72
            columnDefs: [
73
            { "type":  "anti-the", "targets":  [ "anti-the" ] }
73
                { orderable: false, searchable: false, targets: ["NoSort"] },
74
        ],
74
                { type: "anti-the", targets: ["anti-the"] },
75
        "pagingType":  "full",
75
            ],
76
        "autoWidth": false,
76
            pagingType: "full",
77
    }, stock_rotation_items_table_settings);
77
            autoWidth: false,
78
        },
79
        stock_rotation_items_table_settings
80
    );
78
81
79
    KohaTable("stock_rotation", {
82
    $("#stock_rotation").kohaTable(
80
        "columnDefs":  [
83
        {
81
            { "orderable":  false, "searchable":  false, "targets":  [ 'NoSort' ] },
84
            columnDefs: [
82
            { "type":  "anti-the", "targets":  [ "anti-the" ] }
85
                { orderable: false, searchable: false, targets: ["NoSort"] },
83
        ],
86
                { type: "anti-the", targets: ["anti-the"] },
84
        "pagingType":  "full",
87
            ],
85
        "autoWidth": false,
88
            pagingType: "full",
86
    }, stock_rotation_table_settings);
89
            autoWidth: false,
90
        },
91
        stock_rotation_table_settings
92
    );
87
});
93
});
(-)a/koha-tmpl/intranet-tmpl/prog/js/restrictiontypes.js (-13 / +14 lines)
Lines 16-35 jQuery.validator.addMethod( "restrictionDisplayText", function(value){ Link Here
16
}, MSG_DUPLICATE_DISPLAY_TEXT);
16
}, MSG_DUPLICATE_DISPLAY_TEXT);
17
17
18
$(document).ready(function() {
18
$(document).ready(function() {
19
    KohaTable("restriction_types", {
19
    $("#restriction_types").kohaTable({
20
        "columnDefs":  [{
20
        columnDefs: [
21
            "targets":  [-1],
21
            {
22
            "orderable":  false,
22
                targets: [-1],
23
            "searchable":  false
23
                orderable: false,
24
        }, {
24
                searchable: false,
25
            "targets":  [0, 1],
25
            },
26
            "type":  "natural"
26
            {
27
        }, ],
27
                targets: [0, 1],
28
        "order":  [
28
                type: "natural",
29
            [1, "asc"]
29
            },
30
        ],
30
        ],
31
        "pagingType":  "full",
31
        order: [[1, "asc"]],
32
        "exportColumns": [0,1],
32
        pagingType: "full",
33
        exportColumns: [0, 1],
33
    });
34
    });
34
35
35
    $("#restriction_form").validate({
36
    $("#restriction_form").validate({
(-)a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js (-6 / +8 lines)
Lines 106-116 $(document).ready(function(){ Link Here
106
        }
106
        }
107
    });
107
    });
108
108
109
    var logst = KohaTable("logst", {
109
    var logst = $("#logst").kohaTable(
110
        "autoWidth": false,
110
        {
111
        "order": [[0, "desc"]],
111
            autoWidth: false,
112
        "pagingType" : "full"
112
            order: [[0, "desc"]],
113
    }, table_settings);
113
            pagingType: "full",
114
        },
115
        table_settings
116
    );
114
117
115
    $("body").on("click", ".compare_link", function(e){
118
    $("body").on("click", ".compare_link", function(e){
116
        e.preventDefault();
119
        e.preventDefault();
117
- 

Return to bug 26553