View | Details | Raw Unified | Return to bug 5048
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc (-1 / +1 lines)
Lines 7-13 Link Here
7
        <!-- TMPL_LOOP NAME="languages_loop" -->
7
        <!-- TMPL_LOOP NAME="languages_loop" -->
8
            <!-- TMPL_IF NAME="group_enabled" -->
8
            <!-- TMPL_IF NAME="group_enabled" -->
9
            <!-- TMPL_IF NAME="plural" -->
9
            <!-- TMPL_IF NAME="plural" -->
10
            <li class="more"><a id="showlang" href="#"><!-- TMPL_VAR NAME="native_description" --> (<!-- TMPL_VAR NAME="rfc4646_subtag" -->)</a><div id="sublangs">
10
            <li class="more"><a class="sublangs" id="show<!-- TMPL_VAR NAME="rfc4646_subtag" -->" href="#"><!-- TMPL_VAR NAME="native_description" --> (<!-- TMPL_VAR NAME="rfc4646_subtag" -->)</a><div id="sub<!-- TMPL_VAR NAME="rfc4646_subtag" -->">
11
            <div class="bd"><ul>
11
            <div class="bd"><ul>
12
            <!-- TMPL_LOOP NAME="sublanguages_loop" -->
12
            <!-- TMPL_LOOP NAME="sublanguages_loop" -->
13
		<!-- TMPL_IF NAME="enabled" -->
13
		<!-- TMPL_IF NAME="enabled" -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js (-29 / +27 lines)
Lines 41-75 function _(s) { return s } // dummy function for gettext Link Here
41
                YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMoremenu);
41
                YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMoremenu);
42
            });
42
            });
43
43
44
// build Change Language menus
44
YAHOO.util.Event.onContentReady("changelanguage", function () {
45
YAHOO.util.Event.onContentReady("changelanguage", function () {
45
                var oMenu = new YAHOO.widget.Menu("sublangs", { zindex: 2 });
46
	$(".sublangs").each(function(){
46
47
		var menuid = $(this).attr("id");
47
	            function positionoMenu() {
48
		var menuid = menuid.replace("show","");
48
                    oMenu.align("bl", "tl");
49
49
                }
50
		var oMenu = new YAHOO.widget.Menu("sub"+menuid, { zindex: 2 });
50
51
		function positionoMenu() {
51
                oMenu.subscribe("beforeShow", function () {
52
			oMenu.align("bl", "tl");
52
                    if (this.getRoot() == this) {
53
		}
53
						positionoMenu();
54
		oMenu.subscribe("beforeShow", function () {
54
                    }
55
		if (this.getRoot() == this) {
55
                });
56
			positionoMenu();
56
57
		}
57
                oMenu.render();
58
		});
58
59
		oMenu.render();
59
				oMenu.cfg.setProperty("context", ["showlang", "bl", "tl"]);
60
		oMenu.cfg.setProperty("context", ["show"+menuid, "bl", "tl"]);
60
61
		function onYahooClick(p_oEvent) {
61
				function onYahooClick(p_oEvent) {
62
			// Position and display the menu
62
                    // Position and display the menu        
63
			positionoMenu();
63
                    positionoMenu();
64
			oMenu.show();
64
                    oMenu.show();
65
			// Stop propagation and prevent the default "click" behavior
65
                    // Stop propagation and prevent the default "click" behavior
66
			YAHOO.util.Event.stopEvent(p_oEvent);
66
                    YAHOO.util.Event.stopEvent(p_oEvent);
67
		}
67
                }
68
		YAHOO.util.Event.addListener("show"+menuid, "click", onYahooClick);
68
69
		YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMenu);
69
				YAHOO.util.Event.addListener("showlang", "click", onYahooClick);
70
	});
70
71
});
71
				YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMenu);
72
            });
73
			
72
			
74
// http://jennifermadden.com/javascript/stringEnterKeyDetector.html
73
// http://jennifermadden.com/javascript/stringEnterKeyDetector.html
75
function checkEnter(e){ //e is event object passed from function invocation
74
function checkEnter(e){ //e is event object passed from function invocation
76
- 

Return to bug 5048