From 21d03d44810b77b224d72d0e744c162c516281c3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 9 Oct 2007 16:46:54 -0500 Subject: [PATCH] Another tweak to the toolbar. Some toolbar buttons were not showing up on initial page load. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- .../prog/en/modules/catalogue/detail.tmpl | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl index 27d8c631cf..c568a75487 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl @@ -48,22 +48,11 @@ function confirm_deletion(count) { $("#edititems").parent().remove(); $("#duplicatebiblio").parent().remove(); $("#editmenucontainer").empty(); + yuiToolbar(); }); // YUI Toolbar Functions - YAHOO.example.init = function () { - YAHOO.util.Event.onContentReady("toolbar", function () { - var oAddbiblio = new YAHOO.widget.Button("addbiblio"); - var oEditbiblio = new YAHOO.widget.Button("editbiblio"); - var oEdititems = new YAHOO.widget.Button("edititems"); - var oDuplicatebiblio = new YAHOO.widget.Button("duplicatebiblio"); - var oDeletebiblio = new YAHOO.widget.Button("deletebiblio"); - var oAddtoshelf = new YAHOO.widget.Button("addtoshelf"); - var oPrintbiblio = new YAHOO.widget.Button("printbiblio"); - var oPlacehold = new YAHOO.widget.Button("placehold"); - }); - 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=" }, @@ -77,8 +66,19 @@ function confirm_deletion(count) { menu: editmenu, container: "editmenucontainer" }); - + +function yuiToolbar(){ + YAHOO.toolbar.init = function () { + var oAddbiblio = new YAHOO.widget.Button("addbiblio"); + var oEditbiblio = new YAHOO.widget.Button("editbiblio"); + var oEdititems = new YAHOO.widget.Button("edititems"); + var oDuplicatebiblio = new YAHOO.widget.Button("duplicatebiblio"); + var oDeletebiblio = new YAHOO.widget.Button("deletebiblio"); + var oAddtoshelf = new YAHOO.widget.Button("addtoshelf"); + var oPrintbiblio = new YAHOO.widget.Button("printbiblio"); + var oPlacehold = new YAHOO.widget.Button("placehold"); } (); +} //]]> -- 2.39.5