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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-7 / +8 lines)
Lines 1155-1171 Link Here
1155
        $(document).ready(function() {
1155
        $(document).ready(function() {
1156
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
1156
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
1157
            [% IF !(Koha.Preference('EDIFACT') && ediaccount) %]
1157
            [% IF !(Koha.Preference('EDIFACT') && ediaccount) %]
1158
                // FIXME This cannot work correctly without bKohaColumnsUseNames
1158
                table_settings['columns'].splice(18, 1);
1159
                table_settings['columns'].splice(18, 1);
1159
            [% END %]
1160
            [% END %]
1160
            KohaTable("orders", {
1161
            $("#orders").kohaTable({
1161
                "pagingType": "full",
1162
                pagingType: "full",
1162
                "autoWidth": false,
1163
                autoWidth: false,
1163
                "exportColumns": [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18[% IF (Koha.Preference('EDIFACT') && ediaccount) %],19[% END %]],
1164
                exportColumns: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18[% IF (Koha.Preference('EDIFACT') && ediaccount) %],19[% END %]],
1164
            }, table_settings);
1165
            }, table_settings);
1165
1166
1166
            var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
1167
            $("#cancelledorderst").kohaTable({
1167
                "pagingType": "full"
1168
                pagingType: "full"
1168
            } ) );
1169
            });
