From 8d7b4a7bccda0d53417654c2731116aeba268a8c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 8 Dec 2009 11:01:58 -0500 Subject: [PATCH] Creating "Add to" menu to biblio toolbar for adding biblio to cart or list (Bug 3871) --- .../prog/en/includes/cat-toolbar.inc | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 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 b26bc57368..91ebe4cede 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -20,6 +20,7 @@ return strQuery; } + function addToCart() { addRecord(''); } function addToShelf() { window.open('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=','Add_to_virtualshelf','width=500,height=400,toolbar=false,scrollbars=yes'); } function printBiblio() {window.open('/cgi-bin/koha/catalogue/detailprint.pl?biblionumber=','Print_Biblio','width=700,height=500,toolbar=false,scrollbars=yes'); @@ -97,6 +98,11 @@ function confirm_items_deletion() { { text: _("MARC (Unicode/UTF-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=utf8&op=export&bib=" } ]; + var addtomenu = [ + { text: _("Cart"), onclick: { fn: addToCart } }, + { text: _("List"), onclick: { fn: addToShelf } } + ]; + new YAHOO.widget.Button({ type: "menu", label: _("Save"), @@ -104,7 +110,7 @@ function confirm_items_deletion() { menu: savemenu, container: "savemenuc" }); - + new YAHOO.widget.Button({ type: "menu", label: _("Edit"), @@ -112,7 +118,7 @@ function confirm_items_deletion() { menu: editmenu, container: "editmenuc" }); - + new YAHOO.widget.Button({ type: "menu", label: _("New"), @@ -120,7 +126,15 @@ function confirm_items_deletion() { menu: newmenu, container: "newmenuc" }); - + + new YAHOO.widget.Button({ + type: "menu", + label: _("Add to"), + name: "addtomenubutton", + menu: addtomenu, + container: "addtoshelfc" + }); + new YAHOO.widget.Button({ id: "z3950search", type: "button", @@ -129,14 +143,6 @@ function confirm_items_deletion() { onclick: {fn:function(){PopupZ3950()}} }); - var addtoshelfButton = new YAHOO.widget.Button({ - id: "addtoshelf", - type: "button", - label: _("Add to List"), - container: "addtoshelfc", - onclick: {fn: addToShelf } - }); - var printbiblioButton = new YAHOO.widget.Button({ id: "printbiblio", type: "button", -- 2.39.5