From 976b1dbb7ef4b5a95d74379ef2e57c079a3662f5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 14 Jan 2014 09:38:32 +0100 Subject: [PATCH] Bug 7825: (follow-up) fix the force value for the bootstrap theme If the pref was set to 'force', the item selection was not shown. .copiesrow should be hidden before showing specific #copiesrow_ID Signed-off-by: Katrin Fischer Passes all tests and QA script. Works on template level, tested with Boostrap and Prog theme with all 3 possible seetings of OPACItemHolds: 1) no = offer only title level holds 2) yes = offer both title and item level holds 3) force = offer only item level holds Also ran some additional tests on the Boostrap theme with deactivated Javascript. Note: I like this, but I think when "force" is selected the item list needs to be shown by default. I am also not happy about preselecting the first item. Signed-off-by: Galen Charlton --- .../bootstrap/en/modules/opac-reserve.tt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index 5b1e313222..e82540c9ad 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -424,15 +424,6 @@ } }); - [% FOREACH bibitemloo IN bibitemloop %] - [% IF bibitemloo.holdable %] - [% IF OPACItemHolds == 'force' %] - $("#copiesrow_[% bibitemloo.biblionumber %]").show(); - [% END %] - [% END %] - [% END %] - - // click on a first td check the confirmjs checkbox $("td.hold").click(function(e){ if(e.target.tagName.toLowerCase() == 'td'){ @@ -446,6 +437,14 @@ // Hides all 'specific copy' table rows on load. $(".copiesrow").hide(); + [% FOREACH bibitemloo IN bibitemloop %] + [% IF bibitemloo.holdable %] + [% IF OPACItemHolds == 'force' %] + $("#copiesrow_[% bibitemloo.biblionumber %]").show(); + [% END %] + [% END %] + [% END %] + // Insert reasons for forced hold notes $(".forcenotesreason").each(function(){ biblioNum = suffixOf($(this).attr("id"), "_"); -- 2.39.5