1169
            $("#reopenform").on("submit",function(e){
1170
            $("#reopenform").on("submit",function(e){
1170
                var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
1171
                var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
1171
                var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
1172
                var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt (-27 / +25 lines)
Lines 399-432 Link Here
399
                $("#basket_groups a[href='#opened']").tab("show");
399
                $("#basket_groups a[href='#opened']").tab("show");
400
            [% END %]
400
            [% END %]
401
            [% UNLESS ( grouping ) %]
401
            [% UNLESS ( grouping ) %]
402
                $("table").dataTable($.extend(true, {}, dataTablesDefaults, {
402
                let dt_params = {
403
                    "columnDefs": [
403
                    columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
404
                        { "targets": [ -1 ], "orderable": false, "searchable":  false },
404
                    autoWidth: false,
405
                    ],
405
                    pagingType: "full",
406
                    "autoWidth": false,
406
                };
407
                    "pagingType": "full"
407
                $("#ungrouped").kohaTable(dt_params);
408
                } ));
408
                $("#grouped").kohaTable(dt_params);
409
                $("#basket_group_opened").kohaTable(dt_params);
410
                $("#basket_group_closed").kohaTable(dt_params);
409
            [% ELSE %]
411
            [% ELSE %]
410
                grouped = $("#grouped").DataTable($.extend(true, {}, dataTablesDefaults, {
412
                grouped = $("#grouped").kohaTable({
411
                    "dom": 't',
413
                    dom: "t",
412
                    "columnDefs": [
414
                    columnDefs: [{ sortable: false, targets: ["NoSort"] }],
413
                        { 'sortable': false, 'targets': [ 'NoSort' ] }
415
                    autoWidth: false,
414
                    ],
416
                    language: {
415
                    'autoWidth': false,
417
                        emptyTable: _("There are no baskets in this group"),
416
                    "language": {
418
                    },
417
                        "emptyTable": _("There are no baskets in this group")
419
                });
418
                    }
420
                ungrouped = $("#ungrouped").kohaTable({
419
                } ));
421
                    dom: "t",
420
                ungrouped = $("#ungrouped").DataTable($.extend(true, {}, dataTablesDefaults, {
422
                    columnDefs: [{ sortable: false, targets: ["NoSort"] }],
421
                    "dom": 't',
423
                    autoWidth: false,
422
                    "columnDefs": [
424
                    language: {
423
                        { 'sortable': false, 'targets': [ 'NoSort' ] }
425
                        emptyTable: _("There are no ungrouped baskets"),
424
                    ],
426
                    },
425
                    'autoWidth': false,
427
                });
426
                    "language": {
427
                        "emptyTable": _("There are no ungrouped baskets")
428
                    }
429
                } ));
430
            [% END %]
428
            [% END %]
431
429
432
            $("#basketgroupcolumns").on("click", ".addtogroup", function(){
430
            $("#basketgroupcolumns").on("click", ".addtogroup", function(){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt (-10 / +8 lines)
Lines 262-277 Link Here
262
    [% Asset.js("js/acq.js") | $raw %]
262
    [% Asset.js("js/acq.js") | $raw %]
263
    <script>
263
    <script>
264
        $(document).ready(function() {
264
        $(document).ready(function() {
265
            $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
265
            $("table.baskets").kohaTable({
266
                "dom": 't',
266
                dom: "t",
267
                "paginate": false,
267
                paginate: false,
268
                "searching": false,
268
                searching: false,
269
                "info": false,
269
                info: false,
270
                "order": [[ 1, "asc" ]],
270
                order: [[1, "asc"]],
271
                "columnDefs": [
271
                columnDefs: [{ targets: [-1], orderable: false }],
272
                    { "targets": [-1], "orderable": false }
272
            });
273
                ]
274
            }));
275
            $("#supplierlist").change(function() {
273
            $("#supplierlist").change(function() {
276
                var id = $(this).find("option:selected").val();
274
                var id = $(this).find("option:selected").val();
277
                window.location.href = "#vendor" + id;
275
                window.location.href = "#vendor" + id;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt (-6 / +6 lines)
Lines 129-142 Link Here
129
    [% INCLUDE 'datatables.inc' %]
129
    [% INCLUDE 'datatables.inc' %]
130
    <script>
130
    <script>
131
        $(document).ready(function() {
131
        $(document).ready(function() {
132
            $("#invoice_files_details_table").dataTable($.extend(true, {}, dataTablesDefaults, {
132
            $("#invoice_files_details_table").kohaTable({
133
                "columnDefs": [
133
                columnDefs: [
134
                    { "targets": [ -1, -2 ], "orderable": false, "searchable":  false }
134
                    { "targets": [ -1, -2 ], "orderable": false, "searchable":  false }
135
                ],
135
                ],
136
                "info": false,
136
                info: false,
137
                "paging": false,
137
                paging: false,
138
                "searching": false,
138
                searching: false,
139
                "dom": "t"
139
                dom: "t"
140
            }));
140
            }));
141
            $(".delete_file").click(function(){
141
            $(".delete_file").click(function(){
142
                return ( confirm( _("Are you sure you want to delete this file?") ) );
142
                return ( confirm( _("Are you sure you want to delete this file?") ) );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt (-15 / +13 lines)
Lines 561-582 Link Here
561
        }
561
        }
562
562
563
        $(document).ready(function() {
563
        $(document).ready(function() {
564
            $("#orderst").dataTable($.extend(true, {}, dataTablesDefaults, {
564
            $("#orderst").kohaTable({
565
                "info": false,
565
                info: false,
566
                "paging": false,
566
                paging: false,
567
                "searching": false,
567
                searching: false,
568
                "dom": "t",
568
                dom: "t",
569
                "columnDefs": [
569
                columnDefs: [{ type: "anti-the", targets: ["anti-the"] }],
570
                    { "type": "anti-the", "targets": [ "anti-the" ] }
570
            });
571
                ]
572
            }));
573
            [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %]
571
            [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %]
574
                $("#invoice_files_table").dataTable($.extend(true, {}, dataTablesDefaults, {
572
                $("#invoice_files_table").kohaTable({
575
                    "info": false,
573
                    info: false,
576
                    "paging": false,
574
                    paging: false,
577
                    "searching": false,
575
                    searching: false,
578
                    "dom": "t"
576
                    dom: "t",
579
                }));
577
                });
580
            [% END %]
578
            [% END %]
581
            $("#show_all_details").click(function(){
579
            $("#show_all_details").click(function(){
582
                updateColumnsVisibility( $(this).is(":checked") );
580
                updateColumnsVisibility( $(this).is(":checked") );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt (-7 / +7 lines)
Lines 441-454 Link Here
441
            $(".delete_invoice").click(function(){
441
            $(".delete_invoice").click(function(){
442
                return confirmDelete(_("Are you sure you want to delete this invoice?"));
442
                return confirmDelete(_("Are you sure you want to delete this invoice?"));
443
            });
443
            });
444
            var resultst = $("table.result").dataTable($.extend(true, {}, dataTablesDefaults, {
444
            var resultst = $("table.result").kohaTable({
445
                "paging": false,
445
                paging: false,
446
                "columnDefs": [
446
                columnDefs: [
447
                    { "orderable": false, "targets": [1, -1] },
447
                    { orderable: false, targets: [1, -1] },
448
                    { "visible": false, "targets": [0] }
448
                    { visible: false, targets: [0] },
449
                ],
449
                ],
450
                autoWidth: false
450
                autoWidth: false,
451
            }));
451
            });
452
452
453
            $(".show_only_subscription").prop("checked", false);
453
            $(".show_only_subscription").prop("checked", false);
454
454
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt (-6 / +6 lines)
Lines 134-146 Link Here
134
        }
134
        }
135
135
136
        $(document).ready(function() {
136
        $(document).ready(function() {
137
            $("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, {
137
            $("#srlt").kohaTable({
138
                "columnDefs": [
138
                columnDefs: [
139
                    { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] },
139
                    { orderable: false, searchable: false, targets: ["NoSort"] },
140
                    { "type": "anti-the", "targets":  [ "anti-the" ] }
140
                    { type: "anti-the", targets: ["anti-the"] },
141
                ],
141
                ],
142
                "pagingType": "full"
142
                pagingType: "full",
143
            }));
143
            });
144
144
145
            $("#show_only_renewed").click(function(){
145
            $("#show_only_renewed").click(function(){
146
                updateRowsVisibility( $(this).is(":checked") );
146
                updateRowsVisibility( $(this).is(":checked") );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt (-6 / +6 lines)
Lines 130-142 Link Here
130
    [% INCLUDE 'calendar.inc' %]
130
    [% INCLUDE 'calendar.inc' %]
131
    <script>
131
    <script>
132
    $(document).ready(function() {
132
    $(document).ready(function() {
133
        var suggestionst = $("#suggestionst").dataTable($.extend(true, {}, dataTablesDefaults, {
133
        var suggestionst = $("#suggestionst").kohaTable({
134
            "columnDefs": [
134
            columnDefs: [
135
                { "targets": [ 0 ],  "visible": false, "searchable":  true }, // must be searchable for filtering
135
                { targets: [0], visible: false, searchable: true }, // must be searchable for filtering
136
                { "targets": [ -1 ], "orderable": false, "searchable":  false },
136
                { targets: [-1], orderable: false, searchable: false },
137
            ],
137
            ],
138
            "pagingType": "full"
138
            pagingType: "full",
139
        }));
139
        });
140
        let table_dt = suggestionst.DataTable();
140
        let table_dt = suggestionst.DataTable();
141
        $("#show_only_mine").on('click', function(e){
141
        $("#show_only_mine").on('click', function(e){
142
            e.preventDefault();
142
            e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt (-6 / +4 lines)
Lines 142-153 Link Here
142
    [% INCLUDE 'datatables.inc' %]
142
    [% INCLUDE 'datatables.inc' %]
143
    <script>
143
    <script>
144
        $(document).ready(function() {
144
        $(document).ready(function() {
145
            $("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
145
            $("#spent").kohaTable({
146
                "columnDefs": [
146
                columnDefs: [{ type: "anti-the", targets: ["anti-the"] }],
147
                    { "type": "anti-the", "targets":  [ "anti-the" ] }
147
                pagingType: "full",
148
                ],
148
            });
149
                "pagingType": "full"
150
            }));
151
        });
149
        });
152
    </script>
150
    </script>
153
[% END %]
151
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt (-15 / +16 lines)
Lines 372-390 Link Here
372
            });
372
            });
373
373
374
            if ( $("#receivedt").length ) {
374
            if ( $("#receivedt").length ) {
375
                var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
375
                var receivedt = $("#receivedt").kohaTable({
376
                    "stateSave": true, // We do not have table settings on this table
376
                    stateSave: true, // We do not have table settings on this table
377
                    "pageLength": 10,
377
                    pageLength: 10,
378
                    "lengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
378
                    lengthMenu: [
379
                    "columnDefs": [
379
                        [5, 10, 20, 50, 100, -1],
380
                        { "targets": [ 5, -1 ], "orderable": false, "searchable":  false },
380
                        [5, 10, 20, 50, 100, _("All")],
381
                    ],
381
                    ],
382
                    "columns": [
382
                    columnDefs: [{ targets: [5, -1], orderable: false, searchable: false }],
383
                        { "type": "html" },
383
                    columns: [
384
                        { "type": "html" },
384
                        { type: "html" },
385
                        { "type": "html" },
385
                        { type: "html" },
386
                        { "type": "num-html" },
386
                        { type: "html" },
387
                        { "type": "anti-the" },
387
                        { type: "num-html" },
388
                        { type: "anti-the" },
389
                        null,
388
                        null,
390
                        null,
389
                        null,
391
                        null,
390
                        null,
392
                        null,
Lines 392-401 Link Here
392
                        null,
394
                        null,
393
                        null,
395
                        null,
394
                        null,
396
                        null,
395
                        null
396
                    ],
397
                    ],
397
                    "pagingType": "full"
398
                    pagingType: "full",
398
                }));
399
                });
399
            }
400
            }
400
401
401
            var options = {
402
            var options = {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt (-3 / +3 lines)
Lines 260-268 Link Here
260
    [% INCLUDE 'datatables.inc' %]
260
    [% INCLUDE 'datatables.inc' %]
261
    <script>
261
    <script>
262
        $(document).ready(function() {
262
        $(document).ready(function() {
263
            var parcelst = $("#parcelst").dataTable($.extend(true, {}, dataTablesDefaults, {
263
            $("#parcelst").kohaTable({
264
                "paginate": false
264
                paginate: false
265
            }));
265
            });
266
266
267
            //keep a copy of all budgets before removing the inactives
267
            //keep a copy of all budgets before removing the inactives
268
            var budgetId = $("#shipmentcost_budgetid");
268
            var budgetId = $("#shipmentcost_budgetid");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt (-6 / +4 lines)
Lines 157-168 Link Here
157
    [% INCLUDE 'datatables.inc' %]
157
    [% INCLUDE 'datatables.inc' %]
158
    <script>
158
    <script>
159
        $(document).ready(function() {
159
        $(document).ready(function() {
160
            $("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
160
            $("#spent").kohaTable({
161
                "columnDefs": [
161
                columnDefs: [{ type: "anti-the", targets: ["anti-the"] }],
162
                    { "type": "anti-the", "targets":  [ "anti-the" ] }
162
                pagingType: "full",
163
                ],
163
            });
164
                "pagingType": "full"
165
            } ) );
166
        });
164
        });
167
    </script>
165
    </script>
168
[% END %]
166
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt (-5 / +5 lines)
Lines 689-700 Link Here
689
        }
689
        }
690
690
691
         $(document).ready(function() {
691
         $(document).ready(function() {
692
            var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, {
692
            var contractst = $("#contractst").kohaTable({
693
                "columnDefs": [
693
                columnDefs: [
694
                    { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] }
694
                    { orderable: false, searchable:  false, targets: [ 'NoSort' ] }
695
                ],
695
                ],
696
                "dom": 't'
696
                dom: 't'
697
            } ) );
697
            } );
698
            $('body').on('click', '.delete-contact', null, delete_contact);
698
            $('body').on('click', '.delete-contact', null, delete_contact);
699
            $('#add-contact').click(add_contact);
699
            $('#add-contact').click(add_contact);
700
            $('body').on('click', '.contact_acqprimary', null, function () {
700
            $('body').on('click', '.contact_acqprimary', null, function () {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt (-6 / +4 lines)
Lines 183-194 Link Here
183
    [% INCLUDE 'datatables.inc' %]
183
    [% INCLUDE 'datatables.inc' %]
184
    <script>
184
    <script>
185
        $(document).ready(function() {
185
        $(document).ready(function() {
186
            var uncertainpricet = $("#uncertainpricet").dataTable($.extend(true, {}, dataTablesDefaults, {
186
            var uncertainpricet = $("#uncertainpricet").kohaTable({
187
                "columnDefs": [
187
                columnDefs: [{ orderable: false, searchable: false, targets: ["NoSort"] }],
188
                    { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] },
188
                pagingType: "full",
189
                ],
189
            });
190
                "pagingType": "full"
191
            }));
192
            $(".check_uncertain").on("change",function(){
190
            $(".check_uncertain").on("change",function(){
193
                var form = document.getElementById("uncertainprices");
191
                var form = document.getElementById("uncertainprices");
194
                var ordernumber = $(this).data("ordernumber");
192
                var ordernumber = $(this).data("ordernumber");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt (-9 / +9 lines)
Lines 311-326 tr.selected td { Link Here
311
    [% Asset.js("js/z3950_search.js") | $raw %]
311
    [% Asset.js("js/z3950_search.js") | $raw %]
312
    <script>
312
    <script>
313
        $(document).ready(function(){
313
        $(document).ready(function(){
314
            var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
314
            var resultst = $("#resultst").kohaTable({
315
                "columnDefs": [
315
                columnDefs: [
316
                    { "targets": [ -1, -2 ], "orderable": false, "searchable":  false },
316
                    { targets: [-1, -2], orderable: false, searchable: false },
317
                    { "targets": [ 1 ], "type": "nsb-nse" },
317
                    { targets: [1], type: "nsb-nse" },
318
                ],
318
                ],
319
                "order": [[ 1, "asc" ]],
319
                order: [[1, "asc"]],
320
                "paginate": false,
320
                paginate: false,
321
                "searching": false,
321
                searching: false,
322
                "info": false
322
                info: false,
323
            }));
323
            });
324
            InitLastAction();
324
            InitLastAction();
325
        });
325
        });
326
    </script>
326
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt (-8 / +11 lines)
Lines 298-311 Link Here
298
                $('#selecttable').submit();
298
                $('#selecttable').submit();
299
            });
299
            });
300
300
301
            $("#fieldst").dataTable($.extend(true, {}, dataTablesDefaults, {
301
            $("#fieldst").kohaTable({
302
                "autoWidth": false,
302
                autoWidth: false,
303
                "dom": 't<"bottom pager"ilpf>',
303
                dom: 't<"bottom pager"ilpf>',
304
                "pagingType": 'full',
304
                pagingType: "full",
305
                "lengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
305
                lengthMenu: [
306
                "pageLength": 20,
306
                    [10, 20, 50, 100, -1],
307
                "order": [[ 0, "asc" ]],
307
                    [10, 20, 50, 100, "All"],
308
            }));
308
                ],
309
                pageLength: 20,
310
                order: [[0, "asc"]],
311
            });
309
312
310
            $("#add_field").on('submit', function() {
313
            $("#add_field").on('submit', function() {
311
                if ( $("#marcfield").length && $("select[name='authorised_value_category']").length ) {
314
                if ( $("#marcfield").length && $("select[name='authorised_value_category']").length ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt (-12 / +13 lines)
Lines 564-581 Link Here
564
                $("#budgetsTabs li:eq([% tab | html %]) a").tab("show");
564
                $("#budgetsTabs li:eq([% tab | html %]) a").tab("show");
565
            [% END %]
565
            [% END %]
566
566
567
            $("#activeperiodst,#inactiveperiodst").dataTable($.extend(true, {}, dataTablesDefaults, {
567
            let dt_params = {
568
                "columnDefs": [
568
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
569
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
569
                pagingType: "full",
570
                ],
570
                autoWidth: false,
571
                "pagingType": "full",
571
            };
572
                "autoWidth": false
572
573
            } ) );
573
            $("#activeperiodst").kohaTable(dt_params);
574
            $("#inactiveperiodst").kohaTable(dt_params);
574
575
575
            [% IF close_form %]
576
            [% IF close_form %]
576
              $("#budgeth").dataTable($.extend(true, {}, dataTablesDefaults, {
577
                $("#budgeth").kohaTable({
577
                "dom": "t"
578
                    dom: "t",
578
              }));
579
                });
579
              $("#move_form").submit(function(){
580
              $("#move_form").submit(function(){
580
                var budget_from = "[% budget_period_description | html %]";
581
                var budget_from = "[% budget_period_description | html %]";
581
                var budget_to = $("#to_budget_period_id").find("option:selected").html();
582
                var budget_to = $("#to_budget_period_id").find("option:selected").html();
Lines 585-591 Link Here
585
              });
586
              });
586
            [% END %]
587
            [% END %]
587
            [% IF closed %]
588
            [% IF closed %]
588
              var oTable = $("#closed_report").dataTable($.extend(true, {}, dataTablesDefaults, {
589
              var oTable = $("#closed_report").kohaTable({
589
                // The following is a c/p from aqbudgets.tt and is a candidate for refactoring.
590
                // The following is a c/p from aqbudgets.tt and is a candidate for refactoring.
590
                "drawCallback": function ( oSettings ) {
591
                "drawCallback": function ( oSettings ) {
591
                    if ( oSettings.aiDisplay.length == 0 )
592
                    if ( oSettings.aiDisplay.length == 0 )
Lines 621-627 Link Here
621
                "orderFixed": [[ 1, 'asc' ]],
622
                "orderFixed": [[ 1, 'asc' ]],
622
                "autoWidth": false,
623
                "autoWidth": false,
623
                "pagingType": "full_numbers"
624
                "pagingType": "full_numbers"
624
              }));
625
              });
625
            [% END %]
626
            [% END %]
626
            $("#add_modify_budget").validate({
627
            $("#add_modify_budget").validate({
627
                rules: {
628
                rules: {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt (-6 / +4 lines)
Lines 410-422 Link Here
410
    [% Asset.js("js/admin-menu.js") | $raw %]
410
    [% Asset.js("js/admin-menu.js") | $raw %]
411
    <script>
411
    <script>
412
        $(document).ready(function() {
412
        $(document).ready(function() {
413
            $("#table_authsubfieldstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
413
            $("#table_authsubfieldstructure").kohaTable({
414
                "columnDefs": [
414
                columnDefs: [{ sortable: false, targets: ["NoSort"] }],
415
                    { 'sortable': false, 'targets': [ 'NoSort' ] }
416
                ],
417
                aaSorting: [],
415
                aaSorting: [],
418
                paginate: false
416
                paginate: false,
419
            }));
417
            });
420
418
421
            if ($("#subfieldtabs").length > 0) {
419
            if ($("#subfieldtabs").length > 0) {
422
                [% IF ( tagsubfield && tagsubfield == "@") %]
420
                [% IF ( tagsubfield && tagsubfield == "@") %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt (-6 / +4 lines)
Lines 297-308 Link Here
297
    [% Asset.js("js/admin-menu.js") | $raw %]
297
    [% Asset.js("js/admin-menu.js") | $raw %]
298
    <script>
298
    <script>
299
        $(document).ready(function() {
299
        $(document).ready(function() {
300
            $("#table_authtagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
300
            $("#table_authtagstructure").kohaTable({
301
                "columnDefs": [
301
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
302
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
302
                pagingType: "full",
303
                ],
303
            });
304
                "pagingType": "full"
305
            }));
306
        });
304
        });
307
    </script>
305
    </script>
308
[% END %]
306
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt (-6 / +7 lines)
Lines 166-177 Link Here
166
                })
166
                })
167
            });
167
            });
168
168
169
            $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
169
170
                "columnDefs": [
170
            [% FOREACH codes_loo IN codes_loop %]
171
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
171
                $("#[% codes_loo.code | html %]table").kohaTable({
172
                ],
172
                    columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
173
                "paginate": false
173
                    paginate: false,
174
            }));
174
                });
175
            [% END %]
175
        });
176
        });
176
    </script>
177
    </script>
177
[% END %]
178
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt (-7 / +5 lines)
Lines 263-275 Link Here
263
    }
263
    }
264
264
265
    $(document).ready(function() {
265
    $(document).ready(function() {
266
        var crtable = $("#table_cash_registers").DataTable($.extend(true, {}, dataTablesDefaults, {
266
        var crtable = $("#table_cash_registers").kohaTable({
267
              "columnDefs": [
267
            columnDefs: [{ targets: [-1, -2], orderable: false, searchable: false }],
268
                  { "targets": [ -1, -2 ], "orderable": false, "searchable": false },
268
            order: [[1, "asc"]],
269
               ],
269
            paginationType: "full",
270
               "order": [[ 1, "asc" ]],
270
        });
271
               "paginationType": "full",
272
        }));
273
271
274
        $("#branch_filter").on("change", function(){
272
        $("#branch_filter").on("change", function(){
275
            // Table must be filtered by the <option>'s text, not its value
273
            // Table must be filtered by the <option>'s text, not its value
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt (-2 / +2 lines)
Lines 248-254 Link Here
248
        $(document).ready(function() {
248
        $(document).ready(function() {
249
            var txtActivefilter = _("Filter system credit types");
249
            var txtActivefilter = _("Filter system credit types");
250
            var txtInactivefilter = _("Show all credit types");
250
            var txtInactivefilter = _("Show all credit types");
251
            var table_credit_types = $("#table_credit_types").dataTable($.extend(true, {}, dataTablesDefaults, {
251
            var table_credit_types = $("#table_credit_types").kohaTable({
252
                "columnDefs": [
252
                "columnDefs": [
253
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
253
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
254
                    { "targets": [ 0, 1 ], "orderable": false, "visible": false },
254
                    { "targets": [ 0, 1 ], "orderable": false, "visible": false },
Lines 257-263 Link Here
257
                "dom": 'C<"top pager"ilpfB><"#filter_s">tr<"bottom pager"ip>',
257
                "dom": 'C<"top pager"ilpfB><"#filter_s">tr<"bottom pager"ip>',
258
                "pageLength": 20,
258
                "pageLength": 20,
259
                "pagingType": "full_numbers"
259
                "pagingType": "full_numbers"
260
            }));
260
            });
261
            $("#filter_s").html('<p><a href="#" id="filter_system"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
261
            $("#filter_s").html('<p><a href="#" id="filter_system"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
262
            $('#filter_system').click(function(e) {
262
            $('#filter_system').click(function(e) {
263
                e.preventDefault();
263
                e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt (-2 / +2 lines)
Lines 268-274 Link Here
268
        $(document).ready(function() {
268
        $(document).ready(function() {
269
            var txtActivefilter = _("Filter system debit types");
269
            var txtActivefilter = _("Filter system debit types");
270
            var txtInactivefilter = _("Show all debit types");
270
            var txtInactivefilter = _("Show all debit types");
271
            var table_debit_types = $("#table_debit_types").dataTable($.extend(true, {}, dataTablesDefaults, {
271
            var table_debit_types = $("#table_debit_types").kohaTable({
272
                "columnDefs": [
272
                "columnDefs": [
273
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
273
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
274
                    { "targets": [ 0, 1 ], "orderable": false, "visible": false },
274
                    { "targets": [ 0, 1 ], "orderable": false, "visible": false },
Lines 277-283 Link Here
277
                "dom": 'C<"top pager"ilpfB><"#filter_s">tr<"bottom pager"ip>',
277
                "dom": 'C<"top pager"ilpfB><"#filter_s">tr<"bottom pager"ip>',
278
                "pageLength": 20,
278
                "pageLength": 20,
279
                "pagingType": "full_numbers"
279
                "pagingType": "full_numbers"
280
            }));
280
            });
281
            $("#filter_s").html('<p><a href="#" id="filter_system"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
281
            $("#filter_s").html('<p><a href="#" id="filter_system"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
282
            $('#filter_system').click(function(e) {
282
            $('#filter_system').click(function(e) {
283
                e.preventDefault();
283
                e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt (-6 / +4 lines)
Lines 113-124 Link Here
113
            }
113
            }
114
        }
114
        }
115
        $(document).ready(function() {
115
        $(document).ready(function() {
116
            $("#kohafields").dataTable($.extend(true, {}, dataTablesDefaults, {
116
            $("#kohafields").kohaTable({
117
                "columnDefs": [
117
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
118
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
118
                paging: false,
119
                ],
119
            });
120
                "paging":   false
121
            } ));
122
120
123
            $(".addfld").on("click", function(e){
121
            $(".addfld").on("click", function(e){
124
                e.preventDefault();
122
                e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt (-8 / +6 lines)
Lines 184-197 Link Here
184
        $(document).ready(function() {
184
        $(document).ready(function() {
185
            $(".dialog").hide();
185
            $(".dialog").hide();
186
186
187
            var table = $("#localization").DataTable($.extend(true, {}, dataTablesDefaults, {
187
            var table = $("#localization").kohaTable({
188
                "dom": 't',
188
                dom: "t",
189
                "columnDefs": [
189
                columnDefs: [{ sortable: false, targets: ["NoSort"] }],
190
                    { 'sortable': false, 'targets': [ 'NoSort' ] }
190
                paginate: false,
191
                ],
191
                autoWidth: false,
192
                "paginate": false,
192
            });
193
                'autoWidth': false,
194
            }));
195
193
196
            var languages_select = $('<select name="lang" id="lang"></select>');
194
            var languages_select = $('<select name="lang" id="lang"></select>');
197
            [% FOR language IN languages %]
195
            [% FOR language IN languages %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt (-2 / +2 lines)
Lines 365-371 Link Here
365
                });
365
                });
366
        }
366
        }
367
367
368
        $('#marc-overlay-rules').dataTable($.extend(true, {}, dataTablesDefaults, {
368
        $('#marc-overlay-rules').kohaTable({
369
            "columns": [
369
            "columns": [
370
                {"searchable":  false, "orderable": false},
370
                {"searchable":  false, "orderable": false},
371
                {"orderDataType": "dom-input"},
371
                {"orderDataType": "dom-input"},
Lines 380-386 Link Here
380
                {"searchable":  false, "orderable": false}
380
                {"searchable":  false, "orderable": false}
381
            ],
381
            ],
382
            "pagingType": "simple"
382
            "pagingType": "simple"
383
        }));
383
        });
384
384
385
        var overlay_rules_presets = {};
385
        var overlay_rules_presets = {};
386
        overlay_rules_presets["protect"] = {
386
        overlay_rules_presets["protect"] = {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt (-6 / +4 lines)
Lines 310-321 Link Here
310
    [% Asset.js("js/admin-menu.js") | $raw %]
310
    [% Asset.js("js/admin-menu.js") | $raw %]
311
    <script>
311
    <script>
312
        $(document).ready(function() {
312
        $(document).ready(function() {
313
            $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
313
            $("#table_marctagstructure").kohaTable({
314
                "columnDefs": [
314
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
315
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
315
                pagingType: "full",
316
                ],
316
            });
317
                "pagingType": "full"
318
            }));
319
            $("#select_display").on("change",function(){
317
            $("#select_display").on("change",function(){
320
                var checked = $(this).prop("checked") ? 1: 0;
318
                var checked = $(this).prop("checked") ? 1: 0;
321
                Cookies.set("marctagstructure_selectdisplay", checked, { sameSite: 'Lax' });
319
                Cookies.set("marctagstructure_selectdisplay", checked, { sameSite: 'Lax' });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_servers.tt (-6 / +4 lines)
Lines 220-231 Link Here
220
            });
220
            });
221
        [% ELSE %]
221
        [% ELSE %]
222
            $(document).ready(function() {
222
            $(document).ready(function() {
223
                $("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, {
223
                $("#serverst").kohaTable({
224
                    "columnDefs": [
224
                    columnDefs: [{ sortable: false, targets: ["NoSort"] }],
225
                        { 'sortable': false, 'targets': [ 'NoSort' ] }
225
                    pagingType: "full",
226
                    ],
226
                });
227
                    "pagingType": "full",
228
                }));
229
                $(".delete").on("click",function(e){
227
                $(".delete").on("click",function(e){
230
                    var servername = $(this).data("servername");
228
                    var servername = $(this).data("servername");
231
                    let formid = $(this).data("formid");
229
                    let formid = $(this).data("formid");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/overdrive.tt (-6 / +4 lines)
Lines 83-94 Link Here
83
    [% INCLUDE 'datatables.inc' %]
83
    [% INCLUDE 'datatables.inc' %]
84
    <script>
84
    <script>
85
        $(document).ready(function() {
85
        $(document).ready(function() {
86
            $("#od_info").dataTable($.extend(true, {}, dataTablesDefaults, {
86
            $("#od_info").kohaTable({
87
                "columnDefs": [
87
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
88
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
88
                pagingType: "full",
89
                ],
89
            });
90
                "pagingType": "full"
91
            }));
92
        });
90
        });
93
    </script>
91
    </script>
94
[% END %]
92
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt (-7 / +7 lines)
Lines 462-474 Link Here
462
        [% INCLUDE 'datatables.inc' %]
462
        [% INCLUDE 'datatables.inc' %]
463
        <script>
463
        <script>
464
             $(document).ready(function() {
464
             $(document).ready(function() {
465
                [% IF ( loop ) %]$("#sysprefst").dataTable($.extend(true, {}, dataTablesDefaults, {
465
                [% IF ( loop ) %]
466
                    "dom": '<"top pager"ilf>t',
466
                    $("#sysprefst").kohaTable({
467
                    "columnDefs": [
467
                        dom: '<"top pager"ilf>t',
468
                        { "targets": [ -1, -2, -3 ], "orderable": false }
468
                        columnDefs: [{ targets: [-1, -2, -3], orderable: false }],
469
                    ],
469
                        paginate: false,
470
                    "paginate": false
470
                    });
471
                }));[% END %]
471
                [% END %]
472
             });
472
             });
473
        </script>
473
        </script>
474
    [% END %]
474
    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt (-6 / +4 lines)
Lines 325-336 Link Here
325
            }
325
            }
326
        [% ELSE %]
326
        [% ELSE %]
327
            $(document).ready(function() {
327
            $(document).ready(function() {
328
                $("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, {
328
                $("#serverst").kohaTable({
329
                    "columnDefs": [
329
                    columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
330
                        { "targets": [-1], "orderable": false, "searchable":  false },
330
                    pagingType: "full",
331
                    ],
331
                });
332
                    "pagingType": "full"
333
                }));
334
                $(".delete").on("click",function(e){
332
                $(".delete").on("click",function(e){
335
                    var servername = $(this).data("servername");
333
                    var servername = $(this).data("servername");
336
                    let formid = $(this).data("formid");
334
                    let formid = $(this).data("formid");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-6 / +6 lines)
Lines 2026-2038 Link Here
2026
            [% END %]
2026
            [% END %]
2027
2027
2028
            [% IF suggestions.count %]
2028
            [% IF suggestions.count %]
2029
                $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
2029
                $("#suggestions").kohaTable({
2030
                    "columnDefs": [
2030
                    columnDefs: [
2031
                        { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] },
2031
                        { orderable: false, searchable: false, targets: ["NoSort"] },
2032
                        { "type": "anti-the", "targets":  [ "anti-the" ] }
2032
                        { type: "anti-the", targets: ["anti-the"] },
2033
                    ],
2033
                    ],
2034
                    "pagingType": "full"
2034
                    pagingType: "full",
2035
                }));
2035
                });
2036
            [% END %]
2036
            [% END %]
2037
2037
2038
            [% IF ( reviews ) %]
2038
            [% IF ( reviews ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt (-10 / +8 lines)
Lines 227-239 Link Here
227
    $(document).ready(function() {
227
    $(document).ready(function() {
228
        // We show table ordered by descending dates by default
228
        // We show table ordered by descending dates by default
229
        // (so that the more recent query is shown first)
229
        // (so that the more recent query is shown first)
230
        $(".historyt").dataTable($.extend(true, {}, dataTablesDefaults, {
230
        $(".historyt").kohaTable({
231
            "order": [[ 1, "desc" ]],
231
            order: [[1, "desc"]],
232
            "columnDefs": [
232
            columnDefs: [{ targets: [0], orderable: false, searchable: false }],
233
                { "targets": [ 0 ], "orderable": false, "searchable":  false }
233
            pagingType: "full_numbers",
234
            ],
234
        });
235
            "pagingType": "full_numbers"
236
        }));
237
235
238
        // DataTables removes hidden rows from the DOM, so we can't expect a
236
        // DataTables removes hidden rows from the DOM, so we can't expect a
239
        // "regular" submit to work and we need to build another form containing
237
        // "regular" submit to work and we need to build another form containing
Lines 242-248 Link Here
242
            e.preventDefault();
240
            e.preventDefault();
243
241
244
            var form = $(this);
242
            var form = $(this);
245
            var table = form.find('table').dataTable();
243
            var table = form.find('table').kohaTable();
246
244
247
            var new_form = $('<form>')
245
            var new_form = $('<form>')
248
                .attr('action', form.attr('action'))
246
                .attr('action', form.attr('action'))
Lines 280-286 Link Here
280
        $(".action_delete").click(function(e){
278
        $(".action_delete").click(function(e){
281
            e.preventDefault();
279
            e.preventDefault();
282
            var form = $(this).parents("form").first();
280
            var form = $(this).parents("form").first();
283
            var table = form.find('table').dataTable();
281
            var table = form.find('table').kohaTable();
284
            var ids = table.$("input:checkbox:checked");
282
            var ids = table.$("input:checkbox:checked");
285
            if ( $(ids).length < 1 ) {
283
            if ( $(ids).length < 1 ) {
286
                return false;
284
                return false;
Lines 306-312 Link Here
306
304
307
    function enableCheckboxActions(form){
305
    function enableCheckboxActions(form){
308
        // Enable/disable controls if checkboxes are checked
306
        // Enable/disable controls if checkboxes are checked
309
        var table = form.find('table').dataTable();
307
        var table = form.find('table').kohaTable();
310
        var checked_count = table.$("input:checkbox:checked").length;
308
        var checked_count = table.$("input:checkbox:checked").length;
311
        if (checked_count) {
309
        if (checked_count) {
312
          if (checked_count == 1) {
310
          if (checked_count == 1) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt (-8 / +6 lines)
Lines 233-246 Link Here
233
    [% Asset.js("js/z3950_search.js") | $raw %]
233
    [% Asset.js("js/z3950_search.js") | $raw %]
234
    <script>
234
    <script>
235
        $(document).ready(function(){
235
        $(document).ready(function(){
236
            $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
236
            $("#resultst").kohaTable({
237
                "dom": 't',
237
                dom: "t",
238
                "columnDefs": [
238
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
239
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
239
                order: [[1, "asc"]],
240
                ],
240
                paginate: false,
241
                "order": [[ 1, "asc" ]],
241
            });
242
                "paginate": false
243
            }));
244
            InitLastAction();
242
            InitLastAction();
245
        });
243
        });
246
    </script>
244
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt (-16 / +9 lines)
Lines 582-603 Link Here
582
                if( link.length > 0 ) link[0].focus();
582
                if( link.length > 0 ) link[0].focus();
583
            });
583
            });
584
584
585
            requested_datatable = $("#article-requests-requested-table").DataTable($.extend(true, {}, dataTablesDefaults, {
585
            requested_datatable = $("#article-requests-requested-table").kohaTable({
586
                "columnDefs": [
586
                columnDefs: [{ targets: [0, -1], orderable: false, searchable: false }],
587
                    { "targets": [0, -1], "orderable": false, "searchable":  false },
587
            });
588
                ],
588
            pending_datatable = $("#article-requests-pending-table").kohaTable({
589
            }));
589
                columnDefs: [{ targets: [0, -1], orderable: false, searchable: false }],
590
590
            });
591
            pending_datatable = $("#article-requests-pending-table").DataTable($.extend(true, {}, dataTablesDefaults, {
591
            processing_datatable = $("#article-requests-processing-table").kohaTable({
592
                "columnDefs": [
592
                columnDefs: [{ targets: [0, -1], orderable: false, searchable: false }],
593
                    { "targets": [0, -1], "orderable": false, "searchable":  false },
593
            });
594
                ],
595
            }));
596
            processing_datatable = $("#article-requests-processing-table").DataTable($.extend(true, {}, dataTablesDefaults, {
597
                "columnDefs": [
598
                    { "targets": [0, -1], "orderable": false, "searchable":  false },
599
                ],
600
            }));
601
            active_datatable = requested_datatable;
594
            active_datatable = requested_datatable;
602
            activateBatchActions( active_tab );
595
            activateBatchActions( active_tab );
603
            $(".starthidden").show();
596
            $(".starthidden").show();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt (-7 / +7 lines)
Lines 142-155 Link Here
142
    [% INCLUDE 'datatables.inc' %]
142
    [% INCLUDE 'datatables.inc' %]
143
    <script>
143
    <script>
144
        $(document).ready(function(){
144
        $(document).ready(function(){
145
            $("#notestable").dataTable($.extend(true, {}, dataTablesDefaults, {
145
            $("#notestable").kohaTable({
146
                "order": [[ 1, "asc" ]],
146
                order: [[1, "asc"]],
147
                "columnDefs": [
147
                columnDefs: [
148
                    { "orderable": false, "searchable": false, 'targets': [ 'NoSort' ] },
148
                    { orderable: false, searchable: false, targets: ["NoSort"] },
149
                    { "type": "anti-the", "targets": [ "anti-the" ] }
149
                    { type: "anti-the", targets: ["anti-the"] },
150
                ],
150
                ],
151
                "pagingType": "full"
151
                pagingType: "full",
152
            }));
152
            });
153
153
154
            $(".SelectAll").on("click", function(){
154
            $(".SelectAll").on("click", function(){
155
                $("input[name='issue_ids'][type='checkbox']").prop("checked", true);
155
                $("input[name='issue_ids'][type='checkbox']").prop("checked", true);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt (-8 / +8 lines)
Lines 363-377 Link Here
363
            } else if ($('#checkoutrenew').length) {
363
            } else if ($('#checkoutrenew').length) {
364
                $('#checkoutrenew').focus();
364
                $('#checkoutrenew').focus();
365
            }
365
            }
366
            $("#checkout_infos").dataTable($.extend(true, {}, dataTablesDefaults, {
366
            $("#checkout_infos").kohaTable({
367
                "dom": 't',
367
                dom: "t",
368
                "order": [],
368
                order: [],
369
                "columnDefs": [
369
                columnDefs: [
370
                    { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] },
370
                    { orderable: false, searchable: false, targets: ["NoSort"] },
371
                    { "type": "anti-the", "targets":  [ "anti-the" ] }
371
                    { type: "anti-the", targets: ["anti-the"] },
372
                ],
372
                ],
373
                "paginate": false
373
                paginate: false,
374
            }));
374
            });
375
        });
375
        });
376
        // On-site batch checkout
376
        // On-site batch checkout
377
        function toggle_onsite_checkout(){
377
        function toggle_onsite_checkout(){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt (-1 / +1 lines)
Lines 101-107 Link Here
101
    <script>
101
    <script>
102
        $(document).ready(function(){
102
        $(document).ready(function(){
103
            if ( $("#pending_onsite_checkout").length ) {
103
            if ( $("#pending_onsite_checkout").length ) {
104
                $("#pending_onsite_checkout").dataTable($.extend(true, {}, dataTablesDefaults));
104
                $("#pending_onsite_checkout").kohaTable();
105
            }
105
            }
106
        });
106
        });
107
    </script>
107
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-6 / +9 lines)
Lines 1698-1709 Link Here
1698
                });
1698
                });
1699
            });
1699
            });
1700
1700
1701
            $('#items-bundle-contents-table').dataTable($.extend(true, {}, dataTablesDefaults, {
1701
            $("#items-bundle-contents-table").kohaTable({
1702
                "searching": false,
1702
                searching: false,
1703
                "paginate": false,
1703
                paginate: false,
1704
                "info": false,
1704
                info: false,
1705
                "order": [[ 1, 'asc' ], [ 0, 'asc' ]]
1705
                order: [
1706
            }));
1706
                    [1, "asc"],
1707
                    [0, "asc"],
1708
                ],
1709
            });
1707
1710
1708
            [% IF ( !(Koha.Preference('TransfersBlockCirc')) && Koha.Preference('AutomaticConfirmTransfer') ) %]
1711
            [% IF ( !(Koha.Preference('TransfersBlockCirc')) && Koha.Preference('AutomaticConfirmTransfer') ) %]
1709
                $("#wrong-transfer-modal").on('hidden.bs.modal',function(){
1712
                $("#wrong-transfer-modal").on('hidden.bs.modal',function(){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transfers_to_send.tt (-8 / +8 lines)
Lines 120-133 Link Here
120
    <script>
120
    <script>
121
        $(document).ready(function() {
121
        $(document).ready(function() {
122
            [% FOREACH library IN libraries %]
122
            [% FOREACH library IN libraries %]
123
            $("#transferst[% library.branchcode | html %]").dataTable($.extend(true, {}, dataTablesDefaults, {
123
                $("#transferst[% library.branchcode | html %]").kohaTable({
124
                "columnDefs": [
124
                    columnDefs: [
125
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
125
                        { targets: [-1], orderable: false, searchable: false },
126
                    { "type": "anti-the", "targets":  [ "anti-the" ] }
126
                        { type: "anti-the", targets: ["anti-the"] },
127
                ],
127
                    ],
128
                "dom": 't',
128
                    dom: "t",
129
                "paginate": false
129
                    paginate: false,
130
            }));
130
                });
131
            [% END %]
131
            [% END %]
132
        });
132
        });
133
    </script>
133
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt (-8 / +8 lines)
Lines 124-137 Link Here
124
    <script>
124
    <script>
125
        $(document).ready(function() {
125
        $(document).ready(function() {
126
            [% FOREACH branchesloo IN branchesloop %]
126
            [% FOREACH branchesloo IN branchesloop %]
127
            $("#transferst[% branchesloo.branchcode | html %]").dataTable($.extend(true, {}, dataTablesDefaults, {
127
                $("#transferst[% branchesloo.branchcode | html %]").kohaTable({
128
                "columnDefs": [
128
                    columnDefs: [
129
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
129
                        { targets: [-1], orderable: false, searchable: false },
130
                    { "type": "anti-the", "targets":  [ "anti-the" ] }
130
                        { type: "anti-the", targets: ["anti-the"] },
131
                ],
131
                    ],
132
                "dom": 't',
132
                    dom: "t",
133
                "paginate": false
133
                    paginate: false,
134
            }));
134
                });
135
            [% END %]
135
            [% END %]
136
        });
136
        });
137
    </script>
137
    </script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt (-7 / +5 lines)
Lines 107-119 Link Here
107
    [% Asset.js("js/tools-menu.js") | $raw %]
107
    [% Asset.js("js/tools-menu.js") | $raw %]
108
    <script>
108
    <script>
109
        $(document).ready(function() {
109
        $(document).ready(function() {
110
            eTable = $('#enrollments-table').dataTable($.extend(true, {}, dataTablesDefaults, {
110
            eTable = $("#enrollments-table").kohaTable({
111
                "pagingType": "full",
111
                pagingType: "full",
112
                "dom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
112
                dom: 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
113
                "columnDefs": [
113
                columnDefs: [{ targets: [-1, -2], orderable: false, searchable: false }],
114
                        { "targets": [ -1, -2 ], "orderable": false, "searchable":  false },
114
            });
115
                ]
116
            } ));
117
        });
115
        });
118
    </script>
116
    </script>
119
[% END %]
117
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt (-15 / +11 lines)
Lines 165-185 Link Here
165
    [% Asset.js("js/tools-menu.js") | $raw %]
165
    [% Asset.js("js/tools-menu.js") | $raw %]
166
    <script>
166
    <script>
167
        $(document).ready(function() {
167
        $(document).ready(function() {
168
            tTable = $('#club-templates-table').dataTable($.extend(true, {}, dataTablesDefaults, {
168
            tTable = $("#club-templates-table").kohaTable({
169
                "pagingType": "full",
169
                pagingType: "full",
170
                "dom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
170
                dom: 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
171
                "columnDefs": [
171
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
172
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
172
            });
173
                ]
173
174
            } ));
174
            cTable = $("#clubs-table").kohaTable({
175
175
                pagingType: "full",
176
            cTable = $('#clubs-table').dataTable($.extend(true, {}, dataTablesDefaults, {
176
                dom: 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
177
                "pagingType": "full",
177
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
178
                "dom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
178
            });
179
                "columnDefs": [
180
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
181
                ]
182
            } ));
183
179
184
            $("body").on("click", ".delete_club", function(e){
180
            $("body").on("click", ".delete_club", function(e){
185
                e.preventDefault();
181
                e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-clubs-tab.tt (-6 / +6 lines)
Lines 67-78 Link Here
67
[% END %]
67
[% END %]
68
68
69
<script>
69
<script>
70
$("#table_clubnoenrollmemnts, #table_clubenrollments").dataTable($.extend(true, {}, dataTablesDefaults, {
70
let dt_params = {
71
    "columnDefs": [
71
    columnDefs: [{ sortable: false, targets: ["NoSort"] }],
72
        { 'sortable': false, 'targets': [ 'NoSort' ] }
72
    paginate: true,
73
    ],
73
};
74
    paginate: true
74
$("#table_clubnoenrollmemnts").kohaTable(dt_params);
75
}));
75
$("#table_clubenrollments").kohaTable(dt_params);
76
76
77
[% IF CAN_user_clubs_enroll %]
77
[% IF CAN_user_clubs_enroll %]
78
function loadEnrollmentForm( id, enrollent_id = 0 ) {
78
function loadEnrollmentForm( id, enrollent_id = 0 ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt (-8 / +8 lines)
Lines 332-346 Link Here
332
            [% ELSE %]
332
            [% ELSE %]
333
                $("#description").hide();
333
                $("#description").hide();
334
            [% END %]
334
            [% END %]
335
            $("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, {
335
            $("#batcht").kohaTable({
336
                "autoWidth": false,
336
                autoWidth: false,
337
                "columnDefs": [
337
                columnDefs: [
338
                    { "type": "anti-the", "targets":  [ "anti-the" ] },
338
                    { type: "anti-the", targets: ["anti-the"] },
339
                    { "targets": [ -1, -2 ], "orderable": false, "searchable":  false },
339
                    { targets: [-1, -2], orderable: false, searchable: false },
340
                ],
340
                ],
341
                "order": [[ 0, "asc" ]],
341
                order: [[0, "asc"]],
342
                "pagingType": "full"
342
                pagingType: "full",
343
            }));
343
            });
344
            $("#additems").click(function(){
344
            $("#additems").click(function(){
345
                Add();
345
                Add();
346
                return false;
346
                return false;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt (-7 / +5 lines)
Lines 193-205 Link Here
193
            $(".delete").on("click", function(){
193
            $(".delete").on("click", function(){
194
                return confirmDelete( _("Are you sure you want to delete this?") );
194
                return confirmDelete( _("Are you sure you want to delete this?") );
195
            });
195
            });
196
            $("#labels-table").dataTable($.extend(true, {}, dataTablesDefaults, {
196
            $("#labels-table").kohaTable({
197
                "pagingType": "full",
197
                pagingType: "full",
198
                "order": [[ 1, "asc" ]],
198
                order: [[1, "asc"]],
199
                "columnDefs": [
199
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
200
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
200
            });
201
                ]
202
            }));
203
        });
201
        });
204
    </script>
202
    </script>
205
[% END %]
203
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt (-2 / +1 lines)
Lines 104-111 Link Here
104
    [% INCLUDE 'datatables.inc' %]
104
    [% INCLUDE 'datatables.inc' %]
105
    <script>
105
    <script>
106
        $(document).ready(function() {
106
        $(document).ready(function() {
107
            $("#subscriptions").dataTable($.extend(true, {}, dataTablesDefaults, {
107
            $("#subscriptions").kohaTable();
108
            }));
109
            $(".unsubscribe").submit(function(){
108
            $(".unsubscribe").submit(function(){
110
                var patron = $(this).data('patron');
109
                var patron = $(this).data('patron');
111
                var title = $(this).data('title');
110
                var title = $(this).data('title');
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt (-2 / +2 lines)
Lines 73-79 Link Here
73
    [% INCLUDE 'datatables.inc' %]
73
    [% INCLUDE 'datatables.inc' %]
74
    <script>
74
    <script>
75
        $(document).ready(function() {
75
        $(document).ready(function() {
76
            $('#pending_updates table').DataTable($.extend(true, {}, dataTablesDefaults, {
76
            $('#pending_updates table').kohaTable({
77
                paging: false,
77
                paging: false,
78
                info: true,
78
                info: true,
79
                searching: true,
79
                searching: true,
Lines 81-87 Link Here
81
                columnDefs: [
81
                columnDefs: [
82
                    { targets: -1, orderable: false }
82
                    { targets: -1, orderable: false }
83
                ],
83
                ],
84
            }));
84
            ));
85
        });
85
        });
86
    </script>
86
    </script>
87
[% END %]
87
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt (-4 / +4 lines)
Lines 164-173 Link Here
164
    [% INCLUDE 'datatables.inc' %]
164
    [% INCLUDE 'datatables.inc' %]
165
    <script>
165
    <script>
166
        $(document).ready(function() {
166
        $(document).ready(function() {
167
            $("#noticestable").dataTable($.extend(true, {}, dataTablesDefaults, {
167
            $("#noticestable").kohaTable({
168
                "order": [[ 3, "desc" ]],
168
                order: [[3, "desc"]],
169
                "pagingType": "full"
169
                pagingType: "full",
170
            }));
170
            });
171
171
172
            $("#noticestable").on("click", ".notice-title", function(e){
172
            $("#noticestable").on("click", ".notice-title", function(e){
173
                e.preventDefault();
173
                e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt (-6 / +6 lines)
Lines 142-153 Link Here
142
    [% INCLUDE 'datatables.inc' %]
142
    [% INCLUDE 'datatables.inc' %]
143
    <script>
143
    <script>
144
        $(document).ready(function() {
144
        $(document).ready(function() {
145
            $("#suggestions").dataTable($.extend(true, {}, dataTablesDefaults, {
145
            $("#suggestions").kohaTable({
146
                "paginate": false,
146
                paginate: false,
147
                "searching": false,
147
                searching: false,
148
                "info": false,
148
                info: false,
149
                "dom": 't'
149
                dom: "t",
150
            } ));
150
            });
151
        });
151
        });
152
    </script>
152
    </script>
153
[% END %]
153
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt (-4 / +4 lines)
Lines 114-123 Link Here
114
    [% INCLUDE 'datatables.inc' %]
114
    [% INCLUDE 'datatables.inc' %]
115
    <script>
115
    <script>
116
        $(document).ready(function() {
116
        $(document).ready(function() {
117
            $("#statistics").dataTable($.extend(true, {}, dataTablesDefaults, {
117
            $("#statistics").kohaTable({
118
                "dom": 't',
118
                dom: "t",
119
                "paginate": false
119
                paginate: false,
120
            }));
120
            });
121
        });
121
        });
122
    </script>
122
    </script>
123
[% END %]
123
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt (-8 / +6 lines)
Lines 64-77 Link Here
64
    <script>
64
    <script>
65
65
66
        $(document).ready(function() {
66
        $(document).ready(function() {
67
            $("#catst").dataTable($.extend(true, {}, dataTablesDefaults, {
67
            $("#catst").kohaTable({
68
                "dom": 't',
68
                dom: "t",
69
                "order": [[ 2, "asc" ]],
69
                order: [[2, "asc"]],
70
                "columnDefs": [
70
                columnDefs: [{ targets: [0], orderable: false, searchable: false }],
71
                    { "targets": [ 0 ], "orderable": false, "searchable":  false }
71
                paginate: false,
72
                ],
72
            });
73
                "paginate": false
74
            }));
75
            $("#updatechildf").validate({
73
            $("#updatechildf").validate({
76
                rules: {
74
                rules: {
77
                    catcode: {
75
                    catcode: {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt (-7 / +5 lines)
Lines 155-167 Link Here
155
155
156
            let selectedPatronLists = new Array();
156
            let selectedPatronLists = new Array();
157
157
158
            $('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, {
158
            $("#patron-lists-table").kohaTable({
159
                "autoWidth": false,
159
                autoWidth: false,
160
                "columnDefs": [
160
                columnDefs: [{ orderable: false, searchable: false, targets: ["NoSort"] }],
161
                    { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] }
161
                pagingType: "full",
162
                ],
162
            });
163
                "pagingType": "full"
164
            } ));
165
            $(".delete_patron").on("click", function(){
163
            $(".delete_patron").on("click", function(){
166
                $(".dropdown").removeClass("open");
164
                $(".dropdown").removeClass("open");
167
                var list = $(this).data("list-name");
165
                var list = $(this).data("list-name");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/patron-lists-tab.tt (-6 / +6 lines)
Lines 104-115 Link Here
104
[% END %]
104
[% END %]
105
105
106
<script>
106
<script>
107
    $("#table_listnopatron, #table_inlists").dataTable($.extend(true, {}, dataTablesDefaults, {
107
    let dt_params = {
108
        "columnDefs": [
108
        columnDefs: [{ sortable: false, bSearchable: false, targets: ["NoSort"] }],
109
            { 'sortable': false, "bSearchable": false, 'targets': [ 'NoSort' ] }
109
        sPaginationType: "full",
110
        ],
110
    };
111
        "sPaginationType": "full"
111
    $("#table_listnopatron").kohaTable(dt_params);
112
    }));
112
    $("#table_inlists").kohaTable(dt_params);
113
113
114
    [% IF CAN_user_tools_manage_patron_lists %]
114
    [% IF CAN_user_tools_manage_patron_lists %]
115
        function addToList() {
115
        function addToList() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt (-10 / +8 lines)
Lines 309-324 Link Here
309
            [% ELSE %]
309
            [% ELSE %]
310
                $("#description").hide();
310
                $("#description").hide();
311
            [% END %]
311
            [% END %]
312
            $("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, {
312
            $("#batcht").kohaTable({
313
                "columnDefs": [
313
                columnDefs: [{ targets: [-2, -1], orderable: false, searchable: false }],
314
                    { "targets": [ -2, -1 ], "orderable": false, "searchable":  false }
314
                order: [[0, "asc"]],
315
                ],
315
                pagingType: "full",
316
                "order": [[ 0, "asc" ]],
316
                lengthMenu: [aLengthMenu, aLengthMenuLabel],
317
                "pagingType": "full",
317
                pageLength: patronsPerPage,
318
                "lengthMenu": [aLengthMenu, aLengthMenuLabel],
318
                autoWidth: false,
319
                "pageLength": patronsPerPage,
319
            });
320
                "autoWidth": false
321
            }));
322
            $("#additems").click(function(){
320
            $("#additems").click(function(){
323
                return Add();
321
                return Add();
324
            });
322
            });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt (-2 / +2 lines)
Lines 334-340 Link Here
334
334
335
    $(document).ready(function() {
335
    $(document).ready(function() {
336
        const sale_table = document.getElementById('sale');
336
        const sale_table = document.getElementById('sale');
337
        const saleDataTable = $("#sale").DataTable($.extend(true, {}, dataTablesDefaults, {
337
        const saleDataTable = $("#sale").kohaTable({
338
            "paginate": false,
338
            "paginate": false,
339
            "searching": false,
339
            "searching": false,
340
            "info": false,
340
            "info": false,
Lines 383-389 Link Here
383
                $('#paid').val(total_price).trigger('change');
383
                $('#paid').val(total_price).trigger('change');
384
            },
384
            },
385
            "autoWidth": false
385
            "autoWidth": false
386
        }));
386
        });
387
387
388
        $("#sale").on("click", "button.drop", function(){
388
        $("#sale").on("click", "button.drop", function(){
389
                saleDataTable.row($(this).parents('tr')).remove().draw(false);
389
                saleDataTable.row($(this).parents('tr')).remove().draw(false);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt (-4 / +4 lines)
Lines 355-361 Link Here
355
    [% Asset.js("js/modal_printer.js") | $raw %]
355
    [% Asset.js("js/modal_printer.js") | $raw %]
356
    [% INCLUDE 'calendar.inc' %]
356
    [% INCLUDE 'calendar.inc' %]
357
    <script>
357
    <script>
358
        var sales_table = $("#sales").dataTable($.extend(true, {}, dataTablesDefaults, {
358
        var sales_table = $("#sales").kohaTable({
359
            orderFixed: [ 0, 'asc'],
359
            orderFixed: [ 0, 'asc'],
360
            columnDefs: [ {
360
            columnDefs: [ {
361
                targets: [ 0, 1 ],
361
                targets: [ 0, 1 ],
Lines 379-387 Link Here
379
            initComplete: function() {
379
            initComplete: function() {
380
                $("#sales").show();
380
                $("#sales").show();
381
            }
381
            }
382
        }));
382
        });
383
383
384
        var past_sales_table = $("#past_sales").dataTable($.extend(true, {}, dataTablesDefaults, {
384
        var past_sales_table = $("#past_sales").kohaTable({
385
            orderFixed: [ 0, 'asc'],
385
            orderFixed: [ 0, 'asc'],
386
            columnDefs: [ {
386
            columnDefs: [ {
387
                targets: [ 0, 1 ],
387
                targets: [ 0, 1 ],
Lines 400-406 Link Here
400
                },
400
                },
401
                endRender: null,
401
                endRender: null,
402
            }
402
            }
403
        }));
403
        });
404
404
405
        $("#issueRefundModal").on("shown.bs.modal", function(e){
405
        $("#issueRefundModal").on("shown.bs.modal", function(e){
406
           var button = $(e.relatedTarget);
406
           var button = $(e.relatedTarget);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt (-4 / +4 lines)
Lines 209-218 Link Here
209
                $("#income").text('[% ctotal | $Price %] ([% cctotal | $Price %])');
209
                $("#income").text('[% ctotal | $Price %] ([% cctotal | $Price %])');
210
                $("#outgoing").text('[% dtotal | $Price %] ([% cdtotal | $Price %])');
210
                $("#outgoing").text('[% dtotal | $Price %] ([% cdtotal | $Price %])');
211
211
212
                var registers_table = $("#registers").dataTable($.extend(true, {}, dataTablesDefaults, {
212
                var registers_table = $("#registers").kohaTable({
213
                    "searching": false,
213
                    searching: false,
214
                    "paginationType": "full"
214
                    paginationType: "full",
215
                }));
215
                });
216
216
217
                $("#confirmCashupModal").on("shown.bs.modal", function(e){
217
                $("#confirmCashupModal").on("shown.bs.modal", function(e){
218
                   var button = $(e.relatedTarget);
218
                   var button = $(e.relatedTarget);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_to_pull.tt (-7 / +7 lines)
Lines 166-179 Link Here
166
    [% INCLUDE 'columns_settings.inc' %]
166
    [% INCLUDE 'columns_settings.inc' %]
167
    <script>
167
    <script>
168
        $(document).ready(function(){
168
        $(document).ready(function(){
169
            $("#recalls-table").dataTable($.extend(true, {}, dataTablesDefaults, {
169
            $("#recalls-table").kohaTable({
170
                "columnDefs": [
170
                columnDefs: [
171
                    { "orderable": false, "targets": [ 'nosort' ] },
171
                    { orderable: false, targets: ["nosort"] },
172
                    { "type": "title-string", "targets":  [ "title-string" ] },
172
                    { type: "title-string", targets: ["title-string"] },
173
                    { "type": "anti-the", "targets": [ "anti-the" ] }
173
                    { type: "anti-the", targets: ["anti-the"] },
174
                ],
174
                ],
175
                "pagingType": "full_numbers"
175
                pagingType: "full_numbers",
176
            }));
176
            });
177
177
178
            $(".cancelreturn").click(function(){
178
            $(".cancelreturn").click(function(){
179
                return confirmDelete(_("Are you sure you want to remove this recall and return the item to its home library?"));
179
                return confirmDelete(_("Are you sure you want to remove this recall and return the item to its home library?"));
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt (-7 / +5 lines)
Lines 166-178 Link Here
166
    [% INCLUDE 'columns_settings.inc' %]
166
    [% INCLUDE 'columns_settings.inc' %]
167
    <script>
167
    <script>
168
        $(document).ready(function() {
168
        $(document).ready(function() {
169
            $("#recallswaiting-table, #recallsover-table").dataTable($.extend(true, {}, dataTablesDefaults, {
169
            $("#recallswaiting-table, #recallsover-table").kohaTable({
170
                "autoWidth": false,
170
                autoWidth: false,
171
                "columnDefs": [
171
                columnDefs: [{ orderable: false, targets: ["nosort"] }],
172
                    { "orderable": false, "targets": [ 'nosort' ] },
172
                pagingType: "full_numbers",
173
                ],
173
            });
174
                "pagingType": "full_numbers"
175
            }));
176
174
177
            $(".revert_recall").click(function(e) {
175
            $(".revert_recall").click(function(e) {
178
                return confirmDelete(_("Are you sure you want to revert this recall's status from Waiting?"));
176
                return confirmDelete(_("Are you sure you want to revert this recall's status from Waiting?"));
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt (-4 / +4 lines)
Lines 218-227 Link Here
218
    <script>
218
    <script>
219
        actTotal = "";
219
        actTotal = "";
220
        $(document).ready(function() {
220
        $(document).ready(function() {
221
            $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
221
            $("#tbl_cash_register_stats").kohaTable({
222
                "pageLength": 50,
222
                pageLength: 50,
223
                "pagingType": "full_numbers"
223
                pagingType: "full_numbers",
224
            }));
224
            });
225
225
226
            $("#branch").on("change", function() {
226
            $("#branch").on("change", function() {
227
                var selectedBranch = $("#branch").children(
227
                var selectedBranch = $("#branch").children(
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-2 / +2 lines)
Lines 2403-2409 Link Here
2403
                        $(".mana_search_status").hide();
2403
                        $(".mana_search_status").hide();
2404
                        $("#mana_search_result_label").text(_("Results from Mana Knowledge Base"));
2404
                        $("#mana_search_result_label").text(_("Results from Mana Knowledge Base"));
2405
                        $("#mana-loading").hide();
2405
                        $("#mana-loading").hide();
2406
                        $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults,{
2406
                        $("#mana_results_datatable").kohaTable({
2407
                            "pagingType": "full",
2407
                            "pagingType": "full",
2408
                            "autoWidth": false,
2408
                            "autoWidth": false,
2409
                            "columnDefs": [
2409
                            "columnDefs": [
Lines 2413-2419 Link Here
2413
                                { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] },
2413
                                { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] },
2414
                                { "type": "anti-the", "targets":  [ 'anti-the'] }
2414
                                { "type": "anti-the", "targets":  [ 'anti-the'] }
2415
                            ]
2415
                            ]
2416
                        }));
2416
                        });
2417
2417
2418
                        $(".showbutton").on("click", function(e){
2418
                        $(".showbutton").on("click", function(e){
2419
                            e.preventDefault();
2419
                            e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemtypes.tt (-4 / +4 lines)
Lines 110-119 Link Here
110
        [% INCLUDE 'datatables.inc' %]
110
        [% INCLUDE 'datatables.inc' %]
111
        <script>
111
        <script>
112
            $(document).ready(function(){
112
            $(document).ready(function(){
113
                $("#itemtypest").dataTable($.extend(true, {}, dataTablesDefaults, {
113
                $("#itemtypest").kohaTable({
114
                    "dom": 't',
114
                    dom: "t",
115
                    "paginate": false
115
                    paginate: false,
116
                }));
116
                });
117
            });
117
            });
118
        </script>
118
        </script>
119
    [% END %]
119
    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tt (-3 / +3 lines)
Lines 169-177 Link Here
169
[% INCLUDE 'datatables.inc' %]
169
[% INCLUDE 'datatables.inc' %]
170
    <script>
170
    <script>
171
        $(document).ready(function() {
171
        $(document).ready(function() {
172
            $("#resulttable").dataTable($.extend(true, {}, dataTablesDefaults, {
172
            $("#resulttable").kohaTable({
173
                "paginate": false,
173
                paginate: false,
174
            }));
174
            });
175
        });
175
        });
176
    </script>
176
    </script>
177
[% END %]
177
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-5 / +4 lines)
Lines 1567-1577 Link Here
1567
                });
1567
                });
1568
            [% END %]
1568
            [% END %]
1569
1569
1570
            var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
1570
            var my_table = $("#requestspecific").kohaTable({
1571
                "paginate": false,
1571
                paginate: false,
1572
                "dom": '<"top pager"ilf>t',
1572
                dom: '<"top pager"ilf>t',
1573
            }));
1573
            });
1574
1575
1574
1576
            $("#club-request-form").on("submit", function() {
1575
            $("#club-request-form").on("submit", function() {
1577
                let $t = $(this);
1576
                let $t = $(this);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt (-7 / +7 lines)
Lines 244-257 Link Here
244
    <script>
244
    <script>
245
        var sTable;
245
        var sTable;
246
        $(document).ready(function() {
246
        $(document).ready(function() {
247
            sTable = $("#claimst").dataTable($.extend(true, {}, dataTablesDefaults, {
247
            sTable = $("#claimst").kohaTable({
248
                "dom": 't',
248
                dom: "t",
249
                "columnDefs": [
249
                columnDefs: [
250
                    { "targets": [ 0 ], "orderable": false, "searchable":  false },
250
                    { targets: [0], orderable: false, searchable: false },
251
                    { "type": "anti-the", "targets":  [ 'anti-the'] }
251
                    { type: "anti-the", targets: ["anti-the"] },
252
                ],
252
                ],
253
                "paginate": false
253
                paginate: false,
254
            }));
254
            });
255
            $('#supplierid').change(function() {
255
            $('#supplierid').change(function() {
256
                $('#claims').submit();
256
                $('#claims').submit();
257
            });
257
            });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt (-11 / +9 lines)
Lines 364-380 Link Here
364
            if( $("#subscription_years .tab-pane.active").length < 1 ){
364
            if( $("#subscription_years .tab-pane.active").length < 1 ){
365
                $("#subscription_years a:first").tab("show");
365
                $("#subscription_years a:first").tab("show");
366
            }
366
            }
367
            $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
367
            $(".subscription-year-table").kohaTable({
368
                "columnDefs": [
368
                columnDefs: [{ targets: [0, -1], orderable: false, searchable: false }],
369
                    { "targets": [ 0,-1 ], "orderable": false, "searchable":  false }
369
                order: [[0, "desc"]],
370
                ],
370
                dom: "t",
371
                "order": [[0, 'desc']],
371
                autoWidth: false,
372
                "dom": 't',
372
                paginate: false,
373
                "autoWidth": false,
373
                info: false,
374
                "paginate": false,
374
                searching: false,
375
                "info": false,
375
            });
376
                "searching": false,
377
            } ));
378
376
379
            $(".CheckAll").on("click", function(e){
377
            $(".CheckAll").on("click", function(e){
380
                e.preventDefault();
378
                e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt (-25 / +25 lines)
Lines 345-376 Link Here
345
        }
345
        }
346
346
347
        $(document).ready(function() {
347
        $(document).ready(function() {
348
            var osrlt = $("#opened_panel table").dataTable($.extend(true, {}, dataTablesDefaults, {
348
            var osrlt = $("#opened_panel table").kohaTable({
349
                "pagingType": "full",
349
                pagingType: "full",
350
                "order": [[ 2, "asc" ]],
350
                order: [[2, "asc"]],
351
                "columnDefs": [
351
                columnDefs: [
352
                    { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] },
352
                    { orderable: false, searchable: false, targets: ["NoSort"] },
353
                    { "type": "anti-the", "targets":  [ 'anti-the'] }
353
                    { type: "anti-the", targets: ["anti-the"] },
354
                ]
354
                ],
355
            }));
355
            });
356
356
357
            var csrlt = $("#closed_panel table").dataTable($.extend(true, {}, dataTablesDefaults, {
357
            var csrlt = $("#closed_panel table").kohaTable({
358
                // FIXME sort function of additional_fields!
358
                // FIXME sort function of additional_fields!
359
                "order": [[ 2, "asc" ]],
359
                order: [[2, "asc"]],
360
                "pagingType": "full",
360
                pagingType: "full",
361
                "columnDefs": [
361
                columnDefs: [
362
                    { "orderable": false, "targets": [ 'NoSort' ] },
362
                    { orderable: false, targets: ["NoSort"] },
363
                    { "type": "anti-the", "targets":  [ 'anti-the'] }
363
                    { type: "anti-the", targets: ["anti-the"] },
364
                ]
364
                ],
365
            }));
365
            });
366
366
367
            var manarlt = $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults, {
367
            var manarlt = $("#mana_results_datatable").kohaTable({
368
                "pagingType": "full",
368
                pagingType: "full",
369
                "columnDefs": [
369
                columnDefs: [
370
                    { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] },
370
                    { orderable: false, searchable: false, targets: ["NoSort"] },
371
                    { "type": "anti-the", "targets":  [ 'anti-the'] }
371
                    { type: "anti-the", targets: ["anti-the"] },
372
                ]
372
                ],
373
            }));
373
            });
374
374
375
            $("#reopensub").click(function(){
375
            $("#reopensub").click(function(){
376
                return confirm(_("Are you sure you want to reopen this subscription?"));
376
                return confirm(_("Are you sure you want to reopen this subscription?"));
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt (-6 / +4 lines)
Lines 403-414 Link Here
403
        }
403
        }
404
        $(document).ready(function(){
404
        $(document).ready(function(){
405
405
406
            $("#numberpatternst").dataTable($.extend(true, {}, dataTablesDefaults, {
406
            $("#numberpatternst").kohaTable({
407
                "columnDefs": [
407
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
408
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
408
                pagingType: "full",
409
                ],
409
            });
410
                "pagingType": "full"
411
            }));
412
410
413
            $(".delete_pattern").on("click",function(){
411
            $(".delete_pattern").on("click",function(){
414
                return confirmDelete();
412
                return confirmDelete();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt (-7 / +5 lines)
Lines 128-140 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
128
                        event.preventDefault();
128
                        event.preventDefault();
129
                    }
129
                    }
130
            });
130
            });
131
            $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
131
            $("#itemst").kohaTable({
132
                "columnDefs": [
132
                columnDefs: [{ targets: [-1, -2], orderable: false, searchable: false }],
133
                    { "targets": [ -1, -2 ], "orderable": false, "searchable":  false },
133
                order: [[0, "asc"]],
134
                ],
134
                pagingType: "full",
135
                "order": [[ 0, "asc" ]],
135
            });
136
                "pagingType": "full"
137
            }));
138
        });
136
        });
139
    </script>
137
    </script>
140
[% END %]
138
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt (-5 / +5 lines)
Lines 79-90 Link Here
79
    [% INCLUDE 'datatables.inc' %]
79
    [% INCLUDE 'datatables.inc' %]
80
    <script>
80
    <script>
81
        $(document).ready(function() {
81
        $(document).ready(function() {
82
            $("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
82
            $("#files").kohaTable({
83
                "columnDefs": [
83
                columnDefs: [
84
                    { "targets": [ -1 ], "orderSequence": [ "desc", "asc" ], "searchable":  false }
84
                    { targets: [-1], orderSequence: ["desc", "asc"], searchable: false },
85
                ],
85
                ],
86
                "paginate": false
86
                paginate: false,
87
            }));
87
            });
88
    });
88
    });
89
</script>
89
</script>
90
[% END %]
90
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-7 / +7 lines)
Lines 602-615 Link Here
602
602
603
            $(document).ready(function() {
603
            $(document).ready(function() {
604
604
605
                var table = $("#table_additional_contents").DataTable($.extend(true, {}, dataTablesDefaults, {
605
                var table = $("#table_additional_contents").kohaTable({
606
                    "order": [[ 4, "desc" ]],
606
                    order: [[4, "desc"]],
607
                    "columnDefs": [
607
                    columnDefs: [
608
                        { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
608
                        { sortable: false, searchable: false, targets: ["NoSort"] },
609
                        { "type": "anti-the", "targets": [ "anti-the" ] }
609
                        { type: "anti-the", targets: ["anti-the"] },
610
                    ],
610
                    ],
611
                    "pagingType": "full_numbers"
611
                    pagingType: "full_numbers",
612
                }));
612
                });
613
613
614
                $("#del_form").on("click", ".delete_news", function(e){
614
                $("#del_form").on("click", ".delete_news", function(e){
615
                    e.preventDefault();
615
                    e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt (-18 / +18 lines)
Lines 342-366 Link Here
342
            });
342
            });
343
          [% END %]
343
          [% END %]
344
344
345
          $("table#biblios").dataTable($.extend(true, {}, dataTablesDefaults, {
345
          $("#biblios").kohaTable({
346
            "columnDefs": [
346
              columnDefs: [
347
              { "targets": [ 0 ], "orderable": false, "searchable":  false },
347
                  { targets: [0], orderable: false, searchable: false },
348
              { "targets": [ 3, 4 ], "type": "num-html" }
348
                  { targets: [3, 4], type: "num-html" },
349
            ],
349
              ],
350
            "dom": 't',
350
              dom: "t",
351
            "order": [],
351
              order: [],
352
            "paginate": false
352
              paginate: false,
353
          }));
353
          });
354
354
355
          $("table#authorities").dataTable($.extend(true, {}, dataTablesDefaults, {
355
          $("#authorities").kohaTable({
356
            "columnDefs": [
356
              columnDefs: [
357
              { "targets": [ 0 ], "orderable": false, "searchable":  false },
357
                  { targets: [0], orderable: false, searchable: false },
358
              { "targets": [ 3 ], "type": "num-html" }
358
                  { targets: [3], type: "num-html" },
359
            ],
359
              ],
360
            "dom": 't',
360
              dom: "t",
361
            "order": [],
361
              order: [],
362
            "paginate": false
362
              paginate: false,
363
          }));
363
          });
364
364
365
          $("#selectrecords").on("submit",function(){
365
          $("#selectrecords").on("submit",function(){
366
            var nb_checked = $("#selectrecords").find("input[type='checkbox'][name='record_id']:checked").size();
366
            var nb_checked = $("#selectrecords").find("input[type='checkbox'][name='record_id']:checked").size();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt (-16 / +16 lines)
Lines 277-301 Link Here
277
277
278
            $("#selectall").click();
278
            $("#selectall").click();
279
279
280
            $("#checkouts").dataTable($.extend(true, {}, dataTablesDefaults, {
280
            $("#checkouts").kohaTable({
281
                "columnDefs": [
281
                columnDefs: [
282
                    { "targets": [0, 3], "orderable": false, "searchable":  false },
282
                    { targets: [0, 3], orderable: false, searchable: false },
283
                    { "targets": [1], "type": "num-html" }
283
                    { targets: [1], type: "num-html" },
284
                ],
284
                ],
285
                "dom": 't',
285
                dom: "t",
286
                "order": [],
286
                order: [],
287
                "paginate": false
287
                paginate: false,
288
            }));
288
            });
289
289
290
            $("#checkouts_result").dataTable($.extend(true, {}, dataTablesDefaults, {
290
            $("#checkouts_result").kohaTable({
291
                "columnDefs": [
291
                columnDefs: [
292
                    { "targets": [0, 3], "orderable": false, "searchable":  false },
292
                    { targets: [0, 3], orderable: false, searchable: false },
293
                    { "targets": [1], "type": "num-html" }
293
                    { targets: [1], type: "num-html" },
294
                ],
294
                ],
295
                "dom": 't',
295
                dom: "t",
296
                "order": [],
296
                order: [],
297
                "paginate": false
297
                paginate: false,
298
            }));
298
            });
299
299
300
            $("#extend_due_dates_form").on('submit', function(e) {
300
            $("#extend_due_dates_form").on('submit', function(e) {
301
                var new_hard_due_date = $("#new_hard_due_date").val();
301
                var new_hard_due_date = $("#new_hard_due_date").val();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt (-16 / +16 lines)
Lines 336-360 Link Here
336
336
337
            $("#selectall").click();
337
            $("#selectall").click();
338
338
339
            $("table#biblios").dataTable($.extend(true, {}, dataTablesDefaults, {
339
            $("#biblios").kohaTable({
340
                "columnDefs": [
340
                columnDefs: [
341
                    { "targets": [0, 3], "orderable": false, "searchable":  false },
341
                    { targets: [0, 3], orderable: false, searchable: false },
342
                    { "targets": [1], "type": "num-html" }
342
                    { targets: [1], type: "num-html" },
343
                ],
343
                ],
344
                "dom": 't',
344
                dom: "t",
345
                "order": [],
345
                order: [],
346
                "paginate": false
346
                paginate: false,
347
            }));
347
            });
348
348
349
            $("table#authorities").dataTable($.extend(true, {}, dataTablesDefaults, {
349
            $("#authorities").kohaTable({
350
                "columnDefs": [
350
                columnDefs: [
351
                    { "targets": [0, 3], "orderable": false, "searchable":  false },
351
                    { targets: [0, 3], orderable: false, searchable: false },
352
                    { "targets": [1], "type": "num-html" }
352
                    { targets: [1], type: "num-html" },
353
                ],
353
                ],
354
                "dom": 't',
354
                dom: "t",
355
                "order": [],
355
                order: [],
356
                "paginate": false
356
                paginate: false,
357
            }));
357
            });
358
358
359
            $("#mainformsubmit").click(function() {
359
            $("#mainformsubmit").click(function() {
360
                if ($("input[type=checkbox][name='record_id']:checked").length == 0) {
360
                if ($("input[type=checkbox][name='record_id']:checked").length == 0) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt (-11 / +15 lines)
Lines 592-611 Link Here
592
                var first_td = $(this).find('td').first();
592
                var first_td = $(this).find('td').first();
593
                first_td.html(weekdays[first_td.html()]);
593
                first_td.html(weekdays[first_td.html()]);
594
            });
594
            });
595
            $("#holidayweeklyrepeatable").dataTable($.extend(true, {}, dataTablesDefaults, {
595
            $("#holidayweeklyrepeatable").kohaTable({
596
                "dom": 't',
596
                dom: "t",
597
                "paginate": false
597
                paginate: false,
598
            }));
598
            });
599
            var tables = $("#holidayexceptions, #holidaysyearlyrepeatable, #holidaysunique").DataTable($.extend(true, {}, dataTablesDefaults, {
599
600
                "dom": 't',
600
            let dt_params = {
601
                "paginate": false,
601
                dom: "t",
602
                "createdRow": function( row, data, dataIndex ) {
602
                paginate: false,
603
                createdRow: function (row, data, dataIndex) {
603
                    var holiday = $(row).data("date");
604
                    var holiday = $(row).data("date");
604
                    if( holiday < datestring ){
605
                    if (holiday < datestring) {
605
                        $(row).addClass("date_past");
606
                        $(row).addClass("date_past");
606
                    }
607
                    }
607
                }
608
                },
608
            }));
609
            };
610
            $("#holidayexceptions").kohaTable(dt_params);
611
            $("#holidaysyearlyrepeatable").kohaTable(dt_params);
612
            $("#holidaysunique").kohaTable(dt_params);
609
613
610
            $(".show_past").on("change", function(){
614
            $(".show_past").on("change", function(){
611
                tables.draw();
615
                tables.draw();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt (-2 / +2 lines)
Lines 461-467 Link Here
461
            });
461
            });
462
462
463
            [% IF import_batch_id %]
463
            [% IF import_batch_id %]
464
                $("#records-table").dataTable($.extend(true, {}, dataTablesDefaults, {
464
                $("#records-table").kohaTable({
465
                    "autoWidth": false,
465
                    "autoWidth": false,
466
                    "searching": false,
466
                    "searching": false,
467
                    "processing": true,
467
                    "processing": true,
Lines 587-593 Link Here
587
                            );
587
                            );
588
                        }
588
                        }
589
                    },
589
                    },
590
                }));
590
                });
591
                $("#revert_batch_form").on("submit", function() {
591
                $("#revert_batch_form").on("submit", function() {
592
                    return confirm(_("Are you sure you want to undo the import of this batch into the catalog?"));
592
                    return confirm(_("Are you sure you want to undo the import of this batch into the catalog?"));
593
                });
593
                });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt (-7 / +5 lines)
Lines 191-203 Link Here
191
            if( $("#rulestabs .tab-pane.active").length < 1 ){
191
            if( $("#rulestabs .tab-pane.active").length < 1 ){
192
                $("#rulestabs a:first").tab("show");
192
                $("#rulestabs a:first").tab("show");
193
            }
193
            }
194
            $(".overduerulest").dataTable($.extend(true, {}, dataTablesDefaults, {
194
            $(".overduerulest").kohaTable({
195
                "columnDefs": [
195
                columnDefs: [{ targets: ["NoSort"], orderable: false, searchable: false }],
196
                    { "targets": [ "NoSort" ], "orderable": false, "searchable": false },
196
                dom: '<"top pager"f>rt<"clear">',
197
                ],
197
                paginate: false,
198
                "dom": '<"top pager"f>rt<"clear">',
198
            });
199
                "paginate": false,
200
            }));
201
199
202
            $("#overduerulesf").on("submit", function(e){
200
            $("#overduerulesf").on("submit", function(e){
203
                $(".overduerulest").DataTable().search('').draw();
201
                $(".overduerulest").DataTable().search('').draw();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt (-7 / +7 lines)
Lines 148-161 Link Here
148
    [% INCLUDE 'datatables.inc' %]
148
    [% INCLUDE 'datatables.inc' %]
149
    <script>
149
    <script>
150
        $(document).ready(function(){
150
        $(document).ready(function(){
151
            $("#problemreportstable").dataTable($.extend(true, {}, dataTablesDefaults, {
151
            $("#problemreportstable").kohaTable({
152
                "order": [[ 1, "asc" ]],
152
                order: [[1, "asc"]],
153
                "columnDefs": [
153
                columnDefs: [
154
                    { "orderable": false, "searchable": false, 'targets': [ 'NoSort' ] },
154
                    { orderable: false, searchable: false, targets: ["NoSort"] },
155
                    { "type": "anti-the", "targets": [ "anti-the" ] }
155
                    { type: "anti-the", targets: ["anti-the"] },
156
                ],
156
                ],
157
                "pagingType": "full"
157
                pagingType: "full",
158
            }));
158
            });
159
159
160
            $(".SelectAll").on("click", function(){
160
            $(".SelectAll").on("click", function(){
161
                $("input[name='report_ids'][type='checkbox']").prop("checked", true);
161
                $("input[name='report_ids'][type='checkbox']").prop("checked", true);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt (-1 / +1 lines)
Lines 255-261 Link Here
255
            $('#quotes_editor').show();
255
            $('#quotes_editor').show();
256
            $("#save_quotes").on("click", yuiGetData);
256
            $("#save_quotes").on("click", yuiGetData);
257
257
258
            let table = $('#quotes_editor').dataTable( {
258
            let table = $('#quotes_editor').kohaTable( {
259
                "autoWidth"        : false,
259
                "autoWidth"        : false,
260
                "paging"         : true,
260
                "paging"         : true,
261
                "ordering"             : false,
261
                "ordering"             : false,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-2 / +2 lines)
Lines 638-644 Link Here
638
                            'vs.lastmodified',
638
                            'vs.lastmodified',
639
                            ];
639
                            ];
640
640
641
                var dtListResults = $("#listresultst").dataTable($.extend(true, {}, dataTablesDefaults, {
641
                var dtListResults = $("#listresultst").kohaTable({
642
                    order: [[ 5, "asc" ]],
642
                    order: [[ 5, "asc" ]],
643
                    serverSide:  true,
643
                    serverSide:  true,
644
                    ajax:  {
644
                    ajax:  {
Lines 676-682 Link Here
676
                    "searching": false,
676
                    "searching": false,
677
                    "processing": true,
677
                    "processing": true,
678
                    "orderCellsTop":  true
678
                    "orderCellsTop":  true
679
                }));
679
                });
680
                _dt_add_delay_filters(dtListResults.api(), $("#listresultst"));
680
                _dt_add_delay_filters(dtListResults.api(), $("#listresultst"));
681
681
682
                /* Select correct tab based on URL parameter */
682
                /* Select correct tab based on URL parameter */
(-)a/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js (-8 / +8 lines)
Lines 1-15 Link Here
1
/* global dataTablesDefaults __ template_path */
1
/* global __ template_path */
2
2
3
$(document).ready(function() {
3
$(document).ready(function() {
4
    $("#Aform").preventDoubleFormSubmit();
4
    $("#Aform").preventDoubleFormSubmit();
5
    $("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
5
    $("#files").kohaTable({
6
        "columnDefs":  [
6
        columnDefs: [
7
            { "orderable":  false, "searchable":  false, "targets":  [ 'NoSort' ] },
7
            { orderable: false, searchable: false, targets: ["NoSort"] },
8
            { "type":  "anti-the", "targets":  [ "anti-the" ] }
8
            { type: "anti-the", targets: ["anti-the"] },
9
        ],
9
        ],
10
        "pagingType":  "full",
10
        pagingType: "full",
11
        "order":  []
11
        order: [],
12
    }) );
12
    });
13
13
14
    checkOrderBudgets();
14
    checkOrderBudgets();
15
    var all_budget_id = $("#all_budget_id");
15
    var all_budget_id = $("#all_budget_id");
(-)a/koha-tmpl/intranet-tmpl/prog/js/authtype.js (-7 / +7 lines)
Lines 3-16 Link Here
3
var importing = false;
3
var importing = false;
4
4
5
$(document).ready(function() {
5
$(document).ready(function() {
6
    $("#authtypes").dataTable($.extend(true, {}, dataTablesDefaults, {
6
    $("#authtypes").kohaTable({
7
        "columnDefs":  [
7
        columnDefs: [
8
            { "targets":  [ -1 ], "orderable":  false, "searchable":  false },
8
            { targets: [-1], orderable: false, searchable: false },
9
            { "targets":  [ 0, 1 ], "type":  "natural" },
9
            { targets: [0, 1], type: "natural" },
10
        ],
10
        ],
11
        "ordering": true,
11
        ordering: true,
12
        "pagingType":  "full"
12
        pagingType: "full",
13
    }));
13
    });
14
14
15
    $("body").css("cursor", "auto");
15
    $("body").css("cursor", "auto");
16
    $('.import_export_options').hide();
16
    $('.import_export_options').hide();
(-)a/koha-tmpl/intranet-tmpl/prog/js/biblio_framework.js (-7 / +7 lines)
Lines 4-17 Link Here
4
    var importing = false;
4
    var importing = false;
5
5
6
    $(document).ready(function() {
6
    $(document).ready(function() {
7
        $("#table_biblio_frameworks").dataTable($.extend(true, {}, dataTablesDefaults, {
7
        $("#table_biblio_frameworks").kohaTable({
8
            "columnDefs":  [
8
            columnDefs: [
9
                { "targets":  [ -1 ], "orderable":  false, "searchable":  false },
9
                { targets: [-1], orderable: false, searchable: false },
10
                { "targets":  [ 0, 1 ], "type":  "natural" },
10
                { targets: [0, 1], type: "natural" },
11
            ],
11
            ],
12
            "ordering": true,
12
            ordering: true,
13
            "pagingType":  "full"
13
            pagingType: "full",
14
        }));
14
        });
15
15
16
        $("body").css("cursor", "auto");
16
        $("body").css("cursor", "auto");
17
        $('.import_export_options').hide();
17
        $('.import_export_options').hide();
(-)a/koha-tmpl/intranet-tmpl/prog/js/cart.js (-10 / +10 lines)
Lines 1-4 Link Here
1
/* global __ dataTablesDefaults showMore showLess delSelRecords addSelToShelf sendBasket printBasket delBasket openBiblio selRecord */
1
/* global __ showMore showLess delSelRecords addSelToShelf sendBasket printBasket delBasket openBiblio selRecord */
2
2
3
function placeHold () {
3
function placeHold () {
4
    var checkedItems = $("input:checkbox:checked");
4
    var checkedItems = $("input:checkbox:checked");
Lines 83-98 $(document).ready(function(){ Link Here
83
    $(".hold").text( __("Place hold") );
83
    $(".hold").text( __("Place hold") );
84
    $("#downloadcartc").empty();
84
    $("#downloadcartc").empty();
85
85
86
    $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
86
    $("#itemst").kohaTable({
87
        "dom":  't',
87
        dom: "t",
88
        "columnDefs":  [
88
        columnDefs: [
89
            { "orderable":  false, "searchable":  false, "targets":  [ 'NoSort' ] },
89
            { orderable: false, searchable: false, targets: ["NoSort"] },
90
            { "type":  "anti-the", "targets":  [ "anti-the" ] },
90
            { type: "anti-the", targets: ["anti-the"] },
91
            { "type":  "callnumbers", "targets":  [ "callnumbers"] }
91
            { type: "callnumbers", targets: ["callnumbers"] },
92
        ],
92
        ],
93
        "order":  [[ 1, "asc" ]],
93
        order: [[1, "asc"]],
94
        "paging":  false
94
        paging: false,
95
    }));
95
    });
96
96
97
    $(".showdetails").on("click",function(e){
97
    $(".showdetails").on("click",function(e){
98
        e.preventDefault();
98
        e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (-1 / +1 lines)
Lines 1025-1031 $(document).ready(function() { Link Here
1025
    }
1025
    }
1026
    function loadReturnClaimsTable() {
1026
    function loadReturnClaimsTable() {
1027
        if ( ! returnClaimsTable ) {
1027
        if ( ! returnClaimsTable ) {
1028
            returnClaimsTable = $("#return-claims-table").dataTable({
1028
            returnClaimsTable = $("#return-claims-table").kohaTable({
1029
                "autoWidth":  false,
1029
                "autoWidth":  false,
1030
                "dom":  "rt",
1030
                "dom":  "rt",
1031
                "order":  [],
1031
                "order":  [],
(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-4 / +12 lines)
Lines 1044-1060 function _dt_save_restore_state(table_settings, external_filter_nodes={}){ Link Here
1044
                };
1044
                };
1045
            }
1045
            }
1046
1046
1047
            if (options.ajax) {
1048
                options.ajax = Object.assign(
1049
                    {},
1050
                    options.ajax,
1051
                    _dt_default_ajax({ default_filters, options })
1052
                );
1053
                options.serverSide = true;
1054
                options.processing = true;
1055
                options.pagingType = "full_numbers";
1056
            }
1057
1047
            settings = $.extend(true, {}, dataTablesDefaults, {
1058
            settings = $.extend(true, {}, dataTablesDefaults, {
1048
                        "paging": true,
1059
                        "paging": true,
1049
                        'serverSide': true,
1050
                        'searching': true,
1060
                        'searching': true,
1051
                        'pagingType': 'full_numbers',
1052
                        'processing': true,
1053
                        'language': {
1061
                        'language': {
1054
                            'emptyTable': (options.emptyTable) ? options.emptyTable : __("No data available in table")
1062
                            'emptyTable': (options.emptyTable) ? options.emptyTable : __("No data available in table")
1055
                        },
1063
                        },
1056
                        'ajax': _dt_default_ajax({default_filters, options}),
1057
                    }, options);
1064
                    }, options);
1065
1058
        }
1066
        }
1059
1067
1060
        settings["buttons"] = _dt_buttons({settings, table_settings});
1068
        settings["buttons"] = _dt_buttons({settings, table_settings});
(-)a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js (-10 / +6 lines)
Lines 1-4 Link Here
1
/* global __ dataTablesDefaults */
1
/* global __ */
2
2
3
function clean_line(line) {
3
function clean_line(line) {
4
    $(line).find('input[type="text"]').val("");
4
    $(line).find('input[type="text"]').val("");
Lines 37-51 function tableInit( oldtabid, newtabid ) { Link Here
37
        oldTableId.DataTable().destroy();
37
        oldTableId.DataTable().destroy();
38
    }
38
    }
39
39
40
    var newTableId = $("#" + newtabid + "_table");
40
    $("#" + newtabid + "_table").kohaTable({
41
    newTableId.DataTable(
41
        columnDefs: [{ orderable: false, searchable: false, targets: ["NoSort"] }],
42
        $.extend(true, {}, dataTablesDefaults, {
42
        paging: false,
43
            "columnDefs": [
43
        autoWidth: false,
44
                { "orderable": false, "searchable": false, 'targets': ['NoSort'] },
44
    });
45
            ],
46
            "paging": false,
47
            "autoWidth": false
48
        }));
49
}
45
}
50
46
51
$(document).ready(function () {
47
$(document).ready(function () {
(-)a/koha-tmpl/intranet-tmpl/prog/js/holds.js (-1 / +1 lines)
Lines 91-97 function display_pickup_location (state) { Link Here
91
    };
91
    };
92
})(jQuery);
92
})(jQuery);
93
93
94
/* global __ dataTablesDefaults borrowernumber SuspendHoldsIntranet */
94
/* global __ borrowernumber SuspendHoldsIntranet */
95
$(document).ready(function() {
95
$(document).ready(function() {
96
96
97
    function suspend_hold(hold_id, end_date) {
97
    function suspend_hold(hold_id, end_date) {
(-)a/koha-tmpl/intranet-tmpl/prog/js/marc_subfields_structure.js (-8 / +6 lines)
Lines 1-4 Link Here
1
/* global dataTablesDefaults tagsubfield selectBsTabByHash */
1
/* global tagsubfield selectBsTabByHash */
2
$(document).ready(function() {
2
$(document).ready(function() {
3
    if( tagsubfield && tagsubfield == "@"){
3
    if( tagsubfield && tagsubfield == "@"){
4
        $("#subfieldtabs a[href='#AT_panel']").tab("show");
4
        $("#subfieldtabs a[href='#AT_panel']").tab("show");
Lines 29-41 $(document).ready(function() { Link Here
29
    $("input[id^='hidden-']").each(function() {
29
    $("input[id^='hidden-']").each(function() {
30
        populateHiddenCheckboxes($(this).attr('id').split('-')[1]);
30
        populateHiddenCheckboxes($(this).attr('id').split('-')[1]);
31
    });
31
    });
32
    $("#table_marcsubfieldstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
32
    $("#table_marcsubfieldstructure").kohaTable({
33
        "columnDefs": [
33
        columnDefs: [{ sortable: false, targets: ["NoSort"] }],
34
            { 'sortable': false, 'targets': [ 'NoSort' ] }
34
        order: [],
35
        ],
35
        paginate: false,
36
        "order": [],
36
    });
37
        "paginate": false
38
    }));
39
37
40
    selectBsTabByHash("subfieldtabs");
38
    selectBsTabByHash("subfieldtabs");
41
39
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js (-9 / +7 lines)
Lines 1-5 Link Here
1
/* keep tidy */
1
/* keep tidy */
2
/* global KOHA CodeMirror to_highlight search_jumped humanMsg dataTablesDefaults themelang */
2
/* global KOHA CodeMirror to_highlight search_jumped humanMsg themelang */
3
// We can assume 'KOHA' exists, as we depend on KOHA.AJAX
3
// We can assume 'KOHA' exists, as we depend on KOHA.AJAX
4
4
5
KOHA.Preferences = {
5
KOHA.Preferences = {
Lines 208-221 function addConsentDeleteHandler() { Link Here
208
    });
208
    });
209
}
209
}
210
210
211
$("table.preferences").dataTable(
211
$("table.preferences").kohaTable({
212
    $.extend(true, {}, dataTablesDefaults, {
212
    dom: "t",
213
        dom: "t",
213
    columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
214
        columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
214
    paging: false,
215
        paging: false,
215
    fixedHeader: false,
216
        fixedHeader: false,
216
});
217
    })
218
);
219
217
220
$(".prefs-tab")
218
$(".prefs-tab")
221
    .find("input.preference, textarea.preference")
219
    .find("input.preference, textarea.preference")
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js (-7 / +7 lines)
Lines 58-71 var success_test_call = function() { Link Here
58
};
58
};
59
59
60
$(document).ready(function() {
60
$(document).ready(function() {
61
    $("#tagst").dataTable($.extend(true, {}, dataTablesDefaults, {
61
    $("#tagst").kohaTable({
62
        "columnDefs":  [
62
        columnDefs: [
63
            { "orderable":  false, "searchable":  false, "targets":  [ 'NoSort' ] },
63
            { orderable: false, searchable: false, targets: ["NoSort"] },
64
            { "type":  "anti-the", "targets":  [ "anti-the" ] }
64
            { type: "anti-the", targets: ["anti-the"] },
65
        ],
65
        ],
66
        "order":  [[ 2, "desc" ]],
66
        order: [[2, "desc"]],
67
        "pagingType":  "full"
67
        pagingType: "full",
68
    }));
68
    });
69
    $('.ajax_buttons' ).css({visibility:"visible"});
69
    $('.ajax_buttons' ).css({visibility:"visible"});
70
    $("p.check").html("<div id=\"searchheader\"><a id=\"CheckAll\" href=\"/cgi-bin/koha/tags/review.pl\"><i class=\"fa fa-check\" aria-hidden=\"false\"><\/i> " + __("Select all") + "<\/a> | <a id=\"CheckNone\" href=\"/cgi-bin/koha/tags/review.pl\"><i class=\"fa fa-times\" aria-hidden=\"false\"><\/i> " + __("Clear all") + "<\/a> | <a id=\"CheckPending\" href=\"/cgi-bin/koha/tags/review.pl\"> " + __("Select all pending") + "<\/a><\/div>");
70
    $("p.check").html("<div id=\"searchheader\"><a id=\"CheckAll\" href=\"/cgi-bin/koha/tags/review.pl\"><i class=\"fa fa-check\" aria-hidden=\"false\"><\/i> " + __("Select all") + "<\/a> | <a id=\"CheckNone\" href=\"/cgi-bin/koha/tags/review.pl\"><i class=\"fa fa-times\" aria-hidden=\"false\"><\/i> " + __("Clear all") + "<\/a> | <a id=\"CheckPending\" href=\"/cgi-bin/koha/tags/review.pl\"> " + __("Select all pending") + "<\/a><\/div>");
71
71
(-)a/koha-tmpl/intranet-tmpl/prog/js/recalls.js (-7 / +7 lines)
Lines 102-115 $(document).ready(function() { Link Here
102
            }
102
            }
103
        });
103
        });
104
104
105
        $("#recalls-table").dataTable($.extend(true, {}, dataTablesDefaults, {
105
        $("#recalls-table").kohaTable({
106
            "columnDefs":  [
106
            columnDefs: [
107
                { "orderable":  false, "targets":  [ 'nosort' ] },
107
                { orderable: false, targets: ["nosort"] },
108
                { "type":  "title-string", "targets":  [ "title-string" ] },
108
                { type: "title-string", targets: ["title-string"] },
109
                { "type":  "anti-the", "targets":  [ "anti-the" ] }
109
                { type: "anti-the", targets: ["anti-the"] },
110
            ],
110
            ],
111
            "pagingType":  "full_numbers"
111
            pagingType: "full_numbers",
112
        }));
112
        });
113
113
114
        $("#cancel_selected").click(function(e){
114
        $("#cancel_selected").click(function(e){
115
            if ($("input[name='recall_ids']:checked").length > 0){
115
            if ($("input[name='recall_ids']:checked").length > 0){
(-)a/koha-tmpl/intranet-tmpl/prog/js/rotating-collections.js (-10 / +6 lines)
Lines 1-4 Link Here
1
/* global _ dataTablesDefaults */
1
/* global _ */
2
2
3
$(document).ready(function(){
3
$(document).ready(function(){
4
    $("#barcode").focus();
4
    $("#barcode").focus();
Lines 19-32 $(document).ready(function(){ Link Here
19
    });
19
    });
20
20
21
    if( $('#rotating-collections-table').length > 0 ){
21
    if( $('#rotating-collections-table').length > 0 ){
22
        $('#rotating-collections-table').dataTable($.extend(true, {}, dataTablesDefaults, {
22
        $("#rotating-collections-table").kohaTable({
23
            "autoWidth": false,
23
            autoWidth: false,
24
            "columnDefs":  [
24
            columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
25
                { "targets":  [ -1 ], "orderable":  false, "searchable":  false },
25
            pagingType: "full",
26
            ],
26
        });
27
            "pagingType":  "full"
28
        } ));
29
    }
27
    }
30
31
32
});
28
});
(-)a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js (-2 / +2 lines)
Lines 430-436 function mana_search() { Link Here
430
        .done( function( result ) {
430
        .done( function( result ) {
431
            $("#mana_search_result .modal-body").html(result);
431
            $("#mana_search_result .modal-body").html(result);
432
            $("#mana_search_result_label").text( __("Results from Mana Knowledge Base") );
432
            $("#mana_search_result_label").text( __("Results from Mana Knowledge Base") );
433
            $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults, {
433
            $("#mana_results_datatable").kohaTable({
434
                "pagingType":  "full",
434
                "pagingType":  "full",
435
                "order":[[4, "desc"], [5, "desc"]],
435
                "order":[[4, "desc"], [5, "desc"]],
436
                "autoWidth": false,
436
                "autoWidth": false,
Lines 441-447 function mana_search() { Link Here
441
                    { "orderable":  false, "searchable":  false, "targets":  [ 'NoSort' ] },
441
                    { "orderable":  false, "searchable":  false, "targets":  [ 'NoSort' ] },
442
                    { "type":  "anti-the", "targets":  [ 'anti-the'] }
442
                    { "type":  "anti-the", "targets":  [ 'anti-the'] }
443
                ]
443
                ]
444
            }));
444
            });
445
            if( $("#mana_results_datatable").length && $("td.dataTables_empty").length == 0){
445
            if( $("#mana_results_datatable").length && $("td.dataTables_empty").length == 0){
446
                $("#mana_search").html("<p>" + __("Subscription found on Mana Knowledge Base:") + "</p><p> <a href=\"#\" data-bs-toggle=\"modal\" data-bs-target=\"#mana_search_result\"><i class=\"fa-solid fa-window-maximize\"></i> " + __("Show Mana results") + "</a></p>");
446
                $("#mana_search").html("<p>" + __("Subscription found on Mana Knowledge Base:") + "</p><p> <a href=\"#\" data-bs-toggle=\"modal\" data-bs-target=\"#mana_search_result\"><i class=\"fa-solid fa-window-maximize\"></i> " + __("Show Mana results") + "</a></p>");
447
            }
447
            }
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsEBSCOTitlePackagesList.vue (-83 / +80 lines)
Lines 89-183 export default { Link Here
89
            $.fn.dataTable.ext.search = $.fn.dataTable.ext.search.filter(
89
            $.fn.dataTable.ext.search = $.fn.dataTable.ext.search.filter(
90
                search => search.name != "apply_filter"
90
                search => search.name != "apply_filter"
91
            )
91
            )
92
            $("#" + table_id).dataTable({
92
            $("#" + table_id).kohaTable({
93
                ...dataTablesDefaults,
93
                data: resources,
94
                ...{
94
                embed: ["package.name"],
95
                    data: resources,
95
                ordering: false,
96
                    embed: ["package.name"],
96
                dom: '<"top pager"<"table_entries"ilp>>tr<"bottom pager"ip>',
97
                    ordering: false,
97
                lengthMenu: [
98
                    dom: '<"top pager"<"table_entries"ilp>>tr<"bottom pager"ip>',
98
                    [10, 20, 50, 100],
99
                    lengthMenu: [
99
                    [10, 20, 50, 100],
100
                        [10, 20, 50, 100],
100
                ],
101
                        [10, 20, 50, 100],
101
                autoWidth: false,
102
                    ],
102
                columns: [
103
                    autoWidth: false,
103
                    {
104
                    columns: [
104
                        title: __("Name"),
105
                        {
105
                        data: "package.name",
106
                            title: __("Name"),
106
                        searchable: false,
107
                            data: "package.name",
107
                        orderable: false,
108
                            searchable: false,
108
                        render: function (data, type, row, meta) {
109
                            orderable: false,
109
                            // Rendering done in drawCallback
110
                            render: function (data, type, row, meta) {
110
                            return ""
111
                                // Rendering done in drawCallback
112
                                return ""
113
                            },
114
                            width: "100%",
115
                        },
111
                        },
116
                    ],
112
                        width: "100%",
117
                    drawCallback: function (settings) {
113
                    },
118
                        var api = new $.fn.dataTable.Api(settings)
114
                ],
115
                drawCallback: function (settings) {
116
                    var api = new $.fn.dataTable.Api(settings)
119
117
120
                        if (!api.rows({ search: "applied" }).count()) return
118
                    if (!api.rows({ search: "applied" }).count()) return
121
119
122
                        $.each(
120
                    $.each(
123
                            $(this).find("tbody tr td:first-child"),
121
                        $(this).find("tbody tr td:first-child"),
124
                            function (index, e) {
122
                        function (index, e) {
125
                                let tr = $(this).parent()
123
                            let tr = $(this).parent()
126
                                let row = api.row(tr).data()
124
                            let row = api.row(tr).data()
127
                                if (!row) return // Happen if the table is empty
125
                            if (!row) return // Happen if the table is empty
128
                                let { href } = router.resolve({
126
                            let { href } = router.resolve({
129
                                    name: "EHoldingsEBSCOResourcesShow",
127
                                name: "EHoldingsEBSCOResourcesShow",
130
                                    params: { resource_id: row.resource_id },
128
                                params: { resource_id: row.resource_id },
131
                                })
129
                            })
132
                                let n = createVNode(
130
                            let n = createVNode(
133
                                    "a",
131
                                "a",
134
                                    {
132
                                {
135
                                        role: "button",
133
                                    role: "button",
136
                                        href,
134
                                    href,
137
                                        onClick: e => {
135
                                    onClick: e => {
138
                                            e.preventDefault()
136
                                        e.preventDefault()
139
                                            show_resource(row.resource_id)
137
                                        show_resource(row.resource_id)
140
                                        },
141
                                    },
138
                                    },
142
                                    `${row.package.name}`
139
                                },
143
                                )
140
                                `${row.package.name}`
144
                                if (row.is_selected) {
141
                            )
145
                                    n = createVNode("span", {}, [
142
                            if (row.is_selected) {
146
                                        n,
143
                                n = createVNode("span", {}, [
147
                                        " ",
144
                                    n,
148
                                        createVNode("i", {
145
                                    " ",
149
                                            class: "fa fa-check-square",
146
                                    createVNode("i", {
150
                                            style: {
147
                                        class: "fa fa-check-square",
151
                                                color: "green",
148
                                        style: {
152
                                                float: "right",
149
                                            color: "green",
153
                                            },
150
                                            float: "right",
154
                                            title: __("Is selected"),
151
                                        },
155
                                        }),
152
                                        title: __("Is selected"),
156
                                    ])
153
                                    }),
157
                                }
154
                                ])
158
                                render(n, e)
159
                            }
155
                            }
156
                            render(n, e)
157
                        }
158
                    )
159
                },
160
                initComplete: function () {
161
                    $.fn.dataTable.ext.search.push(function apply_filter(
162
                        settings,
163
                        data,
164
                        dataIndex,
165
                        row
166
                    ) {
167
                        return (
168
                            row.package.name.match(
169
                                new RegExp(filters.package_name, "i")
170
                            ) &&
171
                            (filters.selection_type == 0 ||
172
                                (filters.selection_type == 1 &&
173
                                    row.is_selected) ||
174
                                (filters.selection_type == 2 &&
175
                                    !row.is_selected))
160
                        )
176
                        )
161
                    },
177
                    })
162
                    initComplete: function () {
163
                        $.fn.dataTable.ext.search.push(function apply_filter(
164
                            settings,
165
                            data,
166
                            dataIndex,
167
                            row
168
                        ) {
169
                            return (
170
                                row.package.name.match(
171
                                    new RegExp(filters.package_name, "i")
172
                                ) &&
173
                                (filters.selection_type == 0 ||
174
                                    (filters.selection_type == 1 &&
175
                                        row.is_selected) ||
176
                                    (filters.selection_type == 2 &&
177
                                        !row.is_selected))
178
                            )
179
                        })
180
                    },
181
                },
178
                },
182
            })
179
            })
183
        },
180
        },
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlePackagesList.vue (-2 / +1 lines)
Lines 33-40 export default { Link Here
33
            let resources = this.resources
33
            let resources = this.resources
34
            let table_id = this.table_id
34
            let table_id = this.table_id
35
35
36
            $("#" + table_id).dataTable(
36
            $("#" + table_id).kohaTable({
37
                $.extend(true, {}, dataTablesDefaults, {
38
                    data: resources,
37
                    data: resources,
39
                    embed: ["package.name"],
38
                    embed: ["package.name"],
40
                    order: [[0, "asc"]],
39
                    order: [[0, "asc"]],
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesFormImport.vue (-60 / +50 lines)
Lines 82-151 export default { Link Here
82
            let lists = this.logged_in_user_lists
82
            let lists = this.logged_in_user_lists
83
            let table_id = this.table_id
83
            let table_id = this.table_id
84
            let import_from_list = this.import_from_list
84
            let import_from_list = this.import_from_list
85
            $("#" + table_id).dataTable(
85
            $("#" + table_id).kohaTable({
86
                $.extend(true, {}, dataTablesDefaults, {
86
                data: lists,
87
                    data: lists,
87
                order: [[0, "asc"]],
88
                    order: [[0, "asc"]],
88
                autoWidth: false,
89
                    autoWidth: false,
89
                columns: [
90
                    columns: [
90
                    {
91
                        {
91
                        title: __("Name"),
92
                            title: __("Name"),
92
                        data: "shelfname",
93
                            data: "shelfname",
93
                        searchable: true,
94
                            searchable: true,
94
                        orderable: true,
95
                            orderable: true,
95
                        width: "100%",
96
                            width: "100%",
96
                        render: function (data, type, row, meta) {
97
                            render: function (data, type, row, meta) {
97
                            return row.shelfname + " (#" + row.shelfnumber + ")"
98
                                return (
99
                                    row.shelfname +
100
                                    " (#" +
101
                                    row.shelfnumber +
102
                                    ")"
103
                                )
104
                            },
105
                        },
98
                        },
106
                        {
99
                    },
107
                            title: __("Actions"),
100
                    {
108
                            data: function (row, type, val, meta) {
101
                        title: __("Actions"),
109
                                return '<div class="actions"></div>'
102
                        data: function (row, type, val, meta) {
110
                            },
103
                            return '<div class="actions"></div>'
111
                            className: "actions noExport",
112
                            searchable: false,
113
                            orderable: false,
114
                        },
104
                        },
115
                    ],
105
                        className: "actions noExport",
116
                    drawCallback: function (settings) {
106
                        searchable: false,
117
                        var api = new $.fn.dataTable.Api(settings)
107
                        orderable: false,
118
108
                    },
119
                        $.each(
109
                ],
120
                            $(this).find("td .actions"),
110
                drawCallback: function (settings) {
121
                            function (index, e) {
111
                    var api = new $.fn.dataTable.Api(settings)
122
                                let tr = $(this).parent().parent()
123
                                let list_id = api.row(tr).data().shelfnumber
124
                                let importButton = createVNode(
125
                                    "a",
126
                                    {
127
                                        class: "btn btn-default btn-xs",
128
                                        role: "button",
129
                                        onClick: () => {
130
                                            import_from_list(list_id)
131
                                        },
132
                                    },
133
                                    [
134
                                        createVNode("i", {
135
                                            class: "fa fa-download",
136
                                            "aria-hidden": "true",
137
                                        }),
138
                                        __("Import"),
139
                                    ]
140
                                )
141
112
142
                                let n = createVNode("span", {}, [importButton])
113
                    $.each($(this).find("td .actions"), function (index, e) {
143
                                render(n, e)
114
                        let tr = $(this).parent().parent()
144
                            }
115
                        let list_id = api.row(tr).data().shelfnumber
116
                        let importButton = createVNode(
117
                            "a",
118
                            {
119
                                class: "btn btn-default btn-xs",
120
                                role: "button",
121
                                onClick: () => {
122
                                    import_from_list(list_id)
123
                                },
124
                            },
125
                            [
126
                                createVNode("i", {
127
                                    class: "fa fa-download",
128
                                    "aria-hidden": "true",
129
                                }),
130
                                __("Import"),
131
                            ]
145
                        )
132
                        )
146
                    },
133
147
                })
134
                        let n = createVNode("span", {}, [importButton])
148
            )
135
                        render(n, e)
136
                    })
137
                },
138
            })
149
        },
139
        },
150
    },
140
    },
151
    mounted() {
141
    mounted() {

Return to bug 38255