From 22654a59773368ca3775f22d63f925de51690aee Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 19 Jun 2008 10:49:27 -0500 Subject: [PATCH] Redesigning and bugfixing language-picker. Switching from fixed footer positioning to one with flows with page length. Fixing major unreported bug which prevented any but the first sublanguage menu from displaying. Signed-off-by: Joshua Ferraro --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 88 ++++-------------- .../prog/en/includes/opac-bottom.inc | 17 ++-- koha-tmpl/opac-tmpl/prog/en/js/script.js | 48 +++++----- .../opac-tmpl/prog/images/more-up-arrow.gif | Bin 155 -> 66 bytes 4 files changed, 56 insertions(+), 97 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index c9e799039c..79f68e6274 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -1183,84 +1183,36 @@ div.message { color : #000; } - -ul#i18nMenu { - margin : 0; - padding : .2em 0; - } - -ul#i18nMenu li { - border-left : 1px solid #CCC; - display : inline; - list-style : none; - padding : 0 10px; - } - -ul#i18nMenu li a { - text-decoration : none; -} - -ul#i18nMenu li:first-child { - border-left : 0; - } - -ul#i18nMenu li ul li { - border : 0; - display : block; +div#changelanguage{ + background-color: #fff; + border-top: 1px solid #CCC; + color : #666; + font-size : 85%; + padding : 1em; } +div#changelanguage a { + font-weight : normal; + padding : .5em; +} -ul#i18nMenu li.more a { +div#changelanguage a.more { background-image:url(../../images/more-up-arrow.gif); background-position:right center; background-repeat:no-repeat; padding-right:13px; } - -ul#i18nMenu li.more ul li a { - background-image : none; - padding-right : 20px; -} - div#changelanguage{ - background-color: #fff; - border-top: 1px solid #CCC; - position:absolute; - bottom:0; - left:0; - width:100%; - height: 1.8em; - } - - @media screen{ - body>div#changelanguage { - position: fixed; - } - } - - * html body{ - overflow:hidden; - } - - * html div#doc1{ - height:100%; - overflow:auto; - } - - * html div#doc2{ - height:100%; - overflow:auto; - } - - * html div#doc3{ - height:100%; - overflow:auto; - } - -div#changelanguage a.yuimenuitemlabel { - color : #006699; +div#changelanguage li.yuimenuitem { + font-size : 120%; font-weight : normal; - } + margin : 0; + padding : 0 1em; +} + +div#changelanguage li.yuimenuitem a.yuimenuitemlabel { + padding : 0; +} #cartDetails,#cartUpdate { background-color : #FFF; diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc index 1020e3256a..e4551c083c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc @@ -7,12 +7,12 @@ -
- +
+ -
  • + -
  • ">
  • + "> - + | - diff --git a/koha-tmpl/opac-tmpl/prog/en/js/script.js b/koha-tmpl/opac-tmpl/prog/en/js/script.js index 4c8d077ff2..4763af30d1 100644 --- a/koha-tmpl/opac-tmpl/prog/en/js/script.js +++ b/koha-tmpl/opac-tmpl/prog/en/js/script.js @@ -26,27 +26,33 @@ $(document).ready(function(){ // build Change Language menus YAHOO.util.Event.onContentReady("changelanguage", function () { - var oMenu = new YAHOO.widget.Menu("sublangs", { zindex: 2 }); - function positionoMenu() { - oMenu.align("bl", "tl"); - } - oMenu.subscribe("beforeShow", function () { - if (this.getRoot() == this) { - positionoMenu(); - } - }); - oMenu.render(); - oMenu.cfg.setProperty("context", ["showlang", "bl", "tl"]); - function onYahooClick(p_oEvent) { - // Position and display the menu - positionoMenu(); - oMenu.show(); - // Stop propagation and prevent the default "click" behavior - YAHOO.util.Event.stopEvent(p_oEvent); - } - YAHOO.util.Event.addListener("showlang", "click", onYahooClick); - YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMenu); - }); + $(".sublangs").each(function(){ + var menuid = $(this).attr("id"); + var menuid = menuid.replace("show",""); + + var oMenu = new YAHOO.widget.Menu("sub"+menuid, { zindex: 2 }); + function positionoMenu() { + oMenu.align("bl", "tl"); + } + oMenu.subscribe("beforeShow", function () { + if (this.getRoot() == this) { + positionoMenu(); + } + }); + oMenu.render(); + oMenu.cfg.setProperty("context", ["show"+menuid, "bl", "tl"]); + function onYahooClick(p_oEvent) { + // Position and display the menu + positionoMenu(); + oMenu.show(); + // Stop propagation and prevent the default "click" behavior + YAHOO.util.Event.stopEvent(p_oEvent); + } + YAHOO.util.Event.addListener("show"+menuid, "click", onYahooClick); + YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMenu); + + }); +}); // Build lists menu YAHOO.util.Event.onContentReady("listsmenu", function () { diff --git a/koha-tmpl/opac-tmpl/prog/images/more-up-arrow.gif b/koha-tmpl/opac-tmpl/prog/images/more-up-arrow.gif index a62357d651692c92fb53a1cb1daf59aa6c761655..68bd824db7538dd41f83dc424b414000236a7cae 100644 GIT binary patch literal 66 zcmZ?wbhEHb;m8G?>cU0>9;Xh0|1g#6F~p~ -- 2.39.5