From c48a79e421c086e6c5906383658fc84c9b79712d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 28 Feb 2008 10:18:31 +1300 Subject: [PATCH] Previous buttons failed miserable in IE. Trying a YUI solution. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 171 +++--------------- .../prog/en/includes/doc-head-close.inc | 2 +- .../opac-tmpl/prog/en/includes/masthead.inc | 4 +- koha-tmpl/opac-tmpl/prog/en/js/script.js | 15 +- 4 files changed, 34 insertions(+), 158 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 98fb1e7639..8cc4753e37 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -1205,12 +1205,21 @@ div#changelanguage a.yuimenuitemlabel { text-align : center; } +#listsmenulink { + margin-left: 1em; +} + a#listsmenulink, a#listsmenulink:hover { color : #006699; font-size : 105%; line-height : 185%; } + +#cartmenulink .first-child a, #listsmenulink .first-child a { + padding: .3em 1em; +} + a#cartmenulink, a#cartmenulink:hover { color : #336600; font-size : 105%; @@ -1235,154 +1244,6 @@ a#cartmenulink, a#cartmenulink:hover { padding : 2px; } -.btn { - display : block; - position : relative; - padding : 5px; - text-decoration : none; - cursor : default; - margin-left : .5em; -} - -.btn * { - font-style : normal; - background-image : url('../../images/button-background.png'); - background-repeat : no-repeat; - display : block; - position : relative; -} - -#cartmenulink.btn span#basket { - background-image : none; - display : inline; - height : auto; - position : relative; - margin : 0; - padding : 0; - left : auto; - right : auto; - top : auto; -} - -#cartmenulink.btn 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 .5em 0 .5em; - padding : 0 .3em 0 .3em; - position : relative; - right : auto; - top : auto; -} - -#cartmenulink.btn img { - background-image : none; - float : left; - padding : 3px 3px 0 3px; -} - -#listsmenulink.btn img { - background-image : none; - display : inline; - padding : 0 0 2px 3px; -} - -.btn i { - background-position : top left; - position : absolute; - margin-bottom : -5px; - top : 0; - left : 0; - width : 5px; - height : 5px; -} - -.btn span { - background-position : bottom left; - left : -5px; - padding : 0 0 5px 10px; - margin-bottom : -5px; -} - -.btn span i { - background-position : bottom right; - margin-bottom : 0; - position : absolute; - left : 100%; - width : 10px; - height : 100%; - top : 0; -} - -.btn span span { - background-position : top right; - position : absolute; - right : -10px; - margin-left : 10px; - top : -5px; - height : 0; -} - -* html .btn span, * html .btn i { - float : left; - width : auto; - background-image : none; - cursor : pointer; -} - -.btn.blue { - background : #9fbfff; -} - -.btn.blue:hover { - background-color : #6699FF; - background-image : none; -} - -.btn.green { - background : #98CB58; -} - -.btn.green:hover { - background-color : #98CB58; - background-image : none; -} - -.btn:active { - background-color : #444; -} - -.btn[class] { - background-image : url('../../images/button-background-gradient.png'); - background-position : 0 0; -} - -.btn[class]:hover { - background-image : url('../../images/button-background-gradient.png'); - background-position : 0 -200px; -} - -* html .btn { - border : 3px double #aaa; -} - -* html .btn.blue { - border-color : #2ae; -} - -* html .btn.green { - border-color : #9d4; -} - -* html .btn:hover { - border-color : #a00; -} - div#menu { border-right : 1px solid #979797; font-size : 94%; @@ -1433,7 +1294,15 @@ div#menu li.active a:hover { #searchsubmit { cursor : default; font-size : 87%; - margin-top : -.1em; +} + +body #opac-main-search #searchsubmit.yui-button { + margin : -.3em 0.25em; +} + +body #opac-main-search #cartmenulink.yui-button , body #opac-main-search #listsmenulink.yui-button { + margin-bottom : -1em; + margin-left : 1em; } #export { @@ -1469,4 +1338,8 @@ div#menu li.active a:hover { padding: 0; position: relative; width: 100px; +} + +#searchsubmit button { + padding : 0 3px; } \ No newline at end of file diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc index 38820be1a1..6cd88af790 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc @@ -10,7 +10,7 @@ - + " /> diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc index f49238d81b..985d66214e 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -62,9 +62,9 @@ " type="hidden" /> - + -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 c26c537616..b296231379 100644 --- a/koha-tmpl/opac-tmpl/prog/en/js/script.js +++ b/koha-tmpl/opac-tmpl/prog/en/js/script.js @@ -68,8 +68,11 @@ YAHOO.util.Event.onContentReady("listsmenu", function () { $("#listsmenu").css("display","block").css("visibility","hidden"); $("#cartDetails").css("display","block").css("visibility","hidden"); - $("#cmspan").html("Cart"); - $('.btn').each(function(){ + $("#cmspan").html("Cart"); + new YAHOO.widget.Button("searchsubmit"); + new YAHOO.widget.Button("cartmenulink"); + new YAHOO.widget.Button("listsmenulink"); + /* $('.btn').each(function(){ var b = $(this); var tt = b.text() || b.val(); if ($(':submit,:button',this)) { @@ -78,15 +81,15 @@ YAHOO.util.Event.onContentReady("listsmenu", function () { } b.text('').css({cursor:'pointer'}). prepend('') .append( $('').text(tt).append('') ); - }); + }); */ $("#searchsubmit").click(function(){ $("#searchform").submit(); }) - $("#cartmenulink").find("i:first").before("\"\""); - $("#cartmenulink").find("i:last").before(""); + // $("#cartmenulink").find("i:first").before("\"\""); + // $("#cartmenulink").find("i:last").before(""); - $("#listsmenulink").find("i:last").before("\"\""); + // $("#listsmenulink").find("i:last").before("\"\""); if(basketcount){ updateBasket(basketcount,document) } var listMenu = new YAHOO.widget.Menu("listsmenu", { lazyload: true }); -- 2.39.5