[Koha-patches] [PATCH] Fix for Bug 6569, Split menu button not working with "search to hold"

Owen Leonard oleonard at myacpl.org
Fri Jul 8 19:09:01 CEST 2011


Before this patch, clicking the down-arrow on the "Place hold"
split menu button would submit the form right away with the
default action. After applying the patch the form should not
submit until you choose one of the two menu items ("Place hold"
or "Place hold for [Patron]").
---
 .../intranet-tmpl/prog/en/includes/cat-toolbar.inc |    2 +-
 .../prog/en/modules/catalogue/results.tt           |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
index 3c32160..555c00b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
@@ -170,8 +170,8 @@ function confirm_items_deletion() {
 				name: "holdfor",
 				menu: HoldForButtonMenu,
 				container: this,
-				onclick: { fn: onButtonClick }
 		});
+		HoldForButton.on("click", onButtonClick);
 	    [% ELSE %]
 	    new YAHOO.widget.Button({
 			id: "placehold",
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
index e1f84b8..8bf6121 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
@@ -189,9 +189,9 @@ YAHOO.util.Event.onContentReady("searchheader", function () {
                 label: "Place hold",
                 name: "holdfor",
                 menu: HoldForButtonMenu,
-                container: "placeholdc",
-                onclick: { fn: holdFor }
+                container: "placeholdc"
         });
+        HoldForButton.on("click", holdFor);
         [% ELSE %]
         new YAHOO.widget.Button({
             id: "placehold",
-- 
1.7.3



More information about the Koha-patches mailing list