From 2b4a0e070bd024e2959193aebd0f27a8589a6b50 Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@biblibre.com>
Date: Tue, 14 Jan 2014 09:38:32 +0100
Subject: [PATCH] Bug 7825: 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
---
 .../opac-tmpl/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 f07e7e0..f933aa8 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
@@ -418,15 +418,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'){
@@ -440,6 +431,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"), "_");
-- 
1.7.10.4