From 89c182248f386ea41fb96113ce7f95e743af4b69 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 13 Oct 2021 14:01:18 +0200 Subject: [PATCH] Bug 28349: [DO NOT PUSH] Recreate the problem You can apply this patch to recreate the problem. NoSort is removed from the default DT settings but we are passing it from the KohaTable constructor. We are then expecting the first column (the checkbox) to not be orderable. Without the fix, the parameter is not taken into account (ie. not correctly merged into the DT default parameters). --- koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc | 1 - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc index 0fd092013e2..781363002a9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc @@ -133,7 +133,6 @@ function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) { { "targets": [ "title-string" ], "type": "title-string" }, { "targets": [ "string-sort" ], "type": "string" }, { "targets": [ "anti-the" ], "type": "anti-the" }, - { "targets": [ "NoSort" ], "orderable": false, "searchable": false }, ]; if ( new_parameters["aoColumnDefs"] === undefined ) { new_parameters["aoColumnDefs"] = default_column_defs; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 7c2b961d6ca..1f7d0c01a49 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1348,6 +1348,9 @@ Note that permanent location is a code, and location may be an authval. 'bPaginate': false, 'bAutoWidth': false, "aaSorting": [[ 4, "desc" ]], + "aoColumnDefs": [ + { "targets": [ "NoSort" ], "orderable": false, "searchable": false }, + ] }, columns_settings); [% END %] -- 2.25.1