From 787790d75fdd2b3cef03549b21a89d9195cf1502 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 14 Mar 2008 11:45:06 -0500 Subject: [PATCH] Tweaking cart and lists buttons for non-javascript users Signed-off-by: Joshua Ferraro --- .../opac-tmpl/prog/en/includes/masthead.inc | 4 +-- koha-tmpl/opac-tmpl/prog/en/js/script.js | 28 ++++--------------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc index 7b0e6b56a2..47e028e57b 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -65,9 +65,9 @@ - Cart + -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 22ad15a9bc..cce93fc9d5 100644 --- a/koha-tmpl/opac-tmpl/prog/en/js/script.js +++ b/koha-tmpl/opac-tmpl/prog/en/js/script.js @@ -83,27 +83,12 @@ YAHOO.util.Event.onContentReady("listsmenu", function () { $("#listsmenu").css("display","block").css("visibility","hidden"); $("#cartDetails").css("display","block").css("visibility","hidden"); -/* $("#cmspan").html("Cart");*/ - /*if(!$.browser.msie){ - $('.btn').each(function(){ - var b = $(this); - var tt = b.text() || b.val(); - if ($(':submit,:button',this)) { - b = $('').insertAfter(this). addClass(this.className).attr('id',this.id); - $(this).remove(); - } - b.text('').css({cursor:'pointer'}). prepend('') - .append( $('').text(tt).append('') ); - }); - }*/ + $("#cmspan").html("\"\" Cart"); + $("#listsmenulink").attr("href","#").find("span:eq(0)").append("\"\""); $("#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 }); @@ -115,10 +100,9 @@ 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); -/* $("#cartmenulink").find("a").append("");*/ - - if(basketcount){ updateBasket(basketcount,document) } + YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionlistMenu); + + if(basketcount){ updateBasket(basketcount,document) } }); -- 2.39.5