From b84e80e38727aef2c60664a2291e60fea11c5425 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 2 Dec 2024 12:48:08 +0100 Subject: [PATCH] Bug 38596: (bug 36640 follow-up): Restore previous order sequence behaviour - OPAC See commit e76c5c0145f1575254603ba507fbea339cfb4e82 Bug 36640: Restore previous order sequence behaviour Test plan: Go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=1 Click on the header to modify the order, click again, then again. It should always be asc or desc, and you should see the corresponding arrows. --- koha-tmpl/opac-tmpl/bootstrap/js/datatables.js | 1 + 1 file changed, 1 insertion(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js index 1587ee3e095..7190e6ed0ac 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js @@ -63,6 +63,7 @@ var dataTablesDefaults = { state && state.search && toggledClearFilter(state.search.search, tableId); }, }; +DataTable.defaults.column.orderSequence = ['asc', 'desc']; function toggledClearFilter(searchText, tableId){ let clear_filter_button = $("#" + tableId + "_wrapper").find(".dt_button_clear_filter"); -- 2.34.1