From d25547c34d50c14d443540aba0b7ff888edee98c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 28 Nov 2024 16:20:24 +0100 Subject: [PATCH] Bug 38255: Replace dataTable constructor with kohaTable - Staff Signed-off-by: Lucas Gass --- .../prog/en/modules/acqui/basket.tt | 15 +- .../prog/en/modules/acqui/basketgroup.tt | 52 +++--- .../prog/en/modules/acqui/booksellers.tt | 18 +- .../prog/en/modules/acqui/invoice-files.tt | 24 +-- .../prog/en/modules/acqui/invoice.tt | 28 ++- .../prog/en/modules/acqui/invoices.tt | 18 +- .../en/modules/acqui/newordersubscription.tt | 16 +- .../en/modules/acqui/newordersuggestion.tt | 12 +- .../prog/en/modules/acqui/ordered.tt | 10 +- .../prog/en/modules/acqui/parcel.tt | 31 ++-- .../prog/en/modules/acqui/parcels.tt | 8 +- .../prog/en/modules/acqui/spent.tt | 10 +- .../prog/en/modules/acqui/supplier.tt | 10 +- .../prog/en/modules/acqui/uncertainprice.tt | 10 +- .../prog/en/modules/acqui/z3950_search.tt | 22 ++- .../en/modules/admin/additional-fields.tt | 24 ++- .../prog/en/modules/admin/aqbudgetperiods.tt | 25 +-- .../modules/admin/auth_subfields_structure.tt | 10 +- .../en/modules/admin/auth_tag_structure.tt | 10 +- .../modules/admin/branch_transfer_limits.tt | 41 ++--- .../prog/en/modules/admin/cash_registers.tt | 12 +- .../prog/en/modules/admin/credit_types.tt | 28 ++- .../prog/en/modules/admin/debit_types.tt | 28 ++- .../prog/en/modules/admin/koha2marclinks.tt | 10 +- .../prog/en/modules/admin/localization.tt | 14 +- .../en/modules/admin/marc-overlay-rules.tt | 4 +- .../prog/en/modules/admin/marctagstructure.tt | 10 +- .../prog/en/modules/admin/oai_servers.tt | 10 +- .../prog/en/modules/admin/overdrive.tt | 10 +- .../en/modules/admin/systempreferences.tt | 14 +- .../prog/en/modules/admin/z3950servers.tt | 10 +- .../prog/en/modules/catalogue/detail.tt | 12 +- .../en/modules/catalogue/search-history.tt | 16 +- .../modules/cataloguing/z3950_auth_search.tt | 14 +- .../prog/en/modules/circ/article-requests.tt | 25 +-- .../prog/en/modules/circ/checkout-notes.tt | 18 +- .../circ/circulation_batch_checkouts.tt | 16 +- .../prog/en/modules/circ/on-site_checkouts.tt | 2 +- .../prog/en/modules/circ/returns.tt | 15 +- .../prog/en/modules/circ/transfers_to_send.tt | 16 +- .../en/modules/circ/transferstoreceive.tt | 16 +- .../prog/en/modules/clubs/club-enrollments.tt | 12 +- .../prog/en/modules/clubs/clubs.tt | 26 ++- .../prog/en/modules/clubs/patron-clubs-tab.tt | 12 +- .../en/modules/labels/label-edit-batch.tt | 16 +- .../prog/en/modules/labels/label-manage.tt | 12 +- .../en/modules/members/alert-subscriptions.tt | 2 +- .../prog/en/modules/members/discharges.tt | 20 +-- .../prog/en/modules/members/notices.tt | 10 +- .../modules/members/purchase-suggestions.tt | 14 +- .../prog/en/modules/members/statistics.tt | 10 +- .../prog/en/modules/members/update-child.tt | 14 +- .../prog/en/modules/patron_lists/lists.tt | 12 +- .../modules/patron_lists/patron-lists-tab.tt | 12 +- .../prog/en/modules/patroncards/edit-batch.tt | 18 +- .../intranet-tmpl/prog/en/modules/pos/pay.tt | 4 +- .../prog/en/modules/pos/register.tt | 8 +- .../prog/en/modules/pos/registers.tt | 8 +- .../en/modules/recalls/recalls_to_pull.tt | 18 +- .../en/modules/recalls/recalls_waiting.tt | 12 +- .../en/modules/reports/cash_register_stats.tt | 10 +- .../modules/reports/guided_reports_start.tt | 4 +- .../prog/en/modules/reports/itemtypes.tt | 10 +- .../prog/en/modules/reports/serials_stats.tt | 8 +- .../prog/en/modules/reserve/request.tt | 9 +- .../prog/en/modules/serials/claims.tt | 18 +- .../en/modules/serials/serials-collection.tt | 20 +-- .../prog/en/modules/serials/serials-search.tt | 46 ++--- .../serials/subscription-numberpatterns.tt | 10 +- .../prog/en/modules/tags/list.tt | 12 +- .../prog/en/modules/tools/access_files.tt | 10 +- .../en/modules/tools/additional-contents.tt | 18 +- .../en/modules/tools/batch_delete_records.tt | 36 ++-- .../modules/tools/batch_extend_due_dates.tt | 40 ++--- .../tools/batch_record_modification.tt | 32 ++-- .../prog/en/modules/tools/holidays.tt | 26 +-- .../en/modules/tools/manage-marc-import.tt | 4 +- .../prog/en/modules/tools/overduerules.tt | 12 +- .../prog/en/modules/tools/problem-reports.tt | 18 +- .../prog/en/modules/tools/quotes-upload.tt | 2 +- .../prog/en/modules/virtualshelves/shelves.tt | 4 +- .../intranet-tmpl/prog/js/addorderiso2709.js | 20 +-- koha-tmpl/intranet-tmpl/prog/js/authtype.js | 18 +- .../intranet-tmpl/prog/js/biblio_framework.js | 18 +- koha-tmpl/intranet-tmpl/prog/js/cart.js | 24 ++- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 2 +- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 15 +- .../prog/js/elasticsearch-mappings.js | 19 +- koha-tmpl/intranet-tmpl/prog/js/holds.js | 2 +- .../prog/js/marc_subfields_structure.js | 14 +- .../prog/js/pages/preferences.js | 17 +- .../prog/js/pages/tags-review.js | 18 +- koha-tmpl/intranet-tmpl/prog/js/recalls.js | 18 +- .../prog/js/rotating-collections.js | 18 +- .../intranet-tmpl/prog/js/subscription-add.js | 32 ++-- .../ERM/EHoldingsEBSCOTitlePackagesList.vue | 164 +++++++++--------- .../ERM/EHoldingsLocalTitlePackagesList.vue | 53 +++--- .../ERM/EHoldingsLocalTitlesFormImport.vue | 112 ++++++------ 98 files changed, 857 insertions(+), 990 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 9ed74d27926..a3f13794703 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -1231,17 +1231,18 @@ $(document).ready(function() { var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders', 'json' ) | $raw %]; [% IF !(Koha.Preference('EDIFACT') && ediaccount) %] + // FIXME This cannot work correctly without bKohaColumnsUseNames table_settings['columns'].splice(18, 1); [% END %] - KohaTable("orders", { - "pagingType": "full", - "autoWidth": false, - "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 %]], + $("#orders").kohaTable({ + pagingType: "full", + autoWidth: false, + 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 %]], }, table_settings); - var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, { - "pagingType": "full" - } ) ); + $("#cancelledorderst").kohaTable({ + pagingType: "full" + }); $("#reopenform").on("submit",function(e){ var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %]; var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?")); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt index ae0fa3423fc..c46aecc128e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -423,34 +423,32 @@ $("#basket_groups a[href='#opened']").tab("show"); [% END %] [% UNLESS ( grouping ) %] - $("table").dataTable($.extend(true, {}, dataTablesDefaults, { - "columnDefs": [ - { "targets": [ -1 ], "orderable": false, "searchable": false }, - ], - "autoWidth": false, - "pagingType": "full" - } )); + let dt_params = { + columnDefs: [{ targets: [-1], orderable: false, searchable: false }], + autoWidth: false, + pagingType: "full", + }; + $("#ungrouped").kohaTable(dt_params); + $("#grouped").kohaTable(dt_params); + $("#basket_group_opened").kohaTable(dt_params); + $("#basket_group_closed").kohaTable(dt_params); [% ELSE %] - grouped = $("#grouped").DataTable($.extend(true, {}, dataTablesDefaults, { - "dom": 't', - "columnDefs": [ - { 'sortable': false, 'targets': [ 'NoSort' ] } - ], - 'autoWidth': false, - "language": { - "emptyTable": _("There are no baskets in this group") - } - } )); - ungrouped = $("#ungrouped").DataTable($.extend(true, {}, dataTablesDefaults, { - "dom": 't', - "columnDefs": [ - { 'sortable': false, 'targets': [ 'NoSort' ] } - ], - 'autoWidth': false, - "language": { - "emptyTable": _("There are no ungrouped baskets") - } - } )); + grouped = $("#grouped").kohaTable({ + dom: "t", + columnDefs: [{ sortable: false, targets: ["NoSort"] }], + autoWidth: false, + language: { + emptyTable: _("There are no baskets in this group"), + }, + }); + ungrouped = $("#ungrouped").kohaTable({ + dom: "t", + columnDefs: [{ sortable: false, targets: ["NoSort"] }], + autoWidth: false, + language: { + emptyTable: _("There are no ungrouped baskets"), + }, + }); [% END %] $("#basketgroupcolumns").on("click", ".addtogroup", function(){ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt index 5cb331c2a41..a1ac247f2b1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt @@ -263,16 +263,14 @@ [% Asset.js("js/acq.js") | $raw %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt index 80c36d5c7c3..a083d41e2e3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -560,22 +560,20 @@ } $(document).ready(function() { - $("#orderst").dataTable($.extend(true, {}, dataTablesDefaults, { - "info": false, - "paging": false, - "searching": false, - "dom": "t", - "columnDefs": [ - { "type": "anti-the", "targets": [ "anti-the" ] } - ] - })); + $("#orderst").kohaTable({ + info: false, + paging: false, + searching: false, + dom: "t", + columnDefs: [{ type: "anti-the", targets: ["anti-the"] }], + }); [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %] - $("#invoice_files_table").dataTable($.extend(true, {}, dataTablesDefaults, { - "info": false, - "paging": false, - "searching": false, - "dom": "t" - })); + $("#invoice_files_table").kohaTable({ + info: false, + paging: false, + searching: false, + dom: "t", + }); [% END %] $("#show_all_details").click(function(){ updateColumnsVisibility( $(this).is(":checked") ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt index bb62e0d7647..fb00c76613d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -498,16 +498,14 @@ }); }); - var resultst = $("table.result").dataTable( - $.extend(true, {}, dataTablesDefaults, { - paging: false, - columnDefs: [ - { orderable: false, targets: [1, -1] }, - { visible: false, targets: [0] }, - ], - autoWidth: false, - }) - ); + var resultst = $("table.result").kohaTable({ + paging: false, + columnDefs: [ + { orderable: false, targets: [1, -1] }, + { visible: false, targets: [0] }, + ], + autoWidth: false, + }); $(".show_only_subscription").prop("checked", false); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt index 5ec14700a2c..f19e75f1578 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt @@ -124,15 +124,13 @@ } $(document).ready(function () { - $("#srlt").dataTable( - $.extend(true, {}, dataTablesDefaults, { - columnDefs: [ - { orderable: false, searchable: false, targets: ["NoSort"] }, - { type: "anti-the", targets: ["anti-the"] }, - ], - pagingType: "full", - }) - ); + $("#srlt").kohaTable({ + columnDefs: [ + { orderable: false, searchable: false, targets: ["NoSort"] }, + { type: "anti-the", targets: ["anti-the"] }, + ], + pagingType: "full", + }); $("#show_only_renewed").click(function () { updateRowsVisibility($(this).is(":checked")); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt index 62c13a176c6..e3e1c09e742 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt @@ -118,13 +118,13 @@ [% INCLUDE 'calendar.inc' %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index 9d612f1277c..890fd646692 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -369,19 +369,21 @@ }); if ( $("#receivedt").length ) { - var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, { - "stateSave": true, // We do not have table settings on this table - "pageLength": 10, - "lengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]], - "columnDefs": [ - { "targets": [ 5, -1 ], "orderable": false, "searchable": false }, + var receivedt = $("#receivedt").kohaTable({ + stateSave: true, // We do not have table settings on this table + pageLength: 10, + lengthMenu: [ + [5, 10, 20, 50, 100, -1], + [5, 10, 20, 50, 100, _("All")], ], - "columns": [ - { "type": "html" }, - { "type": "html" }, - { "type": "html" }, - { "type": "num-html" }, - { "type": "anti-the" }, + columnDefs: [{ targets: [5, -1], orderable: false, searchable: false }], + columns: [ + { type: "html" }, + { type: "html" }, + { type: "html" }, + { type: "num-html" }, + { type: "anti-the" }, + null, null, null, null, @@ -389,10 +391,9 @@ null, null, null, - null ], - "pagingType": "full" - })); + pagingType: "full", + }); } var options = { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt index fdac8dc272a..81aef2a1f62 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt @@ -270,11 +270,9 @@ [% INCLUDE 'datatables.inc' %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt index 6dc116d91fb..afc1fc662d4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -687,12 +687,12 @@ } $(document).ready(function() { - var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, { - "columnDefs": [ - { "orderable": false, "searchable": false, "targets": [ 'NoSort' ] } + var contractst = $("#contractst").kohaTable({ + columnDefs: [ + { orderable: false, searchable: false, targets: [ 'NoSort' ] } ], - "dom": 't' - } ) ); + dom: 't' + } ); $('body').on('click', '.delete-contact', null, delete_contact); $('#add-contact').click(add_contact); $('body').on('click', '.contact_acqprimary', null, function () { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt index 68d929f4b16..3f488434aa2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt @@ -191,12 +191,10 @@ [% INCLUDE 'datatables.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt index 12771a9499d..46d8d318987 100755 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt @@ -308,19 +308,17 @@ $("#selecttable").submit(); }); - $("#fieldst").dataTable( - $.extend(true, {}, dataTablesDefaults, { - autoWidth: false, - dom: 't<"bottom pager"ilpf>', - pagingType: "full", - lengthMenu: [ - [10, 20, 50, 100, -1], - [10, 20, 50, 100, "All"], - ], - pageLength: 20, - order: [[0, "asc"]], - }) - ); + $("#fieldst").kohaTable({ + autoWidth: false, + dom: 't<"bottom pager"ilpf>', + pagingType: "full", + lengthMenu: [ + [10, 20, 50, 100, -1], + [10, 20, 50, 100, "All"], + ], + pageLength: 20, + order: [[0, "asc"]], + }); $("#add_field").on("submit", function () { if ($("#marcfield").length && $("select[name='authorised_value_category']").length) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt index 5b3434c8bb1..5d4b6e30f49 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt @@ -567,18 +567,19 @@ $("#budgetsTabs li:eq([% tab | html %]) a").tab("show"); [% END %] - $("#activeperiodst,#inactiveperiodst").dataTable($.extend(true, {}, dataTablesDefaults, { - "columnDefs": [ - { "targets": [ -1 ], "orderable": false, "searchable": false }, - ], - "pagingType": "full", - "autoWidth": false - } ) ); + let dt_params = { + columnDefs: [{ targets: [-1], orderable: false, searchable: false }], + pagingType: "full", + autoWidth: false, + }; + + $("#activeperiodst").kohaTable(dt_params); + $("#inactiveperiodst").kohaTable(dt_params); [% IF close_form %] - $("#budgeth").dataTable($.extend(true, {}, dataTablesDefaults, { - "dom": "t" - })); + $("#budgeth").kohaTable({ + dom: "t", + }); $("#move_form").submit(function(){ var budget_from = "[% budget_period_description | html %]"; var budget_to = $("#to_budget_period_id").find("option:selected").html(); @@ -588,7 +589,7 @@ }); [% END %] [% IF closed %] - var oTable = $("#closed_report").dataTable($.extend(true, {}, dataTablesDefaults, { + var oTable = $("#closed_report").kohaTable({ // The following is a c/p from aqbudgets.tt and is a candidate for refactoring. "drawCallback": function ( oSettings ) { if ( oSettings.aiDisplay.length == 0 ) @@ -624,7 +625,7 @@ "orderFixed": [[ 1, 'asc' ]], "autoWidth": false, "pagingType": "full_numbers" - })); + }); [% END %] $("#add_modify_budget").validate({ rules: { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt index ab4e6ea47ab..c70e790a6bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt @@ -437,13 +437,11 @@ [% Asset.js("js/admin-menu.js") | $raw %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt index 032204c70f4..a81080c0e6e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt @@ -135,54 +135,55 @@ [% Asset.js("js/admin-menu.js") | $raw %] [% INCLUDE 'datatables.inc' %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt index 009a63e20bf..486ddf1eeec 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt @@ -253,13 +253,11 @@ } $(document).ready(function () { - var crtable = $("#table_cash_registers").DataTable( - $.extend(true, {}, dataTablesDefaults, { - columnDefs: [{ targets: [-1, -2], orderable: false, searchable: false }], - order: [[1, "asc"]], - paginationType: "full", - }) - ); + var crtable = $("#table_cash_registers").kohaTable({ + columnDefs: [{ targets: [-1, -2], orderable: false, searchable: false }], + order: [[1, "asc"]], + paginationType: "full", + }); $("#branch_filter").on("change", function () { // Table must be filtered by the