From 7a054de0905e0cc49f20181b1ec7abe1a64e919e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 28 Jan 2025 11:32:21 +0100 Subject: [PATCH] Bug 38984: Add NoSort when can replace targets In those occurrences we can simply use NoSort. It fixes some bugs, where the display of the column depends on some pref's values --- .../prog/en/includes/clubs-table.inc | 2 +- .../prog/en/modules/acqui/basketgroup.tt | 5 ++--- .../prog/en/modules/acqui/booksellers.tt | 3 +-- .../prog/en/modules/acqui/invoices.tt | 5 ++--- .../en/modules/acqui/newordersuggestion.tt | 3 +-- .../prog/en/modules/acqui/parcel.tt | 5 ++--- .../prog/en/modules/acqui/z3950_search.tt | 5 ++--- .../prog/en/modules/admin/aqbudgetperiods.tt | 5 ++--- .../en/modules/admin/auth_tag_structure.tt | 3 +-- .../en/modules/admin/branch_transfer_limits.tt | 3 +-- .../prog/en/modules/admin/cash_registers.tt | 5 ++--- .../prog/en/modules/admin/koha2marclinks.tt | 3 +-- .../prog/en/modules/admin/marctagstructure.tt | 3 +-- .../prog/en/modules/admin/overdrive.tt | 3 +-- .../prog/en/modules/admin/systempreferences.tt | 7 +++---- .../prog/en/modules/admin/z3950servers.tt | 3 +-- .../en/modules/catalogue/search-history.tt | 9 ++++----- .../modules/cataloguing/z3950_auth_search.tt | 3 +-- .../prog/en/modules/circ/article-requests.tt | 18 ++++++------------ .../prog/en/modules/circ/transfers_to_send.tt | 5 +---- .../prog/en/modules/circ/transferstoreceive.tt | 5 +---- .../prog/en/modules/clubs/clubs.tt | 4 +--- .../prog/en/modules/labels/label-manage.tt | 3 +-- .../prog/en/modules/members/discharges.tt | 5 +---- .../prog/en/modules/members/update-child.tt | 3 +-- .../prog/en/modules/patroncards/edit-batch.tt | 5 ++--- .../prog/en/modules/serials/claims.tt | 5 +---- .../en/modules/serials/serials-collection.tt | 5 ++--- .../serials/subscription-numberpatterns.tt | 3 +-- .../intranet-tmpl/prog/en/modules/tags/list.tt | 5 ++--- .../en/modules/tools/batch_delete_records.tt | 6 ++---- .../modules/tools/batch_record_modification.tt | 10 ++++------ .../bootstrap/en/modules/opac-basket.tt | 5 ++--- .../bootstrap/en/modules/opac-idref.tt | 5 ++--- .../bootstrap/en/modules/opac-illrequests.tt | 3 +-- .../bootstrap/en/modules/opac-readingrecord.tt | 1 - .../en/modules/opac-search-history.tt | 3 +-- .../bootstrap/en/modules/opac-tags.tt | 3 +-- 38 files changed, 62 insertions(+), 115 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/clubs-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/clubs-table.inc index ccf055d465e..be54c959c89 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/clubs-table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/clubs-table.inc @@ -17,7 +17,7 @@ End date Enrolled patrons [% UNLESS destination == 'holds' %] -   +   [% END %] 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 7f3388b4933..44c420e431c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -261,7 +261,7 @@ Billing place Delivery place Number of baskets - Action + Action @@ -313,7 +313,7 @@ Billing place Delivery place Number of baskets - Action + Action @@ -400,7 +400,6 @@ [% END %] [% UNLESS ( grouping ) %] let dt_params = { - columnDefs: [{ targets: [-1], orderable: false, searchable: false }], autoWidth: false, pagingType: "full", }; 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 16428f244b4..9a058153c4a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt @@ -134,7 +134,7 @@ Basket group Internal note Closed - Actions + Actions @@ -269,7 +269,6 @@ searching: false, info: false, order: [[1, "asc"]], - columnDefs: [{ targets: [-1], orderable: false }], }); $("#supplierlist").change(function() { var id = $(this).find("option:selected").val(); 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 3d50226731a..34a39a9f668 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -59,7 +59,7 @@ [% IF CAN_user_acquisition_merge_invoices %]   [% END %] -   +   Invoice number Vendor Shipment date @@ -67,7 +67,7 @@ Received bibliographic records Received items Status -   +   @@ -443,7 +443,6 @@ var resultst = $("table.result").kohaTable({ paging: false, columnDefs: [ - { orderable: false, targets: [1, -1] }, { visible: false, targets: [0] }, ], autoWidth: false, 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 15c9f02880a..1c84590d001 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt @@ -61,7 +61,7 @@ Price Quantity Total -   +   @@ -134,7 +134,6 @@ var suggestionst = $("#suggestionst").kohaTable({ columnDefs: [ { targets: [0], visible: false, searchable: true }, // must be searchable for filtering - { targets: [-1], orderable: false, searchable: false }, ], pagingType: "full", }); 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 b3ade8daa82..1186aec231c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -163,14 +163,14 @@ Order line Holds Summary - More + More Replacement price Quantity Fund Est cost Actual cost TOTAL - + @@ -379,7 +379,6 @@ [5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")], ], - columnDefs: [{ targets: [5, -1], orderable: false, searchable: false }], columns: [ { type: "html" }, { type: "html" }, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt index 730666aa19f..0171dd827c0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt @@ -187,9 +187,9 @@ tr.selected td { ISBN LCCN [% IF ( Koha.Preference('AdditionalFieldsInZ3950ResultSearch') != '' ) %] - Additional fields + Additional fields [% END %] - Actions + Actions [% FOREACH breeding_loo IN breeding_loop %] [% IF ( breeding_loo.breedingid ) %] @@ -313,7 +313,6 @@ tr.selected td { $(document).ready(function(){ var resultst = $("#resultst").kohaTable({ columnDefs: [ - { targets: [-1, -2], orderable: false, searchable: false }, { targets: [1], type: "nsb-nse" }, ], order: [[1, "asc"]], 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 3ce557eb3c8..692f02272e3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt @@ -478,7 +478,7 @@ End date Locked Total - Actions + Actions @@ -515,7 +515,7 @@ End date Locked Total - Actions + Actions @@ -566,7 +566,6 @@ [% END %] let dt_params = { - columnDefs: [{ targets: [-1], orderable: false, searchable: false }], pagingType: "full", autoWidth: false, }; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt index 8e3bfbe1037..5ed513e0a54 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt @@ -254,7 +254,7 @@ Repeatable Mandatory Authorized
value -   +   @@ -299,7 +299,6 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt index bf054562570..c6189e502f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt @@ -43,7 +43,7 @@ Patron Library Date requested - Allow + Allow @@ -79,9 +79,6 @@ info: true, searching: true, order: [[2, "asc"]], - columnDefs: [ - { targets: -1, orderable: false } - ], }); }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt index 022918d82da..a90d88d92ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt @@ -25,7 +25,7 @@ - + @@ -67,7 +67,6 @@ $("#catst").kohaTable({ dom: "t", order: [[2, "asc"]], - columnDefs: [{ targets: [0], orderable: false, searchable: false }], paginate: false, }); $("#updatechildf").validate({ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt index 6ca730085c3..d91724a587f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt @@ -112,9 +112,9 @@ [% CASE "Borrower Number" %] [% CASE "Actions " %] - + [% CASE "Select" -%] - + [% CASE %] [% END -%] @@ -310,7 +310,6 @@ $("#description").hide(); [% END %] $("#batcht").kohaTable({ - columnDefs: [{ targets: [-2, -1], orderable: false, searchable: false }], order: [[0, "asc"]], pagingType: "full", lengthMenu: [aLengthMenu, aLengthMenuLabel], diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt index ff8df8bff74..c7715720440 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt @@ -130,7 +130,7 @@
   Code Description
Borrower numberActionsActionsSelectSelect[% header_field.field_label | html %]
- + @@ -247,9 +247,6 @@ $(document).ready(function() { sTable = $("#claimst").kohaTable({ dom: "t", - columnDefs: [ - { targets: [0], orderable: false, searchable: false }, - ], paginate: false, }); $('#supplierid').change(function() { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt index 38138c8770e..fd47d1b9a02 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -215,7 +215,7 @@ [% IF ( CAN_user_serials_receive_serials ) %] - + [% END %] [% IF ( subscriptions.size > 1 ) %] @@ -228,7 +228,7 @@ [% IF ( routing ) %] - + [% END %] @@ -366,7 +366,6 @@ $("#subscription_years a:first").tab("show"); } $(".subscription-year-table").kohaTable({ - columnDefs: [{ targets: [0, -1], orderable: false, searchable: false }], order: [[0, "desc"]], dom: "t", autoWidth: false, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt index b5e48432224..f77daba031e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt @@ -300,7 +300,7 @@ - + @@ -405,7 +405,6 @@ $(document).ready(function(){ $("#numberpatternst").kohaTable({ - columnDefs: [{ targets: [-1], orderable: false, searchable: false }], pagingType: "full", }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt index 32ab4313b41..cc1ae2e9f8d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt @@ -49,8 +49,8 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
Vendor Library Title
EditEdit# SubsNotes LibraryRoutingRouting
Description Numbering formula Display orderActionsActions
- - + + [% FOREACH title IN titles %] @@ -130,7 +130,6 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : } }); $("#itemst").kohaTable({ - columnDefs: [{ targets: [-1, -2], orderable: false, searchable: false }], order: [[0, "asc"]], pagingType: "full", }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt index 0e44827ad92..ff54461707d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt @@ -171,7 +171,7 @@
TitleLocation Location 
- + @@ -206,7 +206,7 @@
Biblionumber Title Items
- + @@ -345,7 +345,6 @@ $("#biblios").kohaTable({ columnDefs: [ - { targets: [0], orderable: false, searchable: false }, { targets: [3, 4], type: "num-html" }, ], dom: "t", @@ -355,7 +354,6 @@ $("#authorities").kohaTable({ columnDefs: [ - { targets: [0], orderable: false, searchable: false }, { targets: [3], type: "num-html" }, ], dom: "t", diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt index 292ed122928..f874eab4ddd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt @@ -207,10 +207,10 @@
AuthID Summary Used in
- + - + @@ -237,10 +237,10 @@
   Biblionumber Title  
- + - + @@ -339,7 +339,6 @@ $("#biblios").kohaTable({ columnDefs: [ - { targets: [0, 3], orderable: false, searchable: false }, { targets: [1], type: "num-html" }, ], dom: "t", @@ -349,7 +348,6 @@ $("#authorities").kohaTable({ columnDefs: [ - { targets: [0, 3], orderable: false, searchable: false }, { targets: [1], type: "num-html" }, ], dom: "t", diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt index 106f8c06447..b328c600453 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt @@ -288,11 +288,11 @@ - + - + @@ -500,7 +500,6 @@ if( $("#itemst").length > 0 ){ var itemst = $("#itemst").kohaTable({ order: [[1, "asc"]], - columnDefs: [{ targets: [0, -1], orderable: false, searchable: false }], }); var buttons = new $.fn.dataTable.Buttons(itemst, { diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-idref.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-idref.tt index 157875d0b3c..104b617262a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-idref.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-idref.tt @@ -29,8 +29,8 @@ - - + + @@ -54,7 +54,6 @@ $(document).ready(function (){ $("table").kohaTable({ filter: false, - columnDefs: [{ targets: [-1, -2], orderable: false }], }); $(".role").click(function(){ diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt index cc7fde55259..457d2ef2300 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt @@ -148,7 +148,7 @@ - + @@ -341,7 +341,6 @@ [% INCLUDE 'datatables.inc' %]
  AuthID Summary  
Items in your cart
   Title Author YearLocation (Status)Location (Status)
CitationKohaSudocKohaSudoc
Status Request placed Last updated