From 0d2208b9f155dd56a53073f9e674973931351de4 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 30 Jul 2021 10:54:47 +0000 Subject: [PATCH] Bug 28764: Alter sort dropdown to use direction parameter This code is odd -we build a select in the template, then turn it into a list of links using javascript This patch adds a direction data element and uses it while building the links Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- .../bootstrap/en/modules/opac-shelves.tt | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt index a10ed1dcee..22c7303c67 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -265,62 +265,62 @@ [% IF sortfield == 'author' && direction == 'asc' %] - + [% ELSE %] - + [% END %] [% IF sortfield == 'author' && direction == 'desc' %] - + [% ELSE %] - + [% END %] [% IF sortfield == 'title' && direction == 'asc' %] - + [% ELSE %] - + [% END %] [% IF sortfield == 'title' && direction == 'desc' %] - + [% ELSE %] - + [% END %] [% IF sortfield == 'itemcallnumber' && direction == 'asc' %] - + [% ELSE %] - + [% END %] [% IF sortfield == 'itemcallnumber' && direction == 'desc' %] - + [% ELSE %] - + [% END %] [% IF sortfield == 'copyrightdate' && direction == 'asc' %] - + [% ELSE %] - + [% END %] [% IF sortfield == 'copyrightdate' && direction == 'desc' %] - + [% ELSE %] - + [% END %] [% IF sortfield == "dateadded" && direction == 'asc' %] - + [% ELSE %] - + [% END %] [% IF sortfield == "dateadded" && direction == 'desc' %] - + [% ELSE %] - + [% END %] @@ -1087,7 +1087,7 @@ function sortMenu( sorting_form ){ menu += "" + $(this).attr("label") + ""; $(this).children().each(function(){ if( $(this)[0].tagName.toUpperCase() == "OPTION" ){ - menu += "" + $(this).text() + ""; + menu += "" + $(this).text() + ""; } }); } -- 2.39.5