From ea85fbbb3f3c7ddb16132fe52e6c16713cf0fb65 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 8 Jul 2011 13:07:10 -0400 Subject: [PATCH] Fix for Bug 6569, Split menu button not working with "search to hold" Content-Type: text/plain; charset="utf-8" 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