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 1159-1175 Link Here
1159
        $(document).ready(function() {
1159
        $(document).ready(function() {
1160
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
1160
            var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
1161
            [% IF !(Koha.Preference('EDIFACT') && ediaccount) %]
1161
            [% IF !(Koha.Preference('EDIFACT') && ediaccount) %]
1162
                // FIXME This cannot work correctly without bKohaColumnsUseNames
1162
                table_settings['columns'].splice(18, 1);
1163
                table_settings['columns'].splice(18, 1);
1163
            [% END %]
1164
            [% END %]
1164
            KohaTable("orders", {
1165
            $("#orders").kohaTable({
1165
                "pagingType": "full",
1166
                pagingType: "full",
1166
                "autoWidth": false,
1167
                autoWidth: false,
1167
                "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 %]],
1168
                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 %]],
1168
            }, table_settings);
1169
            }, table_settings);
1169
1170
1170
            var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
1171
            $("#cancelledorderst").kohaTable({
1171
                "pagingType": "full"
1172
                pagingType: "full"
1172
            } ) );
1173
            });
1173
            $("#reopenform").on("submit",function(e){
1174
            $("#reopenform").on("submit",function(e){
1174
                var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
1175
                var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
1175
                var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
1176
                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 263-278 Link Here
263
    [% Asset.js("js/acq.js") | $raw %]
263
    [% Asset.js("js/acq.js") | $raw %]
264
    <script>
264
    <script>
265
        $(document).ready(function() {
265
        $(document).ready(function() {
266
            $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
266
            $("table.baskets").kohaTable({
267
                "dom": 't',
267
                dom: "t",
268
                "paginate": false,
268
                paginate: false,
269
                "searching": false,
269
                searching: false,
270
                "info": false,
270
                info: false,
271
                "order": [[ 1, "asc" ]],
271
                order: [[1, "asc"]],
272
                "columnDefs": [
272
                columnDefs: [{ targets: [-1], orderable: false }],
273
                    { "targets": [-1], "orderable": false }
273
            });
274
                ]
275
            }));
276
            $("#supplierlist").change(function() {
274
            $("#supplierlist").change(function() {
277
                var id = $(this).find("option:selected").val();
275
                var id = $(this).find("option:selected").val();
278
                window.location.href = "#vendor" + id;
276
                window.location.href = "#vendor" + id;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt (-6 / +6 lines)
Lines 130-143 Link Here
130
    [% INCLUDE 'datatables.inc' %]
130
    [% INCLUDE 'datatables.inc' %]
131
    <script>
131
    <script>
132
        $(document).ready(function() {
132
        $(document).ready(function() {
133
            $("#invoice_files_details_table").dataTable($.extend(true, {}, dataTablesDefaults, {
133
            $("#invoice_files_details_table").kohaTable({
134
                "columnDefs": [
134
                columnDefs: [
135
                    { "targets": [ -1, -2 ], "orderable": false, "searchable":  false }
135
                    { "targets": [ -1, -2 ], "orderable": false, "searchable":  false }
136
                ],
136
                ],
137
                "info": false,
137
                info: false,
138
                "paging": false,
138
                paging: false,
139
                "searching": false,
139
                searching: false,
140
                "dom": "t"
140
                dom: "t"
141
            }));
141
            }));
142
            $(".delete_file").click(function(){
142
            $(".delete_file").click(function(){
143
                return ( confirm( _("Are you sure you want to delete this file?") ) );
143
                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 563-584 Link Here
563
        }
563
        }
564
564
565
        $(document).ready(function() {
565
        $(document).ready(function() {
566
            $("#orderst").dataTable($.extend(true, {}, dataTablesDefaults, {
566
            $("#orderst").kohaTable({
567
                "info": false,
567
                info: false,
568
                "paging": false,
568
                paging: false,
569
                "searching": false,
569
                searching: false,
570
                "dom": "t",
570
                dom: "t",
571
                "columnDefs": [
571
                columnDefs: [{ type: "anti-the", targets: ["anti-the"] }],
572
                    { "type": "anti-the", "targets": [ "anti-the" ] }
572
            });
573
                ]
574
            }));
575
            [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %]
573
            [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %]
576
                $("#invoice_files_table").dataTable($.extend(true, {}, dataTablesDefaults, {
574
                $("#invoice_files_table").kohaTable({
577
                    "info": false,
575
                    info: false,
578
                    "paging": false,
576
                    paging: false,
579
                    "searching": false,
577
                    searching: false,
580
                    "dom": "t"
578
                    dom: "t",
581
                }));
579
                });
582
            [% END %]
580
            [% END %]
583
            $("#show_all_details").click(function(){
581
            $("#show_all_details").click(function(){
584
                updateColumnsVisibility( $(this).is(":checked") );
582
                updateColumnsVisibility( $(this).is(":checked") );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt (-7 / +7 lines)
Lines 440-453 Link Here
440
                });
440
                });
441
            });
441
            });
442
442
443
            var resultst = $("table.result").dataTable($.extend(true, {}, dataTablesDefaults, {
443
            var resultst = $("table.result").kohaTable({
444
                "paging": false,
444
                paging: false,
445
                "columnDefs": [
445
                columnDefs: [
446
                    { "orderable": false, "targets": [1, -1] },
446
                    { orderable: false, targets: [1, -1] },
447
                    { "visible": false, "targets": [0] }
447
                    { visible: false, targets: [0] },
448
                ],
448
                ],
449
                autoWidth: false
449
                autoWidth: false,
450
            }));
450
            });
451
451
452
            $(".show_only_subscription").prop("checked", false);
452
            $(".show_only_subscription").prop("checked", false);
453
453
(-)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 131-143 Link Here
131
    [% INCLUDE 'calendar.inc' %]
131
    [% INCLUDE 'calendar.inc' %]
132
    <script>
132
    <script>
133
    $(document).ready(function() {
133
    $(document).ready(function() {
134
        var suggestionst = $("#suggestionst").dataTable($.extend(true, {}, dataTablesDefaults, {
134
        var suggestionst = $("#suggestionst").kohaTable({
135
            "columnDefs": [
135
            columnDefs: [
136
                { "targets": [ 0 ],  "visible": false, "searchable":  true }, // must be searchable for filtering
136
                { targets: [0], visible: false, searchable: true }, // must be searchable for filtering
137
                { "targets": [ -1 ], "orderable": false, "searchable":  false },
137
                { targets: [-1], orderable: false, searchable: false },
138
            ],
138
            ],
139
            "pagingType": "full"
139
            pagingType: "full",
140
        }));
140
        });
141
        let table_dt = suggestionst.DataTable();
141
        let table_dt = suggestionst.DataTable();
142
        $("#show_only_mine").on('click', function(e){
142
        $("#show_only_mine").on('click', function(e){
143
            e.preventDefault();
143
            e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt (-6 / +4 lines)
Lines 143-154 Link Here
143
    [% INCLUDE 'datatables.inc' %]
143
    [% INCLUDE 'datatables.inc' %]
144
    <script>
144
    <script>
145
        $(document).ready(function() {
145
        $(document).ready(function() {
146
            $("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
146
            $("#spent").kohaTable({
147
                "columnDefs": [
147
                columnDefs: [{ type: "anti-the", targets: ["anti-the"] }],
148
                    { "type": "anti-the", "targets":  [ "anti-the" ] }
148
                pagingType: "full",
149
                ],
149
            });
150
                "pagingType": "full"
151
            }));
152
        });
150
        });
153
    </script>
151
    </script>
154
[% END %]
152
[% 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 263-271 Link Here
263
    [% INCLUDE 'datatables.inc' %]
263
    [% INCLUDE 'datatables.inc' %]
264
    <script>
264
    <script>
265
        $(document).ready(function() {
265
        $(document).ready(function() {
266
            var parcelst = $("#parcelst").dataTable($.extend(true, {}, dataTablesDefaults, {
266
            $("#parcelst").kohaTable({
267
                "paginate": false
267
                paginate: false
268
            }));
268
            });
269
269
270
            //keep a copy of all budgets before removing the inactives
270
            //keep a copy of all budgets before removing the inactives
271
            var budgetId = $("#shipmentcost_budgetid");
271
            var budgetId = $("#shipmentcost_budgetid");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt (-6 / +4 lines)
Lines 158-169 Link Here
158
    [% INCLUDE 'datatables.inc' %]
158
    [% INCLUDE 'datatables.inc' %]
159
    <script>
159
    <script>
160
        $(document).ready(function() {
160
        $(document).ready(function() {
161
            $("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
161
            $("#spent").kohaTable({
162
                "columnDefs": [
162
                columnDefs: [{ type: "anti-the", targets: ["anti-the"] }],
163
                    { "type": "anti-the", "targets":  [ "anti-the" ] }
163
                pagingType: "full",
164
                ],
164
            });
165
                "pagingType": "full"
166
            } ) );
167
        });
165
        });
168
    </script>
166
    </script>
169
[% END %]
167
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt (-5 / +5 lines)
Lines 690-701 Link Here
690
        }
690
        }
691
691
692
         $(document).ready(function() {
692
         $(document).ready(function() {
693
            var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, {
693
            var contractst = $("#contractst").kohaTable({
694
                "columnDefs": [
694
                columnDefs: [
695
                    { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] }
695
                    { orderable: false, searchable:  false, targets: [ 'NoSort' ] }
696
                ],
696
                ],
697
                "dom": 't'
697
                dom: 't'
698
            } ) );
698
            } );
699
            $('body').on('click', '.delete-contact', null, delete_contact);
699
            $('body').on('click', '.delete-contact', null, delete_contact);
700
            $('#add-contact').click(add_contact);
700
            $('#add-contact').click(add_contact);
701
            $('body').on('click', '.contact_acqprimary', null, function () {
701
            $('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 310-323 Link Here
310
                $('#selecttable').submit();
310
                $('#selecttable').submit();
311
            });
311
            });
312
312
313
            $("#fieldst").dataTable($.extend(true, {}, dataTablesDefaults, {
313
            $("#fieldst").kohaTable({
314
                "autoWidth": false,
314
                autoWidth: false,
315
                "dom": 't<"bottom pager"ilpf>',
315
                dom: 't<"bottom pager"ilpf>',
316
                "pagingType": 'full',
316
                pagingType: "full",
317
                "lengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
317
                lengthMenu: [
318
                "pageLength": 20,
318
                    [10, 20, 50, 100, -1],
319
                "order": [[ 0, "asc" ]],
319
                    [10, 20, 50, 100, "All"],
320
            }));
320
                ],
321
                pageLength: 20,
322
                order: [[0, "asc"]],
323
            });
321
324
322
            $("#add_field").on('submit', function() {
325
            $("#add_field").on('submit', function() {
323
                if ( $("#marcfield").length && $("select[name='authorised_value_category']").length ) {
326
                if ( $("#marcfield").length && $("select[name='authorised_value_category']").length ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt (-12 / +13 lines)
Lines 565-582 Link Here
565
                $("#budgetsTabs li:eq([% tab | html %]) a").tab("show");
565
                $("#budgetsTabs li:eq([% tab | html %]) a").tab("show");
566
            [% END %]
566
            [% END %]
567
567
568
            $("#activeperiodst,#inactiveperiodst").dataTable($.extend(true, {}, dataTablesDefaults, {
568
            let dt_params = {
569
                "columnDefs": [
569
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
570
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
570
                pagingType: "full",
571
                ],
571
                autoWidth: false,
572
                "pagingType": "full",
572
            };
573
                "autoWidth": false
573
574
            } ) );
574
            $("#activeperiodst").kohaTable(dt_params);
575
            $("#inactiveperiodst").kohaTable(dt_params);
575
576
576
            [% IF close_form %]
577
            [% IF close_form %]
577
              $("#budgeth").dataTable($.extend(true, {}, dataTablesDefaults, {
578
                $("#budgeth").kohaTable({
578
                "dom": "t"
579
                    dom: "t",
579
              }));
580
                });
580
              $("#move_form").submit(function(){
581
              $("#move_form").submit(function(){
581
                var budget_from = "[% budget_period_description | html %]";
582
                var budget_from = "[% budget_period_description | html %]";
582
                var budget_to = $("#to_budget_period_id").find("option:selected").html();
583
                var budget_to = $("#to_budget_period_id").find("option:selected").html();
Lines 586-592 Link Here
586
              });
587
              });
587
            [% END %]
588
            [% END %]
588
            [% IF closed %]
589
            [% IF closed %]
589
              var oTable = $("#closed_report").dataTable($.extend(true, {}, dataTablesDefaults, {
590
              var oTable = $("#closed_report").kohaTable({
590
                // The following is a c/p from aqbudgets.tt and is a candidate for refactoring.
591
                // The following is a c/p from aqbudgets.tt and is a candidate for refactoring.
591
                "drawCallback": function ( oSettings ) {
592
                "drawCallback": function ( oSettings ) {
592
                    if ( oSettings.aiDisplay.length == 0 )
593
                    if ( oSettings.aiDisplay.length == 0 )
Lines 622-628 Link Here
622
                "orderFixed": [[ 1, 'asc' ]],
623
                "orderFixed": [[ 1, 'asc' ]],
623
                "autoWidth": false,
624
                "autoWidth": false,
624
                "pagingType": "full_numbers"
625
                "pagingType": "full_numbers"
625
              }));
626
              });
626
            [% END %]
627
            [% END %]
627
            $("#add_modify_budget").validate({
628
            $("#add_modify_budget").validate({
628
                rules: {
629
                rules: {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt (-6 / +4 lines)
Lines 411-423 Link Here
411
    [% Asset.js("js/admin-menu.js") | $raw %]
411
    [% Asset.js("js/admin-menu.js") | $raw %]
412
    <script>
412
    <script>
413
        $(document).ready(function() {
413
        $(document).ready(function() {
414
            $("#table_authsubfieldstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
414
            $("#table_authsubfieldstructure").kohaTable({
415
                "columnDefs": [
415
                columnDefs: [{ sortable: false, targets: ["NoSort"] }],
416
                    { 'sortable': false, 'targets': [ 'NoSort' ] }
417
                ],
418
                aaSorting: [],
416
                aaSorting: [],
419
                paginate: false
417
                paginate: false,
420
            }));
418
            });
421
419
422
            if ($("#subfieldtabs").length > 0) {
420
            if ($("#subfieldtabs").length > 0) {
423
                [% IF ( tagsubfield && tagsubfield == "@") %]
421
                [% IF ( tagsubfield && tagsubfield == "@") %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt (-6 / +4 lines)
Lines 298-309 Link Here
298
    [% Asset.js("js/admin-menu.js") | $raw %]
298
    [% Asset.js("js/admin-menu.js") | $raw %]
299
    <script>
299
    <script>
300
        $(document).ready(function() {
300
        $(document).ready(function() {
301
            $("#table_authtagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
301
            $("#table_authtagstructure").kohaTable({
302
                "columnDefs": [
302
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
303
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
303
                pagingType: "full",
304
                ],
304
            });
305
                "pagingType": "full"
306
            }));
307
        });
305
        });
308
    </script>
306
    </script>
309
[% END %]
307
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt (-6 / +7 lines)
Lines 167-178 Link Here
167
                })
167
                })
168
            });
168
            });
169
169
170
            $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
170
171
                "columnDefs": [
171
            [% FOREACH codes_loo IN codes_loop %]
172
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
172
                $("#[% codes_loo.code | html %]table").kohaTable({
173
                ],
173
                    columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
174
                "paginate": false
174
                    paginate: false,
175
            }));
175
                });
176
            [% END %]
176
        });
177
        });
177
    </script>
178
    </script>
178
[% END %]
179
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt (-7 / +5 lines)
Lines 264-276 Link Here
264
    }
264
    }
265
265
266
    $(document).ready(function() {
266
    $(document).ready(function() {
267
        var crtable = $("#table_cash_registers").DataTable($.extend(true, {}, dataTablesDefaults, {
267
        var crtable = $("#table_cash_registers").kohaTable({
268
              "columnDefs": [
268
            columnDefs: [{ targets: [-1, -2], orderable: false, searchable: false }],
269
                  { "targets": [ -1, -2 ], "orderable": false, "searchable": false },
269
            order: [[1, "asc"]],
270
               ],
270
            paginationType: "full",
271
               "order": [[ 1, "asc" ]],
271
        });
272
               "paginationType": "full",
273
        }));
274
272
275
        $("#branch_filter").on("change", function(){
273
        $("#branch_filter").on("change", function(){
276
            // Table must be filtered by the <option>'s text, not its value
274
            // 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 249-255 Link Here
249
        $(document).ready(function() {
249
        $(document).ready(function() {
250
            var txtActivefilter = _("Filter system credit types");
250
            var txtActivefilter = _("Filter system credit types");
251
            var txtInactivefilter = _("Show all credit types");
251
            var txtInactivefilter = _("Show all credit types");
252
            var table_credit_types = $("#table_credit_types").dataTable($.extend(true, {}, dataTablesDefaults, {
252
            var table_credit_types = $("#table_credit_types").kohaTable({
253
                "columnDefs": [
253
                "columnDefs": [
254
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
254
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
255
                    { "targets": [ 0, 1 ], "orderable": false, "visible": false },
255
                    { "targets": [ 0, 1 ], "orderable": false, "visible": false },
Lines 258-264 Link Here
258
                "dom": 'C<"top pager"ilpfB><"#filter_s">tr<"bottom pager"ip>',
258
                "dom": 'C<"top pager"ilpfB><"#filter_s">tr<"bottom pager"ip>',
259
                "pageLength": 20,
259
                "pageLength": 20,
260
                "pagingType": "full_numbers"
260
                "pagingType": "full_numbers"
261
            }));
261
            });
262
            $("#filter_s").html('<p><a href="#" id="filter_system"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
262
            $("#filter_s").html('<p><a href="#" id="filter_system"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
263
            $('#filter_system').click(function(e) {
263
            $('#filter_system').click(function(e) {
264
                e.preventDefault();
264
                e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt (-2 / +2 lines)
Lines 269-275 Link Here
269
        $(document).ready(function() {
269
        $(document).ready(function() {
270
            var txtActivefilter = _("Filter system debit types");
270
            var txtActivefilter = _("Filter system debit types");
271
            var txtInactivefilter = _("Show all debit types");
271
            var txtInactivefilter = _("Show all debit types");
272
            var table_debit_types = $("#table_debit_types").dataTable($.extend(true, {}, dataTablesDefaults, {
272
            var table_debit_types = $("#table_debit_types").kohaTable({
273
                "columnDefs": [
273
                "columnDefs": [
274
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
274
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
275
                    { "targets": [ 0, 1 ], "orderable": false, "visible": false },
275
                    { "targets": [ 0, 1 ], "orderable": false, "visible": false },
Lines 278-284 Link Here
278
                "dom": 'C<"top pager"ilpfB><"#filter_s">tr<"bottom pager"ip>',
278
                "dom": 'C<"top pager"ilpfB><"#filter_s">tr<"bottom pager"ip>',
279
                "pageLength": 20,
279
                "pageLength": 20,
280
                "pagingType": "full_numbers"
280
                "pagingType": "full_numbers"
281
            }));
281
            });
282
            $("#filter_s").html('<p><a href="#" id="filter_system"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
282
            $("#filter_s").html('<p><a href="#" id="filter_system"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
283
            $('#filter_system').click(function(e) {
283
            $('#filter_system').click(function(e) {
284
                e.preventDefault();
284
                e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt (-6 / +4 lines)
Lines 114-125 Link Here
114
            }
114
            }
115
        }
115
        }
116
        $(document).ready(function() {
116
        $(document).ready(function() {
117
            $("#kohafields").dataTable($.extend(true, {}, dataTablesDefaults, {
117
            $("#kohafields").kohaTable({
118
                "columnDefs": [
118
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
119
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
119
                paging: false,
120
                ],
120
            });
121
                "paging":   false
122
            } ));
123
121
124
            $(".addfld").on("click", function(e){
122
            $(".addfld").on("click", function(e){
125
                e.preventDefault();
123
                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 364-370 Link Here
364
                });
364
                });
365
        }
365
        }
366
366
367
        $('#marc-overlay-rules').dataTable($.extend(true, {}, dataTablesDefaults, {
367
        $('#marc-overlay-rules').kohaTable({
368
            "columns": [
368
            "columns": [
369
                {"searchable":  false, "orderable": false},
369
                {"searchable":  false, "orderable": false},
370
                {"orderDataType": "dom-input"},
370
                {"orderDataType": "dom-input"},
Lines 379-385 Link Here
379
                {"searchable":  false, "orderable": false}
379
                {"searchable":  false, "orderable": false}
380
            ],
380
            ],
381
            "pagingType": "simple"
381
            "pagingType": "simple"
382
        }));
382
        });
383
383
384
        var overlay_rules_presets = {};
384
        var overlay_rules_presets = {};
385
        overlay_rules_presets["protect"] = {
385
        overlay_rules_presets["protect"] = {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt (-6 / +4 lines)
Lines 311-322 Link Here
311
    [% Asset.js("js/admin-menu.js") | $raw %]
311
    [% Asset.js("js/admin-menu.js") | $raw %]
312
    <script>
312
    <script>
313
        $(document).ready(function() {
313
        $(document).ready(function() {
314
            $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
314
            $("#table_marctagstructure").kohaTable({
315
                "columnDefs": [
315
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
316
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
316
                pagingType: "full",
317
                ],
317
            });
318
                "pagingType": "full"
319
            }));
320
            $("#select_display").on("change",function(){
318
            $("#select_display").on("change",function(){
321
                var checked = $(this).prop("checked") ? 1: 0;
319
                var checked = $(this).prop("checked") ? 1: 0;
322
                Cookies.set("marctagstructure_selectdisplay", checked, { sameSite: 'Lax' });
320
                Cookies.set("marctagstructure_selectdisplay", checked, { sameSite: 'Lax' });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_servers.tt (-6 / +4 lines)
Lines 221-232 Link Here
221
            });
221
            });
222
        [% ELSE %]
222
        [% ELSE %]
223
            $(document).ready(function() {
223
            $(document).ready(function() {
224
                $("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, {
224
                $("#serverst").kohaTable({
225
                    "columnDefs": [
225
                    columnDefs: [{ sortable: false, targets: ["NoSort"] }],
226
                        { 'sortable': false, 'targets': [ 'NoSort' ] }
226
                    pagingType: "full",
227
                    ],
227
                });
228
                    "pagingType": "full",
229
                }));
230
                $(".delete").on("click",function(e){
228
                $(".delete").on("click",function(e){
231
                    var servername = $(this).data("servername");
229
                    var servername = $(this).data("servername");
232
                    let formid = $(this).data("formid");
230
                    let formid = $(this).data("formid");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/overdrive.tt (-6 / +4 lines)
Lines 84-95 Link Here
84
    [% INCLUDE 'datatables.inc' %]
84
    [% INCLUDE 'datatables.inc' %]
85
    <script>
85
    <script>
86
        $(document).ready(function() {
86
        $(document).ready(function() {
87
            $("#od_info").dataTable($.extend(true, {}, dataTablesDefaults, {
87
            $("#od_info").kohaTable({
88
                "columnDefs": [
88
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
89
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
89
                pagingType: "full",
90
                ],
90
            });
91
                "pagingType": "full"
92
            }));
93
        });
91
        });
94
    </script>
92
    </script>
95
[% END %]
93
[% 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 326-337 Link Here
326
            }
326
            }
327
        [% ELSE %]
327
        [% ELSE %]
328
            $(document).ready(function() {
328
            $(document).ready(function() {
329
                $("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, {
329
                $("#serverst").kohaTable({
330
                    "columnDefs": [
330
                    columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
331
                        { "targets": [-1], "orderable": false, "searchable":  false },
331
                    pagingType: "full",
332
                    ],
332
                });
333
                    "pagingType": "full"
334
                }));
335
                $(".delete").on("click",function(e){
333
                $(".delete").on("click",function(e){
336
                    var servername = $(this).data("servername");
334
                    var servername = $(this).data("servername");
337
                    let formid = $(this).data("formid");
335
                    let formid = $(this).data("formid");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-6 / +6 lines)
Lines 2032-2044 Link Here
2032
            [% END %]
2032
            [% END %]
2033
2033
2034
            [% IF suggestions.count %]
2034
            [% IF suggestions.count %]
2035
                $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
2035
                $("#suggestions").kohaTable({
2036
                    "columnDefs": [
2036
                    columnDefs: [
2037
                        { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] },
2037
                        { orderable: false, searchable: false, targets: ["NoSort"] },
2038
                        { "type": "anti-the", "targets":  [ "anti-the" ] }
2038
                        { type: "anti-the", targets: ["anti-the"] },
2039
                    ],
2039
                    ],
2040
                    "pagingType": "full"
2040
                    pagingType: "full",
2041
                }));
2041
                });
2042
            [% END %]
2042
            [% END %]
2043
2043
2044
            [% IF ( reviews ) %]
2044
            [% IF ( reviews ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt (-9 / +7 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 = $("input:checkbox:checked", table);
282
            var ids = $("input:checkbox:checked", table);
285
            if ( $(ids).length < 1 ) {
283
            if ( $(ids).length < 1 ) {
286
                return false;
284
                return false;
(-)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 1700-1711 Link Here
1700
                });
1700
                });
1701
            });
1701
            });
1702
1702
1703
            $('#items-bundle-contents-table').dataTable($.extend(true, {}, dataTablesDefaults, {
1703
            $("#items-bundle-contents-table").kohaTable({
1704
                "searching": false,
1704
                searching: false,
1705
                "paginate": false,
1705
                paginate: false,
1706
                "info": false,
1706
                info: false,
1707
                "order": [[ 1, 'asc' ], [ 0, 'asc' ]]
1707
                order: [
1708
            }));
1708
                    [1, "asc"],
1709
                    [0, "asc"],
1710
                ],
1711
            });
1709
1712
1710
            [% IF ( !(Koha.Preference('TransfersBlockCirc')) && Koha.Preference('AutomaticConfirmTransfer') ) %]
1713
            [% IF ( !(Koha.Preference('TransfersBlockCirc')) && Koha.Preference('AutomaticConfirmTransfer') ) %]
1711
                $("#wrong-transfer-modal").on('hidden.bs.modal',function(){
1714
                $("#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 333-347 Link Here
333
            [% ELSE %]
333
            [% ELSE %]
334
                $("#description").hide();
334
                $("#description").hide();
335
            [% END %]
335
            [% END %]
336
            $("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, {
336
            $("#batcht").kohaTable({
337
                "autoWidth": false,
337
                autoWidth: false,
338
                "columnDefs": [
338
                columnDefs: [
339
                    { "type": "anti-the", "targets":  [ "anti-the" ] },
339
                    { type: "anti-the", targets: ["anti-the"] },
340
                    { "targets": [ -1, -2 ], "orderable": false, "searchable":  false },
340
                    { targets: [-1, -2], orderable: false, searchable: false },
341
                ],
341
                ],
342
                "order": [[ 0, "asc" ]],
342
                order: [[0, "asc"]],
343
                "pagingType": "full"
343
                pagingType: "full",
344
            }));
344
            });
345
            $("#additems").click(function(){
345
            $("#additems").click(function(){
346
                Add();
346
                Add();
347
                return false;
347
                return false;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt (-7 / +5 lines)
Lines 194-206 Link Here
194
            $(".delete").on("click", function(){
194
            $(".delete").on("click", function(){
195
                return confirmDelete( _("Are you sure you want to delete this?") );
195
                return confirmDelete( _("Are you sure you want to delete this?") );
196
            });
196
            });
197
            $("#labels-table").dataTable($.extend(true, {}, dataTablesDefaults, {
197
            $("#labels-table").kohaTable({
198
                "pagingType": "full",
198
                pagingType: "full",
199
                "order": [[ 1, "asc" ]],
199
                order: [[1, "asc"]],
200
                "columnDefs": [
200
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
201
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
201
            });
202
                ]
203
            }));
204
        });
202
        });
205
    </script>
203
    </script>
206
[% END %]
204
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt (-2 / +1 lines)
Lines 105-112 Link Here
105
    [% INCLUDE 'datatables.inc' %]
105
    [% INCLUDE 'datatables.inc' %]
106
    <script>
106
    <script>
107
        $(document).ready(function() {
107
        $(document).ready(function() {
108
            $("#subscriptions").dataTable($.extend(true, {}, dataTablesDefaults, {
108
            $("#subscriptions").kohaTable();
109
            }));
110
            $(".unsubscribe").submit(function(){
109
            $(".unsubscribe").submit(function(){
111
                var patron = $(this).data('patron');
110
                var patron = $(this).data('patron');
112
                var title = $(this).data('title');
111
                var title = $(this).data('title');
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt (-2 / +2 lines)
Lines 74-80 Link Here
74
    [% INCLUDE 'datatables.inc' %]
74
    [% INCLUDE 'datatables.inc' %]
75
    <script>
75
    <script>
76
        $(document).ready(function() {
76
        $(document).ready(function() {
77
            $('#pending_updates table').DataTable($.extend(true, {}, dataTablesDefaults, {
77
            $('#pending_updates table').kohaTable({
78
                paging: false,
78
                paging: false,
79
                info: true,
79
                info: true,
80
                searching: true,
80
                searching: true,
Lines 82-88 Link Here
82
                columnDefs: [
82
                columnDefs: [
83
                    { targets: -1, orderable: false }
83
                    { targets: -1, orderable: false }
84
                ],
84
                ],
85
            }));
85
            ));
86
        });
86
        });
87
    </script>
87
    </script>
88
[% END %]
88
[% 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 156-168 Link Here
156
156
157
            let selectedPatronLists = new Array();
157
            let selectedPatronLists = new Array();
158
158
159
            $('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, {
159
            $("#patron-lists-table").kohaTable({
160
                "autoWidth": false,
160
                autoWidth: false,
161
                "columnDefs": [
161
                columnDefs: [{ orderable: false, searchable: false, targets: ["NoSort"] }],
162
                    { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] }
162
                pagingType: "full",
163
                ],
163
            });
164
                "pagingType": "full"
165
            } ));
166
            $(".delete_patron").on("click", function(){
164
            $(".delete_patron").on("click", function(){
167
                $(".dropdown").removeClass("open");
165
                $(".dropdown").removeClass("open");
168
                var list = $(this).data("list-name");
166
                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
            ordering: false,
360
            ordering: false,
361
            columnDefs: [ {
361
            columnDefs: [ {
Lines 380-388 Link Here
380
            initComplete: function() {
380
            initComplete: function() {
381
                $("#sales").show();
381
                $("#sales").show();
382
            }
382
            }
383
        }));
383
        });
384
384
385
        var past_sales_table = $("#past_sales").dataTable($.extend(true, {}, dataTablesDefaults, {
385
        var past_sales_table = $("#past_sales").kohaTable({
386
            orderFixed: [ 0, 'asc'],
386
            orderFixed: [ 0, 'asc'],
387
            ordering: false,
387
            ordering: false,
388
            columnDefs: [ {
388
            columnDefs: [ {
Lines 402-408 Link Here
402
                },
402
                },
403
                endRender: null,
403
                endRender: null,
404
            }
404
            }
405
        }));
405
        });
406
406
407
        $("#issueRefundModal").on("shown.bs.modal", function(e){
407
        $("#issueRefundModal").on("shown.bs.modal", function(e){
408
           var button = $(e.relatedTarget);
408
           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 2404-2410 Link Here
2404
                        $(".mana_search_status").hide();
2404
                        $(".mana_search_status").hide();
2405
                        $("#mana_search_result_label").text(_("Results from Mana Knowledge Base"));
2405
                        $("#mana_search_result_label").text(_("Results from Mana Knowledge Base"));
2406
                        $("#mana-loading").hide();
2406
                        $("#mana-loading").hide();
2407
                        $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults,{
2407
                        $("#mana_results_datatable").kohaTable({
2408
                            "pagingType": "full",
2408
                            "pagingType": "full",
2409
                            "autoWidth": false,
2409
                            "autoWidth": false,
2410
                            "columnDefs": [
2410
                            "columnDefs": [
Lines 2414-2420 Link Here
2414
                                { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] },
2414
                                { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] },
2415
                                { "type": "anti-the", "targets":  [ 'anti-the'] }
2415
                                { "type": "anti-the", "targets":  [ 'anti-the'] }
2416
                            ]
2416
                            ]
2417
                        }));
2417
                        });
2418
2418
2419
                        $(".showbutton").on("click", function(e){
2419
                        $(".showbutton").on("click", function(e){
2420
                            e.preventDefault();
2420
                            e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemtypes.tt (-4 / +4 lines)
Lines 111-120 Link Here
111
        [% INCLUDE 'datatables.inc' %]
111
        [% INCLUDE 'datatables.inc' %]
112
        <script>
112
        <script>
113
            $(document).ready(function(){
113
            $(document).ready(function(){
114
                $("#itemtypest").dataTable($.extend(true, {}, dataTablesDefaults, {
114
                $("#itemtypest").kohaTable({
115
                    "dom": 't',
115
                    dom: "t",
116
                    "paginate": false
116
                    paginate: false,
117
                }));
117
                });
118
            });
118
            });
119
        </script>
119
        </script>
120
    [% END %]
120
    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tt (-3 / +3 lines)
Lines 170-178 Link Here
170
[% INCLUDE 'datatables.inc' %]
170
[% INCLUDE 'datatables.inc' %]
171
    <script>
171
    <script>
172
        $(document).ready(function() {
172
        $(document).ready(function() {
173
            $("#resulttable").dataTable($.extend(true, {}, dataTablesDefaults, {
173
            $("#resulttable").kohaTable({
174
                "paginate": false,
174
                paginate: false,
175
            }));
175
            });
176
        });
176
        });
177
    </script>
177
    </script>
178
[% END %]
178
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-5 / +4 lines)
Lines 1568-1578 Link Here
1568
                });
1568
                });
1569
            [% END %]
1569
            [% END %]
1570
1570
1571
            var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
1571
            var my_table = $("#requestspecific").kohaTable({
1572
                "paginate": false,
1572
                paginate: false,
1573
                "dom": '<"top pager"ilf>t',
1573
                dom: '<"top pager"ilf>t',
1574
            }));
1574
            });
1575
1576
1575
1577
            $("#club-request-form").on("submit", function() {
1576
            $("#club-request-form").on("submit", function() {
1578
                let $t = $(this);
1577
                let $t = $(this);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt (-7 / +7 lines)
Lines 245-258 Link Here
245
    <script>
245
    <script>
246
        var sTable;
246
        var sTable;
247
        $(document).ready(function() {
247
        $(document).ready(function() {
248
            sTable = $("#claimst").dataTable($.extend(true, {}, dataTablesDefaults, {
248
            sTable = $("#claimst").kohaTable({
249
                "dom": 't',
249
                dom: "t",
250
                "columnDefs": [
250
                columnDefs: [
251
                    { "targets": [ 0 ], "orderable": false, "searchable":  false },
251
                    { targets: [0], orderable: false, searchable: false },
252
                    { "type": "anti-the", "targets":  [ 'anti-the'] }
252
                    { type: "anti-the", targets: ["anti-the"] },
253
                ],
253
                ],
254
                "paginate": false
254
                paginate: false,
255
            }));
255
            });
256
            $('#supplierid').change(function() {
256
            $('#supplierid').change(function() {
257
                $('#claims').submit();
257
                $('#claims').submit();
258
            });
258
            });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt (-11 / +9 lines)
Lines 365-381 Link Here
365
            if( $("#subscription_years .tab-pane.active").length < 1 ){
365
            if( $("#subscription_years .tab-pane.active").length < 1 ){
366
                $("#subscription_years a:first").tab("show");
366
                $("#subscription_years a:first").tab("show");
367
            }
367
            }
368
            $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
368
            $(".subscription-year-table").kohaTable({
369
                "columnDefs": [
369
                columnDefs: [{ targets: [0, -1], orderable: false, searchable: false }],
370
                    { "targets": [ 0,-1 ], "orderable": false, "searchable":  false }
370
                order: [[0, "desc"]],
371
                ],
371
                dom: "t",
372
                "order": [[0, 'desc']],
372
                autoWidth: false,
373
                "dom": 't',
373
                paginate: false,
374
                "autoWidth": false,
374
                info: false,
375
                "paginate": false,
375
                searching: false,
376
                "info": false,
376
            });
377
                "searching": false,
378
            } ));
379
377
380
            $(".CheckAll").on("click", function(e){
378
            $(".CheckAll").on("click", function(e){
381
                e.preventDefault();
379
                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 404-415 Link Here
404
        }
404
        }
405
        $(document).ready(function(){
405
        $(document).ready(function(){
406
406
407
            $("#numberpatternst").dataTable($.extend(true, {}, dataTablesDefaults, {
407
            $("#numberpatternst").kohaTable({
408
                "columnDefs": [
408
                columnDefs: [{ targets: [-1], orderable: false, searchable: false }],
409
                    { "targets": [ -1 ], "orderable": false, "searchable":  false },
409
                pagingType: "full",
410
                ],
410
            });
411
                "pagingType": "full"
412
            }));
413
411
414
            $(".delete_pattern").on("click",function(){
412
            $(".delete_pattern").on("click",function(){
415
                return confirmDelete();
413
                return confirmDelete();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt (-7 / +5 lines)
Lines 129-141 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
129
                        event.preventDefault();
129
                        event.preventDefault();
130
                    }
130
                    }
131
            });
131
            });
132
            $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
132
            $("#itemst").kohaTable({
133
                "columnDefs": [
133
                columnDefs: [{ targets: [-1, -2], orderable: false, searchable: false }],
134
                    { "targets": [ -1, -2 ], "orderable": false, "searchable":  false },
134
                order: [[0, "asc"]],
135
                ],
135
                pagingType: "full",
136
                "order": [[ 0, "asc" ]],
136
            });
137
                "pagingType": "full"
138
            }));
139
        });
137
        });
140
    </script>
138
    </script>
141
[% END %]
139
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt (-5 / +5 lines)
Lines 80-91 Link Here
80
    [% INCLUDE 'datatables.inc' %]
80
    [% INCLUDE 'datatables.inc' %]
81
    <script>
81
    <script>
82
        $(document).ready(function() {
82
        $(document).ready(function() {
83
            $("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
83
            $("#files").kohaTable({
84
                "columnDefs": [
84
                columnDefs: [
85
                    { "targets": [ -1 ], "orderSequence": [ "desc", "asc" ], "searchable":  false }
85
                    { targets: [-1], orderSequence: ["desc", "asc"], searchable: false },
86
                ],
86
                ],
87
                "paginate": false
87
                paginate: false,
88
            }));
88
            });
89
    });
89
    });
90
</script>
90
</script>
91
[% END %]
91
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-7 / +7 lines)
Lines 603-616 Link Here
603
603
604
            $(document).ready(function() {
604
            $(document).ready(function() {
605
605
606
                var table = $("#table_additional_contents").DataTable($.extend(true, {}, dataTablesDefaults, {
606
                var table = $("#table_additional_contents").kohaTable({
607
                    "order": [[ 4, "desc" ]],
607
                    order: [[4, "desc"]],
608
                    "columnDefs": [
608
                    columnDefs: [
609
                        { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
609
                        { sortable: false, searchable: false, targets: ["NoSort"] },
610
                        { "type": "anti-the", "targets": [ "anti-the" ] }
610
                        { type: "anti-the", targets: ["anti-the"] },
611
                    ],
611
                    ],
612
                    "pagingType": "full_numbers"
612
                    pagingType: "full_numbers",
613
                }));
613
                });
614
614
615
                $("#del_form").on("click", ".delete_news", function(e){
615
                $("#del_form").on("click", ".delete_news", function(e){
616
                    e.preventDefault();
616
                    e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt (-18 / +18 lines)
Lines 343-367 Link Here
343
            });
343
            });
344
          [% END %]
344
          [% END %]
345
345
346
          $("table#biblios").dataTable($.extend(true, {}, dataTablesDefaults, {
346
          $("#biblios").kohaTable({
347
            "columnDefs": [
347
              columnDefs: [
348
              { "targets": [ 0 ], "orderable": false, "searchable":  false },
348
                  { targets: [0], orderable: false, searchable: false },
349
              { "targets": [ 3, 4 ], "type": "num-html" }
349
                  { targets: [3, 4], type: "num-html" },
350
            ],
350
              ],
351
            "dom": 't',
351
              dom: "t",
352
            "order": [],
352
              order: [],
353
            "paginate": false
353
              paginate: false,
354
          }));
354
          });
355
355
356
          $("table#authorities").dataTable($.extend(true, {}, dataTablesDefaults, {
356
          $("#authorities").kohaTable({
357
            "columnDefs": [
357
              columnDefs: [
358
              { "targets": [ 0 ], "orderable": false, "searchable":  false },
358
                  { targets: [0], orderable: false, searchable: false },
359
              { "targets": [ 3 ], "type": "num-html" }
359
                  { targets: [3], type: "num-html" },
360
            ],
360
              ],
361
            "dom": 't',
361
              dom: "t",
362
            "order": [],
362
              order: [],
363
            "paginate": false
363
              paginate: false,
364
          }));
364
          });
365
365
366
          $("#selectrecords").on("submit",function(){
366
          $("#selectrecords").on("submit",function(){
367
            var nb_checked = $("#selectrecords").find("input[type='checkbox'][name='record_id']:checked").size();
367
            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 278-302 Link Here
278
278
279
            $("#selectall").click();
279
            $("#selectall").click();
280
280
281
            $("#checkouts").dataTable($.extend(true, {}, dataTablesDefaults, {
281
            $("#checkouts").kohaTable({
282
                "columnDefs": [
282
                columnDefs: [
283
                    { "targets": [0, 3], "orderable": false, "searchable":  false },
283
                    { targets: [0, 3], orderable: false, searchable: false },
284
                    { "targets": [1], "type": "num-html" }
284
                    { targets: [1], type: "num-html" },
285
                ],
285
                ],
286
                "dom": 't',
286
                dom: "t",
287
                "order": [],
287
                order: [],
288
                "paginate": false
288
                paginate: false,
289
            }));
289
            });
290
290
291
            $("#checkouts_result").dataTable($.extend(true, {}, dataTablesDefaults, {
291
            $("#checkouts_result").kohaTable({
292
                "columnDefs": [
292
                columnDefs: [
293
                    { "targets": [0, 3], "orderable": false, "searchable":  false },
293
                    { targets: [0, 3], orderable: false, searchable: false },
294
                    { "targets": [1], "type": "num-html" }
294
                    { targets: [1], type: "num-html" },
295
                ],
295
                ],
296
                "dom": 't',
296
                dom: "t",
297
                "order": [],
297
                order: [],
298
                "paginate": false
298
                paginate: false,
299
            }));
299
            });
300
300
301
            $("#extend_due_dates_form").on('submit', function(e) {
301
            $("#extend_due_dates_form").on('submit', function(e) {
302
                var new_hard_due_date = $("#new_hard_due_date").val();
302
                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 337-361 Link Here
337
337
338
            $("#selectall").click();
338
            $("#selectall").click();
339
339
340
            $("table#biblios").dataTable($.extend(true, {}, dataTablesDefaults, {
340
            $("#biblios").kohaTable({
341
                "columnDefs": [
341
                columnDefs: [
342
                    { "targets": [0, 3], "orderable": false, "searchable":  false },
342
                    { targets: [0, 3], orderable: false, searchable: false },
343
                    { "targets": [1], "type": "num-html" }
343
                    { targets: [1], type: "num-html" },
344
                ],
344
                ],
345
                "dom": 't',
345
                dom: "t",
346
                "order": [],
346
                order: [],
347
                "paginate": false
347
                paginate: false,
348
            }));
348
            });
349
349
350
            $("table#authorities").dataTable($.extend(true, {}, dataTablesDefaults, {
350
            $("#authorities").kohaTable({
351
                "columnDefs": [
351
                columnDefs: [
352
                    { "targets": [0, 3], "orderable": false, "searchable":  false },
352
                    { targets: [0, 3], orderable: false, searchable: false },
353
                    { "targets": [1], "type": "num-html" }
353
                    { targets: [1], type: "num-html" },
354
                ],
354
                ],
355
                "dom": 't',
355
                dom: "t",
356
                "order": [],
356
                order: [],
357
                "paginate": false
357
                paginate: false,
358
            }));
358
            });
359
359
360
            $("#mainformsubmit").click(function() {
360
            $("#mainformsubmit").click(function() {
361
                if ($("input[type=checkbox][name='record_id']:checked").length == 0) {
361
                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 593-612 Link Here
593
                var first_td = $(this).find('td').first();
593
                var first_td = $(this).find('td').first();
594
                first_td.html(weekdays[first_td.html()]);
594
                first_td.html(weekdays[first_td.html()]);
595
            });
595
            });
596
            $("#holidayweeklyrepeatable").dataTable($.extend(true, {}, dataTablesDefaults, {
596
            $("#holidayweeklyrepeatable").kohaTable({
597
                "dom": 't',
597
                dom: "t",
598
                "paginate": false
598
                paginate: false,
599
            }));
599
            });
600
            var tables = $("#holidayexceptions, #holidaysyearlyrepeatable, #holidaysunique").DataTable($.extend(true, {}, dataTablesDefaults, {
600
601
                "dom": 't',
601
            let dt_params = {
602
                "paginate": false,
602
                dom: "t",
603
                "createdRow": function( row, data, dataIndex ) {
603
                paginate: false,
604
                createdRow: function (row, data, dataIndex) {
604
                    var holiday = $(row).data("date");
605
                    var holiday = $(row).data("date");
605
                    if( holiday < datestring ){
606
                    if (holiday < datestring) {
606
                        $(row).addClass("date_past");
607
                        $(row).addClass("date_past");
607
                    }
608
                    }
608
                }
609
                },
609
            }));
610
            };
611
            $("#holidayexceptions").kohaTable(dt_params);
612
            $("#holidaysyearlyrepeatable").kohaTable(dt_params);
613
            $("#holidaysunique").kohaTable(dt_params);
610
614
611
            $(".show_past").on("change", function(){
615
            $(".show_past").on("change", function(){
612
                tables.draw();
616
                tables.draw();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt (-2 / +2 lines)
Lines 462-468 Link Here
462
            });
462
            });
463
463
464
            [% IF import_batch_id %]
464
            [% IF import_batch_id %]
465
                $("#records-table").dataTable($.extend(true, {}, dataTablesDefaults, {
465
                $("#records-table").kohaTable({
466
                    "autoWidth": false,
466
                    "autoWidth": false,
467
                    "searching": false,
467
                    "searching": false,
468
                    "processing": true,
468
                    "processing": true,
Lines 588-594 Link Here
588
                            );
588
                            );
589
                        }
589
                        }
590
                    },
590
                    },
591
                }));
591
                });
592
                $("#revert_batch_form").on("submit", function() {
592
                $("#revert_batch_form").on("submit", function() {
593
                    return confirm(_("Are you sure you want to undo the import of this batch into the catalog?"));
593
                    return confirm(_("Are you sure you want to undo the import of this batch into the catalog?"));
594
                });
594
                });
(-)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 256-262 Link Here
256
            $('#quotes_editor').show();
256
            $('#quotes_editor').show();
257
            $("#save_quotes").on("click", yuiGetData);
257
            $("#save_quotes").on("click", yuiGetData);
258
258
259
            let table = $('#quotes_editor').dataTable( {
259
            let table = $('#quotes_editor').kohaTable( {
260
                "autoWidth"        : false,
260
                "autoWidth"        : false,
261
                "paging"         : true,
261
                "paging"         : true,
262
                "ordering"             : false,
262
                "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 1062-1078 function _dt_save_restore_state(table_settings, external_filter_nodes={}){ Link Here
1062
                };
1062
                };
1063
            }
1063
            }
1064
1064
1065
            if (options.ajax) {
1066
                options.ajax = Object.assign(
1067
                    {},
1068
                    options.ajax,
1069
                    _dt_default_ajax({ default_filters, options })
1070
                );
1071
                options.serverSide = true;
1072
                options.processing = true;
1073
                options.pagingType = "full_numbers";
1074
            }
1075
1065
            settings = $.extend(true, {}, dataTablesDefaults, {
1076
            settings = $.extend(true, {}, dataTablesDefaults, {
1066
                        "paging": true,
1077
                        "paging": true,
1067
                        'serverSide': true,
1068
                        'searching': true,
1078
                        'searching': true,
1069
                        'pagingType': 'full_numbers',
1070
                        'processing': true,
1071
                        'language': {
1079
                        'language': {
1072
                            'emptyTable': (options.emptyTable) ? options.emptyTable : __("No data available in table")
1080
                            'emptyTable': (options.emptyTable) ? options.emptyTable : __("No data available in table")
1073
                        },
1081
                        },
1074
                        'ajax': _dt_default_ajax({default_filters, options}),
1075
                    }, options);
1082
                    }, options);
1083
1076
        }
1084
        }
1077
1085
1078
        settings["buttons"] = _dt_buttons({settings, table_settings});
1086
        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 (-85 / +80 lines)
Lines 89-185 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
                            }
160
                        )
161
                    },
162
                    initComplete: function () {
163
                        $.fn.dataTable.ext.search.push(
164
                            function apply_filter(
165
                                settings,
166
                                data,
167
                                dataIndex,
168
                                row
169
                            ) {
170
                                return (
171
                                    row.package.name.match(
172
                                        new RegExp(filters.package_name, "i")
173
                                    ) &&
174
                                    (filters.selection_type == 0 ||
175
                                        (filters.selection_type == 1 &&
176
                                            row.is_selected) ||
177
                                        (filters.selection_type == 2 &&
178
                                            !row.is_selected))
179
                                )
180
                            }
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))
181
                        )
176
                        )
182
                    },
177
                    })
183
                },
178
                },
184
            })
179
            })
185
        },
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 (-61 / +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() {
152
- 

Return to bug 38255