From 512f029379a1eb14070ca9191c3f59191bd3ebfd Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 28 Feb 2008 10:18:33 +1300 Subject: [PATCH] Still working on YUI cart/lists buttons Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 45 +++++++++++++++++++ .../opac-tmpl/prog/en/includes/masthead.inc | 2 +- koha-tmpl/opac-tmpl/prog/en/js/script.js | 30 +++++++------ 3 files changed, 62 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 78451b6578..f58bcbce2c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -1301,8 +1301,15 @@ body #opac-main-search #searchsubmit.yui-button { } body #opac-main-search #cartmenulink.yui-button , body #opac-main-search #listsmenulink.yui-button { + font-size:105%; margin-bottom : -1em; margin-left : 1em; + line-height:185%; +} + +a#cartmenulink, a#cartmenulink:hover { +} +a#listsmenulink, a#listsmenulink:hover { } body #opac-main-search #cartmenulink.yui-button { @@ -1315,6 +1322,7 @@ body #opac-main-search #listsmenulink.yui-button { background-image : url(../../images/lists-button-background.gif); background-position : top left; background-repeat : repeat; + color:#006699; } body #opac-main-search #cartmenulink.yui-button a { @@ -1323,6 +1331,43 @@ body #opac-main-search #cartmenulink.yui-button a { background-image : url(../../images/cart2.gif); background-repeat: no-repeat; background-position: left; + color:#336600; +} + +body #opac-main-search #listsmenulink.yui-button a { + background-image : url(../../images/list.gif); + background-position : right; + background-repeat : no-repeat; + margin-right : 10px; + padding-right : 10px; +} + +body #opac-main-search #cartmenulink.yui-button span#basket { + background-image : none; + display : inline; + height : auto; + position : relative; + margin : 0; + padding : 0; + left : auto; + right : auto; + top : auto; +} + +body #opac-main-search #cartmenulink.yui-button span#basket span { + background-image : none; + background-color : #E6FCB7; + color : #000; + display : inline; + font-size : 80%; + font-weight : normal; + height : auto; + left : auto; + margin : 0 0 0 .5em; + padding : 0 .3em 0 .3em; + position : relative; + right : auto; + top : auto; } #export { diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc index 985d66214e..64bc039645 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -64,7 +64,7 @@ -Lists +Lists diff --git a/koha-tmpl/opac-tmpl/prog/en/js/script.js b/koha-tmpl/opac-tmpl/prog/en/js/script.js index 493df31484..2a8e15839d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/js/script.js +++ b/koha-tmpl/opac-tmpl/prog/en/js/script.js @@ -69,21 +69,15 @@ YAHOO.util.Event.onContentReady("listsmenu", function () { $("#cartDetails").css("display","block").css("visibility","hidden"); $("#cmspan").html("Cart"); + $("#listsmenulinkc").empty(); new YAHOO.widget.Button("searchsubmit"); new YAHOO.widget.Button("cartmenulink"); - new YAHOO.widget.Button("listsmenulink"); - $("#cartmenulink").find("a").append(" 18"); - $("#searchsubmit").click(function(){ - $("#searchform").submit(); - }) - - // $("#cartmenulink").find("i:first").before("\"\""); - // $("#cartmenulink").find("i:last").before(""); - - // $("#listsmenulink").find("i:last").before("\"\""); - if(basketcount){ updateBasket(basketcount,document) } - - var listMenu = new YAHOO.widget.Menu("listsmenu", { lazyload: true }); + new YAHOO.widget.Button({ + type: "link", + id: "listsmenulink", + label: "Lists", + container: "listsmenulinkc" }); + var listMenu = new YAHOO.widget.Menu("listsmenu", { lazyload: true }); listMenu.render(); listMenu.cfg.setProperty("context", ["listsmenulink", "tr", "br"]); listMenu.cfg.setProperty("effect",{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.05}); @@ -92,7 +86,15 @@ YAHOO.util.Event.onContentReady("listsmenu", function () { listMenu.align("tr", "br"); } YAHOO.util.Event.addListener("listsmenulink", "click", listMenu.show, null, listMenu); - YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionlistMenu); + YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionlistMenu); + $("#cartmenulink").find("a").append(""); + $("#searchsubmit").click(function(){ + $("#searchform").submit(); + }) + + if(basketcount){ updateBasket(basketcount,document) } + + }); function init() { -- 2.39.5