Working on the language-picker menu in the footer
authorOwen Leonard <oleonard@myacpl.org>
Fri, 25 Jan 2008 21:04:23 +0000 (15:04 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Fri, 25 Jan 2008 22:52:07 +0000 (16:52 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Auth.pm
koha-tmpl/opac-tmpl/prog/en/css/opac.css
koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc
koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc
koha-tmpl/opac-tmpl/prog/en/js/script.js
koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl

index d5b14d7..414c898 100755 (executable)
@@ -320,6 +320,7 @@ sub get_template_and_user {
             "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1,
             OPACFRBRizeEditions => C4::Context->preference("OPACFRBRizeEditions"),
             'item-level_itypes' => C4::Context->preference('item-level_itypes'),
+                       yuipath => C4::Context->preference("yuipath"),
         );
     }
        $template->param(listloop=>[{shelfname=>"Freelist", shelfnumber=>110}]);
index 690d517..f682b75 100644 (file)
@@ -15,6 +15,7 @@ a:hover {
 body {
        background-color : white;
        text-align : left;
+       padding : 0 0 2.5em 0;
 }
 
 caption {
@@ -1106,6 +1107,10 @@ ul#i18nMenu li {
        padding : 0 10px;
  }
  
+ul#i18nMenu li a {
+       text-decoration : none;
+}
 ul#i18nMenu li:first-child {
        border-left : 0;
  }
@@ -1118,7 +1123,7 @@ ul#i18nMenu li ul li {
  
                
 ul#i18nMenu li.more a {
-       background-image:url(../../img/more-up-arrow.gif);
+       background-image:url(../../images/more-up-arrow.gif);
        background-position:right center;
        background-repeat:no-repeat;
        padding-right:13px;
@@ -1136,7 +1141,7 @@ ul#i18nMenu li.more ul li a {
   bottom:0;
   left:0;
   width:100%;
-  height: 2em;
+  height: 1.8em;
  }
  
  @media screen{
@@ -1162,4 +1167,9 @@ ul#i18nMenu li.more ul li a {
  * html div#doc3{
   height:100%;
   overflow:auto;
+ }
+ div#changelanguage a.yuimenuitemlabel {
+       color : #006699;
+       font-weight : normal;
  }
\ No newline at end of file
index b991b51..e21907d 100644 (file)
@@ -1,16 +1,16 @@
 </title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <!-- TMPL_IF name="RSS" --><link rel="alternate" type="application/rss+xml" title="Koha - RSS" href="<!-- TMPL_VAR name="site_url"-->/opac-rss.pl?q=<!-- TMPL_VAR name="searchdesc"-->" /><!-- /TMPL_IF -->
-<link rel="stylesheet" type="text/css" href="http://staff.oleonard.dev.kohalibrary.com/intranet-tmpl/prog/en/lib/yui/button.css" />
-<link rel="stylesheet" type="text/css" href="http://staff.oleonard.dev.kohalibrary.com/intranet-tmpl/prog/en/lib/yui/menu.css" />
-<link rel="stylesheet" type="text/css" href="http://staff.oleonard.dev.kohalibrary.com/intranet-tmpl/prog/en/lib/yui/container.css" />
-<script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/yahoo-dom-event/yahoo-dom-event.js"></script>
-<script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/element/element-beta-min.js"></script>
-<script type="text/javascript" src="http://yui.yahooapis.com/2.4.1/build/container/container-min.js"></script> 
-<script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/menu/menu-min.js"></script>
-<script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/button/button-beta-min.js"></script>
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/lib/yui/button.css" />
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/lib/yui/menu.css" />
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/lib/yui/container.css" />
+<script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/yahoo-dom-event/yahoo-dom-event.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/element/element-beta-min.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/container/container-min.js"></script> 
+<script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/menu/menu-min.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/button/button-beta-min.js"></script>
 
-<script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/utilities/utilities.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/utilities/utilities.js"></script>
 <!-- TMPL_IF name="opacstylesheet" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="opacstylesheet" -->" /><!-- TMPL_ELSE -->
 <!-- TMPL_IF name="opaccolorstylesheet" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/<!-- TMPL_VAR NAME="opaccolorstylesheet" -->" /><!-- /TMPL_IF -->
 <!-- TMPL_IF name="opaclayoutstylesheet" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/<!-- TMPL_VAR NAME="opaclayoutstylesheet" -->" /><!-- TMPL_ELSE --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/opac.css" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
index 97990c4..87166d8 100644 (file)
@@ -10,7 +10,7 @@
         <!-- TMPL_LOOP NAME="languages_loop" -->
 
             <!-- TMPL_IF NAME="plural" -->
-            <li class="more"><a href="#"><!-- TMPL_VAR NAME="native_description" --> (<!-- TMPL_VAR NAME="rfc4646_subtag" -->)</a><div id="sublangs">
+            <li class="more"><a id="showlang" href="#"><!-- TMPL_VAR NAME="native_description" --> (<!-- TMPL_VAR NAME="rfc4646_subtag" -->)</a><div id="sublangs">
             <div class="bd"><ul>
             <!-- TMPL_LOOP NAME="sublanguages_loop" -->
 
index dc3460e..006c826 100644 (file)
@@ -36,17 +36,32 @@ function Dopop(link) {
        newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
 }
        
-/*$(document).ready(function(){
-       $('#masthead').each(function(){
-               $('a.button').each(function(){
-                       var b = $(this);
-                       var tt = b.text() || b.val();
-                       if ($(':submit,:button',this)) {
-                               b = $('<a>').insertAfter(this).addClass('btn').attr('id',this.id).attr('href',this.href);
-                               $(this).remove();
-                       }
-                       b.text('').css({cursor:'pointer'}). prepend('<i></i>').append($('<span>').
-                       text(tt).append('<i></i><span></span>'));
-                       });
-               });
-       });*/
+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);
+            });
\ No newline at end of file
index a346250..f6f4c5d 100644 (file)
@@ -4,7 +4,7 @@
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 </head>
 <body>
-<!-- TMPL_INCLUDE name="masthead-basic.inc" -->
+<!-- TMPL_INCLUDE name="masthead.inc" -->
 <div id="doc3" class="yui-t7">
    <div id="bd">
 <form action="/cgi-bin/koha/opac-search.pl" method="get">