From d4ca58e80af72f1dabd2d83206c961251f35fc8c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 8 Aug 2008 11:06:47 -0500 Subject: [PATCH] Adding "New Item" menu option. Jumps to anchor for Add Item form. Signed-off-by: Joshua Ferraro --- .../prog/en/includes/cat-toolbar.inc | 20 ++++++++++++++++--- .../prog/en/modules/cataloguing/additem.tmpl | 2 +- 2 files changed, 18 insertions(+), 4 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 99017cbb80..c0e62ea786 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -33,7 +33,9 @@ function confirm_deletion() { $("#edititems").parent().remove(); $("#duplicatebiblio").parent().remove(); $("#deletebiblio").parent().remove(); + $("#newitem").parent().remove(); $("#editmenuc").empty(); + $("#newmenuc").empty(); $("#addtoshelfc").empty(); $("#printbiblioc").empty(); $("#export").remove(); @@ -44,6 +46,11 @@ function confirm_deletion() { // YUI Toolbar Functions function yuiToolbar() { + var newmenu = [ + {text: _("New Record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl" }, + {text: _("New Item"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=#additema" } + ]; + var editmenu = [ { text: _("Edit Record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=&frameworkcode=&op=" }, { text: _("Edit Items"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=" }, @@ -73,7 +80,14 @@ function confirm_deletion() { name: "editmenubutton", menu: editmenu, container: "editmenuc", - + }); + + new YAHOO.widget.Button({ + type: "menu", + label: _("New"), + name: "newmenubutton", + menu: newmenu, + container: "newmenuc", }); var addtoshelfButton = new YAHOO.widget.Button({ @@ -102,8 +116,8 @@ function confirm_deletion() {