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 225-237 Link Here
225
    [% INCLUDE 'datatables.inc' %]
225
    [% INCLUDE 'datatables.inc' %]
226
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
226
    [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
227
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
227
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
228
    [% INCLUDE 'columns_settings.inc' %]
229
    <script>
228
    <script>
230
        dt_overwrite_html_sorting_localeCompare();
229
        dt_overwrite_html_sorting_localeCompare();
231
230
232
        $(document).ready(function() {
231
        $(document).ready(function() {
233
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'acq_acqui-home', 'accounts', 'json' ) | $raw %];
232
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'acq_acqui-home', 'accounts', 'json' ) | $raw %];
234
            var oTable = KohaTable("accounts", {
233
            var oTable = $("#accounts").kohaTable({
235
                "drawCallback": function ( oSettings ) {
234
                "drawCallback": function ( oSettings ) {
236
                    if ( oSettings.aiDisplay.length == 0 )
235
                    if ( oSettings.aiDisplay.length == 0 )
237
                    {
236
                    {
(-)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 161-174 Link Here
161
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
161
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
162
[% INCLUDE 'calendar.inc' %]
162
[% INCLUDE 'calendar.inc' %]
163
    [% INCLUDE 'datatables.inc' %]
163
    [% INCLUDE 'datatables.inc' %]
164
    [% INCLUDE 'columns_settings.inc' %]
165
    <script>
164
    <script>
166
        var MSG_REMOVE_PATRON = _("Remove");
165
        var MSG_REMOVE_PATRON = _("Remove");
167
        $(document).ready(function() {
166
        $(document).ready(function() {
168
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
167
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
169
            KohaTable("histsearcht", {
168
            $("#histsearcht").kohaTable(
170
                "pagingType": "full"
169
                {
171
            }, table_settings );
170
                    pagingType: "full",
171
                },
172
                table_settings
173
            );
172
174
173
            function AddPatron( patron_name, value, container, input_name ) {
175
            function AddPatron( patron_name, value, container, input_name ) {
174
                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>";
176
                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 331-337 Link Here
331
[% MACRO jsinclude BLOCK %]
331
[% MACRO jsinclude BLOCK %]
332
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
332
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
333
    [% INCLUDE 'datatables.inc' %]
333
    [% INCLUDE 'datatables.inc' %]
334
    [% INCLUDE 'columns_settings.inc' %]
335
    [% INCLUDE 'calendar.inc' %]
334
    [% INCLUDE 'calendar.inc' %]
336
    <script>
335
    <script>
337
        var late_orderst;
336
        var late_orderst;
Lines 348-354 Link Here
348
        $(document).ready(function() {
347
        $(document).ready(function() {
349
348
350
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %];
349
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %];
351
            late_orderst = KohaTable("late_orders", {
350
            late_orderst = $("#late_orders").kohaTable({
352
                "sorting": [[ 1, "asc" ]],
351
                "sorting": [[ 1, "asc" ]],
353
                "pagingType": "full",
352
                "pagingType": "full",
354
                "autoWidth": false,
353
                "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 403-415 Link Here
403
[% MACRO jsinclude BLOCK %]
403
[% MACRO jsinclude BLOCK %]
404
    [% Asset.js("js/admin-menu.js") | $raw %]
404
    [% Asset.js("js/admin-menu.js") | $raw %]
405
    [% INCLUDE 'datatables.inc' %]
405
    [% INCLUDE 'datatables.inc' %]
406
    [% INCLUDE 'columns_settings.inc' %]
407
    <script>
406
    <script>
408
        $(document).ready(function() {
407
        $(document).ready(function() {
409
408
410
            KohaTable("categoriest", {
409
            $("#categoriest").kohaTable({
411
                "order": [[ 0, "asc" ]],
410
                order: [[0, "asc"]],
412
                "pagingType": "full"
411
                pagingType: "full",
413
            });
412
            });
414
413
415
            if ( $("#branches option:selected").length < 1 ) {
414
            if ( $("#branches option:selected").length < 1 ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt (-4 / +2 lines)
Lines 288-294 Link Here
288
[% MACRO jsinclude BLOCK %]
288
[% MACRO jsinclude BLOCK %]
289
    [% Asset.js("js/admin-menu.js") | $raw %]
289
    [% Asset.js("js/admin-menu.js") | $raw %]
290
    [% INCLUDE 'datatables.inc' %]
290
    [% INCLUDE 'datatables.inc' %]
291
    [% INCLUDE 'columns_settings.inc' %]
292
    <script>
291
    <script>
293
292
294
        function check_currency(val) {
293
        function check_currency(val) {
Lines 303-311 Link Here
303
        }
302
        }
304
303
305
        $(document).ready(function() {
304
        $(document).ready(function() {
306
            columns_settings = [% TablesSettings.GetTableSettings( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %]
305
            let table_settings = [% TablesSettings.GetTableSettings( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %]
307
            var issuest = KohaTable("currencies-table", {
306
            $("#currencies-table").kohaTable({}, table_settings);
308
            }, columns_settings );
309
307
310
            // prevents users to check active with a currency != 1
308
            // prevents users to check active with a currency != 1
311
            $("#rate").keyup(function() {
309
            $("#rate").keyup(function() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/desks.tt (-3 / +2 lines)
Lines 225-235 Link Here
225
[% MACRO jsinclude BLOCK %]
225
[% MACRO jsinclude BLOCK %]
226
    [% Asset.js("js/admin-menu.js") | $raw %]
226
    [% Asset.js("js/admin-menu.js") | $raw %]
227
    [% INCLUDE 'datatables.inc' %]
227
    [% INCLUDE 'datatables.inc' %]
228
    [% INCLUDE 'columns_settings.inc' %]
229
    <script>
228
    <script>
230
        $(document).ready(function() {
229
        $(document).ready(function() {
231
            KohaTable("table_desks", {
230
            $("#table_desks").kohaTable({
232
                "order": [[ 1, "asc" ]]
231
                order: [[1, "asc"]],
233
            });
232
            });
234
        });
233
        });
235
    </script>
234
    </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 2023-2034 Link Here
2023
2022
2024
            [% IF Koha.Preference('AcquisitionDetails') %]
2023
            [% IF Koha.Preference('AcquisitionDetails') %]
2025
                var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %];
2024
                var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %];
2026
                var acquisitiondetails_table = KohaTable("orders", {
2025
                var acquisitiondetails_table = $("#orders").kohaTable(
2027
                    "dom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
2026
                    {
2028
                    "paginate": false,
2027
                        dom: 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
2029
                    "autoWidth": false,
2028
                        paginate: false,
2030
                    "order": [[ 4, "desc" ]],
2029
                        autoWidth: false,
2031
                }, table_settings);
2030
                        order: [[4, "desc"]],
2031
                    },
2032
                    table_settings
2033
                );
2032
            [% END %]
2034
            [% END %]
2033
2035
2034
            [% IF suggestions.count %]
2036
            [% IF suggestions.count %]
Lines 2043-2053 Link Here
2043
2045
2044
            [% IF ( reviews ) %]
2046
            [% IF ( reviews ) %]
2045
                var comment_table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'comments-table', 'json') | $raw %];
2047
                var comment_table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'comments-table', 'json') | $raw %];
2046
                var comments_table = KohaTable("comments_table", {
2048
                var comments_table = $("#comments_table").kohaTable(
2047
                    "paginate": false,
2049
                    {
2048
                    "autoWidth": false,
2050
                        paginate: false,
2049
                    "order": [[ 2, "desc" ]],
2051
                        autoWidth: false,
2050
                }, comment_table_settings);
2052
                        order: [[2, "desc"]],
2053
                    },
2054
                    comment_table_settings
2055
                );
2051
            [% END %]
2056
            [% END %]
2052
        });
2057
        });
2053
2058
(-)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 361-367 Link Here
361
[% MACRO jsinclude BLOCK %]
361
[% MACRO jsinclude BLOCK %]
362
    [% INCLUDE 'calendar.inc' %]
362
    [% INCLUDE 'calendar.inc' %]
363
    [% INCLUDE 'datatables.inc' %]
363
    [% INCLUDE 'datatables.inc' %]
364
    [% INCLUDE 'columns_settings.inc' %]
365
    [% INCLUDE 'select2.inc' %]
364
    [% INCLUDE 'select2.inc' %]
366
    <script>
365
    <script>
367
        var authorised_values = [% authorised_values_json | $raw %];
366
        var authorised_values = [% authorised_values_json | $raw %];
Lines 630-636 Link Here
630
            };
629
            };
631
630
632
            var table_settings = [% TablesSettings.GetTableSettings( 'catalogue', 'itemsearch', 'results', 'json' ) | $raw %];
631
            var table_settings = [% TablesSettings.GetTableSettings( 'catalogue', 'itemsearch', 'results', 'json' ) | $raw %];
633
            KohaTable('results' , {
632
            $('#results').kohaTable( {
634
                "bKohaColumnsUseNames": true,
633
                "bKohaColumnsUseNames": true,
635
                "destroy": true,
634
                "destroy": true,
636
                "serverSide": true,
635
                "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 202-220 Link Here
202
[% MACRO jsinclude BLOCK %]
202
[% MACRO jsinclude BLOCK %]
203
    [% INCLUDE 'calendar.inc' %]
203
    [% INCLUDE 'calendar.inc' %]
204
    [% INCLUDE 'datatables.inc' %]
204
    [% INCLUDE 'datatables.inc' %]
205
    [% INCLUDE 'columns_settings.inc' %]
206
    <script>
205
    <script>
207
        var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
206
        var table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
208
        $(document).ready(function() {
207
        $(document).ready(function() {
209
            KohaTable("holds-ratios", {
208
            $("#holds-ratios").kohaTable(
210
                "order": [ [2,'desc'], [3,'asc'] ],
209
                {
211
                  "columnDefs": [
210
                    order: [
212
                      { "type": "anti-the", "targets":  [ "anti-the" ] },
211
                        [2, "desc"],
213
                      { "type": "natural", "targets":  [ "natural" ] },
212
                        [3, "asc"],
214
                    ],
213
                    ],
215
                "pagingType": "full",
214
                    columnDefs: [
216
                "autoWidth": false
215
                        { type: "anti-the", targets: ["anti-the"] },
217
            }, table_settings);
216
                        { type: "natural", targets: ["natural"] },
217
                    ],
218
                    pagingType: "full",
219
                    autoWidth: false,
220
                },
221
                table_settings
222
            );
218
       });
223
       });
219
  </script>
224
  </script>
220
[% END %]
225
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-8 / +10 lines)
Lines 1460-1466 Link Here
1460
1460
1461
[% MACRO jsinclude BLOCK %]
1461
[% MACRO jsinclude BLOCK %]
1462
    [% INCLUDE 'datatables.inc' %]
1462
    [% INCLUDE 'datatables.inc' %]
1463
    [% INCLUDE 'columns_settings.inc' %]
1464
    [% INCLUDE 'calendar.inc' %]
1463
    [% INCLUDE 'calendar.inc' %]
1465
    [% Asset.js("js/pages/circulation.js") | $raw %]
1464
    [% Asset.js("js/pages/circulation.js") | $raw %]
1466
    [% Asset.js("js/modal_printer.js") | $raw %]
1465
    [% Asset.js("js/modal_printer.js") | $raw %]
Lines 1521-1533 Link Here
1521
                Dopop('/cgi-bin/koha/recalls/recall_pickup_slip.pl?recall_id=[% recall_id | uri %]');
1520
                Dopop('/cgi-bin/koha/recalls/recall_pickup_slip.pl?recall_id=[% recall_id | uri %]');
1522
            [% END %]
1521
            [% END %]
1523
1522
1524
            var returns_table = KohaTable("checkedintable", {
1523
            var returns_table = $("#checkedintable").kohaTable(
1525
                    "searching":false,
1524
                {
1526
                    "paginate":false,
1525
                    searching: false,
1527
                    "info": false,
1526
                    paginate: false,
1528
                    "ordering":false,
1527
                    info: false,
1529
                    "dom": '<"table_controls"B>rt',
1528
                    ordering: false,
1530
                    }, table_settings);
1529
                    dom: '<"table_controls"B>rt',
1530
                },
1531
                table_settings
1532
            );
1531
1533
1532
            $("#exemptcheck").change(function () {
1534
            $("#exemptcheck").change(function () {
1533
                if (this.checked == true) {
1535
                if (this.checked == true) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt (-6 / +8 lines)
Lines 324-330 Link Here
324
324
325
[% MACRO jsinclude BLOCK %]
325
[% MACRO jsinclude BLOCK %]
326
    [% INCLUDE 'datatables.inc' %]
326
    [% INCLUDE 'datatables.inc' %]
327
    [% INCLUDE 'columns_settings.inc' %]
328
    <script>
327
    <script>
329
        $(document).ready(function() {
328
        $(document).ready(function() {
330
            var holdst;
329
            var holdst;
Lines 343-353 Link Here
343
            $('#holdst thead input').on('change keyup keydown', filterColumn);
342
            $('#holdst thead input').on('change keyup keydown', filterColumn);
344
343
345
            var table_settings = [% TablesSettings.GetTableSettings('circ', 'view_holdsqueue', 'holds-table', 'json') | $raw %];
344
            var table_settings = [% TablesSettings.GetTableSettings('circ', 'view_holdsqueue', 'holds-table', 'json') | $raw %];
346
            var holdst = KohaTable("holdst", {
345
            var holdst = $("#holdst").kohaTable(
347
                "dom": 'B<"clearfix">t',
346
                {
348
                "orderCellsTop":  true,
347
                    dom: 'B<"clearfix">t',
349
                "paginate": false
348
                    orderCellsTop: true,
350
            }, table_settings);
349
                    paginate: false,
350
                },
351
                table_settings
352
            );
351
353
352
        });
354
        });
353
    </script>
355
    </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 323-329 Link Here
323
323
324
[% MACRO jsinclude BLOCK %]
324
[% MACRO jsinclude BLOCK %]
325
    [% INCLUDE 'datatables.inc' %]
325
    [% INCLUDE 'datatables.inc' %]
326
    [% INCLUDE 'columns_settings.inc' %]
327
    <script>
326
    <script>
328
        var table_settings = [% TablesSettings.GetTableSettings( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
327
        var table_settings = [% TablesSettings.GetTableSettings( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
329
        $(document).ready(function(){
328
        $(document).ready(function(){
Lines 337-346 Link Here
337
                $('#rm_items').submit();
336
                $('#rm_items').submit();
338
            });
337
            });
339
338
340
            var rtable = KohaTable("course_reserves_table", {
339
            var rtable = $("#course_reserves_table").kohaTable(
341
                "pagingType": "full",
340
                {
342
                "autoWidth": false,
341
                    pagingType: "full",
343
            }, table_settings );
342
                    autoWidth: false,
343
                },
344
                table_settings
345
            );
344
346
345
            $("#course_reserves_table").on( 'click', " .delete_item", function(e){
347
            $("#course_reserves_table").on( 'click', " .delete_item", function(e){
346
                e.preventDefault();
348
                e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt (-5 / +7 lines)
Lines 94-107 Link Here
94
94
95
[% MACRO jsinclude BLOCK %]
95
[% MACRO jsinclude BLOCK %]
96
    [% INCLUDE 'datatables.inc' %]
96
    [% INCLUDE 'datatables.inc' %]
97
    [% INCLUDE 'columns_settings.inc' %]
98
    <script>
97
    <script>
99
        var table_settings = [% TablesSettings.GetTableSettings( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %];
98
        var table_settings = [% TablesSettings.GetTableSettings( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %];
100
        $(document).ready(function() {
99
        $(document).ready(function() {
101
            var ctable = KohaTable("course_reserves_table", {
100
            var ctable = $("#course_reserves_table").kohaTable(
102
                "pagingType": "full",
101
                {
103
                "autoWidth": false
102
                    pagingType: "full",
104
            }, table_settings );
103
                    autoWidth: false,
104
                },
105
                table_settings
106
            );
105
        });
107
        });
106
    </script>
108
    </script>
107
[% END %]
109
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-6 / +8 lines)
Lines 394-400 Link Here
394
[% MACRO jsinclude BLOCK %]
394
[% MACRO jsinclude BLOCK %]
395
    [% INCLUDE 'datatables.inc' %]
395
    [% INCLUDE 'datatables.inc' %]
396
    [% INCLUDE 'format_price.inc' %]
396
    [% INCLUDE 'format_price.inc' %]
397
    [% INCLUDE 'columns_settings.inc' %]
398
    [% INCLUDE 'str/members-menu.inc' %]
397
    [% INCLUDE 'str/members-menu.inc' %]
399
    [% Asset.js("js/members-menu.js") | $raw %]
398
    [% Asset.js("js/members-menu.js") | $raw %]
400
    <script>
399
    <script>
Lines 406-416 Link Here
406
            var txtActivefilter = _("Filter paid transactions");
405
            var txtActivefilter = _("Filter paid transactions");
407
            var txtInactivefilter = _("Show all transactions");
406
            var txtInactivefilter = _("Show all transactions");
408
            var table_settings = [% TablesSettings.GetTableSettings('members', 'fines', 'account-fines', 'json') | $raw %];
407
            var table_settings = [% TablesSettings.GetTableSettings('members', 'fines', 'account-fines', 'json') | $raw %];
409
            var table_account_fines = KohaTable("table_account_fines", {
408
            var table_account_fines = $("#table_account_fines").kohaTable(
410
                "pagingType": "full",
409
                {
411
                "order": [[0, 'desc']],
410
                    pagingType: "full",
412
                "dom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
411
                    order: [[0, "desc"]],
413
            }, table_settings);
412
                    dom: 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
413
                },
414
                table_settings
415
            );
414
            $("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
416
            $("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
415
            $('#filter_transacs').click(function(e) {
417
            $('#filter_transacs').click(function(e) {
416
                e.preventDefault();
418
                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 6-12 Link Here
6
[% PROCESS 'i18n.inc' %]
6
[% PROCESS 'i18n.inc' %]
7
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
8
[% INCLUDE 'doc-head-open.inc' %]
8
[% INCLUDE 'doc-head-open.inc' %]
9
[% INCLUDE 'columns_settings.inc' %]
10
<title>[% FILTER collapse %]
9
<title>[% FILTER collapse %]
11
    [% list.name | html %] &rsaquo;
10
    [% list.name | html %] &rsaquo;
12
    [% t("Patron lists") | html %] &rsaquo;
11
    [% t("Patron lists") | html %] &rsaquo;
Lines 245-253 Link Here
245
            $('#patrons_to_add_fieldset').hide();
244
            $('#patrons_to_add_fieldset').hide();
246
245
247
                var table_settings = [% TablesSettings.GetTableSettings('members', 'patron-lists', 'patron-list-table', 'json') | $raw %]
246
                var table_settings = [% TablesSettings.GetTableSettings('members', 'patron-lists', 'patron-list-table', 'json') | $raw %]
248
                KohaTable('patron-list-table', {
247
                $("#patron-list-table").kohaTable(
249
                    "pagingType": "full"
248
                    {
250
                }, table_settings);
249
                        pagingType: "full",
250
                    },
251
                    table_settings
252
                );
251
253
252
            function AddPatron( patron_name, value, container, input_name ) {
254
            function AddPatron( patron_name, value, container, input_name ) {
253
                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>";
255
                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 272-278 Link Here
272
    [% Asset.js("js/tools-menu.js") | $raw %]
272
    [% Asset.js("js/tools-menu.js") | $raw %]
273
    [% INCLUDE 'calendar.inc' %]
273
    [% INCLUDE 'calendar.inc' %]
274
    [% INCLUDE 'datatables.inc' %]
274
    [% INCLUDE 'datatables.inc' %]
275
    [% INCLUDE 'columns_settings.inc' %]
276
    <script>
275
    <script>
277
        $(document).ready(function(){
276
        $(document).ready(function(){
278
            $(".uninstall_plugin").on("click", function(){
277
            $(".uninstall_plugin").on("click", function(){
Lines 285-292 Link Here
285
                $("#plugin-search-form").submit();
284
                $("#plugin-search-form").submit();
286
            });
285
            });
287
286
288
            KohaTable("installed_plugins", {
287
            $("#installed_plugins").kohaTable({
289
                "paginate": false
288
                paginate: false,
290
            });
289
            });
291
        });
290
        });
292
    </script>
291
    </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 342-348 Link Here
342
[% MACRO jsinclude BLOCK %]
342
[% MACRO jsinclude BLOCK %]
343
    [% INCLUDE 'calendar.inc' %]
343
    [% INCLUDE 'calendar.inc' %]
344
    [% INCLUDE 'datatables.inc' %]
344
    [% INCLUDE 'datatables.inc' %]
345
    [% INCLUDE 'columns_settings.inc' %]
346
    <script>
345
    <script>
347
        function changeRemovedDateTrStatus() {
346
        function changeRemovedDateTrStatus() {
348
            var Cellvalue = $("input[name='Cellvalue']:checked").val();
347
            var Cellvalue = $("input[name='Cellvalue']:checked").val();
Lines 366-371 Link Here
366
            });
365
            });
367
            changeRemovedDateTrStatus();
366
            changeRemovedDateTrStatus();
368
367
368
            // FIXME This does not work, we need to pass table settings, not the columns
369
            columns_settings = [% FILTER collapse %]
369
            columns_settings = [% FILTER collapse %]
370
                [
370
                [
371
                    {
371
                    {
Lines 391-400 Link Here
391
                ];
391
                ];
392
            [% END %]
392
            [% END %]
393
393
394
            var catalogue_stats = KohaTable("catalogue_stats", {
394
            var catalogue_stats = $("#catalogue_stats").kohaTable(
395
                'autoWidth': false,
395
                {
396
                'paging': false,
396
                    autoWidth: false,
397
            }, columns_settings );
397
                    paging: false,
398
                },
399
                columns_settings
400
            );
398
        });
401
        });
399
    </script>
402
    </script>
400
[% END %]
403
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-9 / +10 lines)
Lines 1563-1569 Link Here
1563
    [% INCLUDE 'calendar.inc' %]
1563
    [% INCLUDE 'calendar.inc' %]
1564
    [% INCLUDE 'datatables.inc' %]
1564
    [% INCLUDE 'datatables.inc' %]
1565
    [% IF ( saved1 ) %]
1565
    [% IF ( saved1 ) %]
1566
        [% INCLUDE 'columns_settings.inc' %]
1567
        [% Asset.js( "lib/jsdiff/jsdiff.min.js" ) | $raw %]
1566
        [% Asset.js( "lib/jsdiff/jsdiff.min.js" ) | $raw %]
1568
    [% END %]
1567
    [% END %]
1569
    [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
1568
    [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
Lines 2018-2032 Link Here
2018
2017
2019
            [% IF (saved1) %]
2018
            [% IF (saved1) %]
2020
                var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'saved-sql', 'table_reports', 'json' ) | $raw %];
2019
                var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'saved-sql', 'table_reports', 'json' ) | $raw %];
2021
                var rtable = KohaTable("table_reports", {
2020
                var rtable = $("#table_reports").kohaTable(
2022
                    "autoWidth": false,
2021
                    {
2023
                    "pagingType": 'full',
2022
                        autoWidth: false,
2024
                    "order": [[ 1, "asc" ]],
2023
                        pagingType: "full",
2025
                    "language": {
2024
                        order: [[1, "asc"]],
2026
                        "zeroRecords": _("No matching reports found")
2025
                        language: {
2026
                            zeroRecords: _("No matching reports found"),
2027
                        },
2027
                    },
2028
                    },
2028
2029
                    table_settings
2029
                }, table_settings);
2030
                );
2030
                let table_dt = rtable.DataTable();
2031
                let table_dt = rtable.DataTable();
2031
2032
2032
                $("#tabs a[data-bs-toggle='tab']").on("shown.bs.tab", function (e) {
2033
                $("#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 206-228 Link Here
206
206
207
[% MACRO jsinclude BLOCK %]
207
[% MACRO jsinclude BLOCK %]
208
    [% INCLUDE 'datatables.inc' %]
208
    [% INCLUDE 'datatables.inc' %]
209
    [% INCLUDE 'columns_settings.inc' %]
210
    <script>
209
    <script>
211
        $(document).ready(function() {
210
        $(document).ready(function() {
212
            var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %];
211
            var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %];
213
            [% IF csv_profiles.count %]
212
            [% IF csv_profiles.count %]
214
                // Add the first (checkbox) column if it is displayed
213
                // Add the first (checkbox) column if it is displayed
214
                // FIXME This cannot work without bKohaColumnsUseNames
215
                table_settings['columns'].unshift({cannot_be_modified: 1, cannot_be_toggled: 1, columnname: 'itemnumber', is_hidden: 0});
215
                table_settings['columns'].unshift({cannot_be_modified: 1, cannot_be_toggled: 1, columnname: 'itemnumber', is_hidden: 0});
216
            [% END %]
216
            [% END %]
217
217
218
            var lostitems_table = KohaTable("lostitems-table", {
218
            var lostitems_table = $("#lostitems-table").kohaTable(
219
                "order": [],
219
                {
220
                "columnDefs": [
220
                    order: [],
221
                    { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] }
221
                    columnDefs: [
222
                ],
222
                        { orderable: false, searchable: false, targets: ["NoSort"] },
223
                "autoWidth": false,
223
                    ],
224
                "paginate": false,
224
                    autoWidth: false,
225
            }, table_settings, 'with_filters');
225
                    paginate: false,
226
                },
227
                table_settings,
228
                "with_filters"
229
            );
226
230
227
            function itemSelectionBuildExportLink() {
231
            function itemSelectionBuildExportLink() {
228
                var itemnumbers = new Array();
232
                var itemnumbers = new Array();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/orders_by_budget.tt (-4 / +6 lines)
Lines 173-185 Link Here
173
173
174
[% MACRO jsinclude BLOCK %]
174
[% MACRO jsinclude BLOCK %]
175
    [% INCLUDE 'datatables.inc' %]
175
    [% INCLUDE 'datatables.inc' %]
176
    [% INCLUDE 'columns_settings.inc' %]
177
    <script>
176
    <script>
178
        var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'orders_by_fund', 'funds-table', 'json' ) | $raw %];
177
        var table_settings = [% TablesSettings.GetTableSettings( 'reports', 'orders_by_fund', 'funds-table', 'json' ) | $raw %];
179
        $(document).ready( function () {
178
        $(document).ready( function () {
180
            var funds_table = KohaTable("funds", {
179
            var funds_table = $("#funds").kohaTable(
181
                'autoWidth': false,
180
                {
182
            }, table_settings );
181
                    autoWidth: false,
182
                },
183
                table_settings
184
            );
183
185
184
            showallbudgets = $('#budgetfilter').html();
186
            showallbudgets = $('#budgetfilter').html();
185
            $('#budgetfilter .b_inactive').remove();
187
            $('#budgetfilter .b_inactive').remove();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-5 / +7 lines)
Lines 1482-1488 Link Here
1482
[% MACRO jsinclude BLOCK %]
1482
[% MACRO jsinclude BLOCK %]
1483
    [% INCLUDE 'datatables.inc' %]
1483
    [% INCLUDE 'datatables.inc' %]
1484
    [% INCLUDE 'calendar.inc' %]
1484
    [% INCLUDE 'calendar.inc' %]
1485
    [% INCLUDE 'columns_settings.inc' %]
1486
    [% INCLUDE 'select2.inc' %]
1485
    [% INCLUDE 'select2.inc' %]
1487
    [% Asset.js("js/holds.js") | $raw%]
1486
    [% Asset.js("js/holds.js") | $raw%]
1488
    [% Asset.js("js/form-submit.js") | $raw%]
1487
    [% Asset.js("js/form-submit.js") | $raw%]
Lines 1495-1504 Link Here
1495
    <script>
1494
    <script>
1496
        $(document).ready(function () {
1495
        $(document).ready(function () {
1497
            hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %];
1496
            hold_table_settings = [% TablesSettings.GetTableSettings( 'circ', 'holds', 'patron_holds_table', 'json' ) | $raw %];
1498
            KohaTable("patron_holds_table", {
1497
            $("#patron_holds_table").kohaTable(
1499
                "bPaginate":false,
1498
                {
1500
                "bKohaColumnsUseNames": true,
1499
                    bPaginate: false,
1501
           }, hold_table_settings);
1500
                    bKohaColumnsUseNames: true,
1501
                },
1502
                hold_table_settings
1503
            );
1502
        });
1504
        });
1503
        var biblionumbers = [[% biblionumbers.join(', ') | $raw %]];
1505
        var biblionumbers = [[% biblionumbers.join(', ') | $raw %]];
1504
        var borrowernumber = "[% patron.borrowernumber | $raw %]";
1506
        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 1386-1392 Link Here
1386
    [% END %]
1386
    [% END %]
1387
    [% IF op == 'else' %]
1387
    [% IF op == 'else' %]
1388
        [% INCLUDE 'datatables.inc' %]
1388
        [% INCLUDE 'datatables.inc' %]
1389
        [% INCLUDE 'columns_settings.inc' %]
1390
        <script>
1389
        <script>
1391
            $(document).ready(function() {
1390
            $(document).ready(function() {
1392
                if( $("#suggestiontabs .tab-pane.active").length < 1 ){
1391
                if( $("#suggestiontabs .tab-pane.active").length < 1 ){
Lines 1397-1406 Link Here
1397
1396
1398
                [% FOREACH suggestion IN suggestions %]
1397
                [% FOREACH suggestion IN suggestions %]
1399
                    [% IF suggestion.suggestions.size %]
1398
                    [% IF suggestion.suggestions.size %]
1400
                        KohaTable("table_[% suggestion.suggestiontype | html %]", {
1399
                        $("#table_[% suggestion.suggestiontype | html %]").kohaTable(
1401
                            "sorting": [[ 4, "asc" ]],
1400
                            {
1402
                            "autoWidth": false,
1401
                                sorting: [[4, "asc"]],
1403
                        }, table_settings );
1402
                                autoWidth: false,
1403
                            },
1404
                            table_settings
1405
                        );
1404
                    [% END %]
1406
                    [% END %]
1405
                [% END %]
1407
                [% END %]
1406
1408
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt (-2 / +1 lines)
Lines 413-419 Link Here
413
[% MACRO jsinclude BLOCK %]
413
[% MACRO jsinclude BLOCK %]
414
    [% INCLUDE 'datatables.inc' %]
414
    [% INCLUDE 'datatables.inc' %]
415
    [% INCLUDE 'calendar.inc' %]
415
    [% INCLUDE 'calendar.inc' %]
416
    [% INCLUDE 'columns_settings.inc' %]
417
    <script>
416
    <script>
418
        function checkForm() {
417
        function checkForm() {
419
            if ( $('#uploadbarcodes').val() && $('#barcodelist').val() ) {
418
            if ( $('#uploadbarcodes').val() && $('#barcodelist').val() ) {
Lines 467-473 Link Here
467
466
468
        $(document).ready(function(){
467
        $(document).ready(function(){
469
            var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'inventory', 'inventoryt', 'json' ) | $raw %];
468
            var table_settings = [% TablesSettings.GetTableSettings( 'tools', 'inventory', 'inventoryt', 'json' ) | $raw %];
470
            inventorydt = KohaTable("inventoryt", {
469
            inventorydt = $("#inventoryt").kohaTable({
471
                "pagingType": 'full_numbers',
470
                "pagingType": 'full_numbers',
472
                [% IF compareinv2barcd %]
471
                [% IF compareinv2barcd %]
473
                    // sort on callnumber
472
                    // sort on callnumber
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (-5 / +7 lines)
Lines 484-490 Link Here
484
[% MACRO jsinclude BLOCK %]
484
[% MACRO jsinclude BLOCK %]
485
    [% INCLUDE 'calendar.inc' %]
485
    [% INCLUDE 'calendar.inc' %]
486
    [% INCLUDE 'datatables.inc' %]
486
    [% INCLUDE 'datatables.inc' %]
487
    [% INCLUDE 'columns_settings.inc' %]
488
    [% Asset.js("js/tools-menu.js") | $raw %]
487
    [% Asset.js("js/tools-menu.js") | $raw %]
489
    [% Asset.js("js/members-patron-selections.js") | $raw %]
488
    [% Asset.js("js/members-patron-selections.js") | $raw %]
490
    <script>
489
    <script>
Lines 502-511 Link Here
502
        [% END %]
501
        [% END %]
503
        $(document).ready(function() {
502
        $(document).ready(function() {
504
            [% IF borrowers %]
503
            [% IF borrowers %]
505
                let patron_table = KohaTable("borrowerst", {
504
                let patron_table = $("#borrowerst").kohaTable(
506
                    "order": [[ 1, "asc" ]],
505
                    {
507
                    "autoWidth": true,
506
                        order: [[1, "asc"]],
508
                }, table_settings);
507
                        autoWidth: true,
508
                    },
509
                    table_settings
510
                );
509
511
510
                $("#selectallbutton").click(function() {
512
                $("#selectallbutton").click(function() {
511
                    $("#borrowerst").find("input:checkbox").each(function() {
513
                    $("#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