From 270e86cdace30780deec0a9ae2fdccaebcb4301e Mon Sep 17 00:00:00 2001
From: Marcel de Rooy
Date: Mon, 4 Mar 2013 08:12:15 +0100
Subject: [PATCH] Bug 9722: Toggle display of hold notes with Edit notes button
Small adjustments, requested by Kyle:
1) Rename Show notes button. It is called now: Edit notes.
2) Do not hide all other notes fields. The Edit button now only toggles
the corresponding hold notes field.
Signed-off-by: Marcel de Rooy
Signed-off-by: Kyle M Hall
Signed-off-by: Jonathan Druart
---
koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt
index c77a11e047..8e58e28e23 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt
@@ -117,8 +117,12 @@
// Show or hide holds notes
$(".shownotes").click(function(){
biblioNum = suffixOf($(this).attr("id"), "_");
- $(".notesrow").hide();
- $("#notesrow_"+biblioNum).show();
+ if( $("#notesrow_"+biblioNum).is(":visible") ) {
+ $("#notesrow_"+biblioNum).hide();
+ }
+ else {
+ $("#notesrow_"+biblioNum).show();
+ }
});
// When 'Place Hold' button is clicked
@@ -360,7 +364,7 @@
Clear date
[% END %]
- [% IF ( OPACShowHoldNotes ) %][% IF ( bibitemloo.holdable ) %]
[% END %][% END %]
+ [% IF ( OPACShowHoldNotes ) %][% IF ( bibitemloo.holdable ) %]
[% END %][% END %]
[% IF ( bibitemloo.holdable ) %]
--
2.39.5