From c3e6c3b717cf4aac70cd2387023e771d9ce5eb2e 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 Signed-off-by: Owen Leonard --- .../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 ccf055d465..be54c959c8 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 16ef90cef4..ef9ce3f051 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 @@ -401,7 +401,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 68b3aa0727..df91cfcd35 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 @@ -270,7 +270,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 c7c8767165..d2c3869580 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 -   +   @@ -444,7 +444,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 24e4a81a36..6c19dc286b 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 -   +   @@ -135,7 +135,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 ca4c147929..e532563ee1 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 - + @@ -380,7 +380,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 efe32a7ea8..3a72980148 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 ) %] @@ -315,7 +315,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 26266bfc0f..430fa6870a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt @@ -477,7 +477,7 @@ End date Locked Total - Actions + Actions @@ -514,7 +514,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 cc0348e086..f557928cb4 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 -   +   @@ -300,7 +300,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 5de902207c..b39ab848bf 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 @@ -80,9 +80,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 afc9c755e9..8b6a5f6b90 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 @@ - + @@ -68,7 +68,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 798bdf35cd..0082b14d1b 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 -%] @@ -312,7 +312,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 d8e19ba8d9..7fdc08256a 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 %]
- + @@ -248,9 +248,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 1af5b4eb7c..3e6bfe0220 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 %] @@ -367,7 +367,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 3997062247..0d1de011c0 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 @@ - + @@ -406,7 +406,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 f151a4ef58..719c5fc8b3 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 974760f3a1..8a700dfa12 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
- + @@ -346,7 +346,6 @@ $("#biblios").kohaTable({ columnDefs: [ - { targets: [0], orderable: false, searchable: false }, { targets: [3, 4], type: "num-html" }, ], dom: "t", @@ -356,7 +355,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 e25f26ea7a..06c624b9b4 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  
- + - + @@ -340,7 +340,6 @@ $("#biblios").kohaTable({ columnDefs: [ - { targets: [0, 3], orderable: false, searchable: false }, { targets: [1], type: "num-html" }, ], dom: "t", @@ -350,7 +349,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 106f8c0644..b328c60045 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 157875d0b3..104b617262 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 cc7fde5525..457d2ef230 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