From 3182d2693d2a3e561183bab203036e37a4abb66c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 17 Jan 2019 16:39:52 +0000 Subject: [PATCH] Bug 22156: Subscription result list sorts on "checkbox" by default This patch adds default sorting by title to the subscription search results list. Previously no default sort was defined, so it defaulted to sorting by the first column in the table. To test, apply the patch and go to Serials. - Perform a search of subscriptions which will return multiple results. - Confirm that the table of open subscriptions is sorted by default by title ascending. - Confirm the same for the table of closed subscriptions. Signed-off-by: Jose-Mario Monteiro-Santos Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens (cherry picked from commit 8a2d5fab95ae2db5adf8cca16524b7a231680dd3) Signed-off-by: Martin Renvoize (cherry picked from commit dc865158780c28fb22c5a8c03d3105529403a150) Signed-off-by: Lucas Gass --- .../intranet-tmpl/prog/en/modules/serials/serials-search.tt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt index 08f46f759f..1efdd62c5b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt @@ -437,6 +437,7 @@ $(document).ready(function() { var osrlt = $("#opened table").dataTable($.extend(true, {}, dataTablesDefaults, { "sPaginationType": "four_button", + "order": [[ 2, "asc" ]], "aoColumnDefs": [ { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, { "sType": "title-string", "aTargets" : [ "title-string" ] }, @@ -446,6 +447,7 @@ var csrlt = $("#closed table").dataTable($.extend(true, {}, dataTablesDefaults, { // FIXME sort function of additional_fields! + "order": [[ 2, "asc" ]], "sPaginationType": "four_button", "aoColumnDefs": [ { 'bSortable': false, 'aTargets': [ 'NoSort' ] }, -- 2.39.5