From 89b6ed5c1f73709ce47bcc99dc801346d6bf3152 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 29 Oct 2007 16:44:59 -0500 Subject: [PATCH] Re-working virtual shelves interface to try to make it cleaner and make the steps more clear. Still a couple of bugs: some redirects need to change in the script (after adds, deletes, and edits), to match the changes in what displays at each step. Also, the toolbar delete button needs troubleshooting. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- .../en/includes/virtualshelves-toolbar.inc | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc index 0750fb2da4..6594084e22 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc @@ -5,7 +5,7 @@ // prepare DOM for YUI Toolbar $(document).ready(function() { - // $("#deleteshelfc").empty(); + $("#deleteshelfc").empty(); yuiToolbar(); }); @@ -14,15 +14,14 @@ function yuiToolbar() { newshelfButton = new YAHOO.widget.Button("newshelf"); editshelfButton = new YAHOO.widget.Button("editshelf"); - deleteshelfButton = new YAHOO.widget.Button("deleteshelf", { value: "deleteshelfvalue" }); - YAHOO.util.Event.on("deleteshelf_f", "submit", confirmDelete); + deleteshelfButton = new YAHOO.widget.Button({ + id: "deleteshelf", + type: "button", + label: "Delete Shelf", + container: "deleteshelfc", + onclick: {fn:function(){confirmDelete("Are you sure you want to delete this shelf?")}} + }); } - function confirmDelete(p_oEvent) { - var bSubmit = window.confirm("Are you sure you want to delete this shelf?"); - if(!bSubmit) { - YAHOO.util.Event.preventDefault(p_oEvent); - } - } //]]> @@ -30,11 +29,5 @@ -- 2.39.2