Adding "New Item" menu option. Jumps to anchor for Add Item form.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Owen Leonard 2008-08-08 11:06:47 -05:00 committed by Joshua Ferraro
parent 8a7a709fb3
commit d4ca58e80a
2 changed files with 18 additions and 4 deletions

View file

@ -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=<!-- TMPL_VAR NAME="biblionumber" -->#additema" }
];
var editmenu = [
{ text: _("Edit Record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;frameworkcode=&amp;op=" },
{ text: _("Edit Items"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="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() {
<ul class="toolbar">
<!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
<li><a id="newbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl">New</a></li>
<li id="newmenuc"><a id="newbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl">New Record</a></li>
<li><a id="newitem" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">New Item</a></li>
<li id="editmenuc"><a id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;frameworkcode=<!--TMPL_VAR Name="current_framework" -->&amp;op=">Edit Record</a></li>
<li><a id="edititems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Edit Items</a></li>
<li><a id="duplicatebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;frameworkcode=<!--TMPL_VAR Name="current_framework" -->&amp;op=duplicate">Duplicate Record</a></li>

View file

@ -191,7 +191,7 @@ function CreateKey(){
<input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->" />
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
<!-- TMPL_IF name="opisadd" -->
<h2>Add Item</h2>
<h2 id="additema">Add Item</h2>
<!-- TMPL_ELSE -->
<h2>Edit Item</h2>
<!-- /TMPL_IF -->