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 43-77 function _(s) { return s } // dummy function for gettext Link Here
43
                YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMoremenu);
43
                YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMoremenu);
44
            });
44
            });
45
45
46
// build Change Language menus
46
YAHOO.util.Event.onContentReady("changelanguage", function () {
47
YAHOO.util.Event.onContentReady("changelanguage", function () {
47
                var oMenu = new YAHOO.widget.Menu("sublangs", { zindex: 2 });
48
	$(".sublangs").each(function(){
48
49
		var menuid = $(this).attr("id");
49
	            function positionoMenu() {
50
		var menuid = menuid.replace("show","");
50
                    oMenu.align("bl", "tl");
51
51
                }
52
		var oMenu = new YAHOO.widget.Menu("sub"+menuid, { zindex: 2 });
52
53
		function positionoMenu() {
53
                oMenu.subscribe("beforeShow", function () {
54
			oMenu.align("bl", "tl");
54
                    if (this.getRoot() == this) {
55
		}
55
						positionoMenu();
56
		oMenu.subscribe("beforeShow", function () {
56
                    }
57
		if (this.getRoot() == this) {
57
                });
58
			positionoMenu();
58
59
		}
59
                oMenu.render();
60
		});
60
61
		oMenu.render();
61
				oMenu.cfg.setProperty("context", ["showlang", "bl", "tl"]);
62
		oMenu.cfg.setProperty("context", ["show"+menuid, "bl", "tl"]);
62
63
		function onYahooClick(p_oEvent) {
63
				function onYahooClick(p_oEvent) {
64
			// Position and display the menu
64
                    // Position and display the menu        
65
			positionoMenu();
65
                    positionoMenu();
66
			oMenu.show();
66
                    oMenu.show();
67
			// Stop propagation and prevent the default "click" behavior
67
                    // Stop propagation and prevent the default "click" behavior
68
			YAHOO.util.Event.stopEvent(p_oEvent);
68
                    YAHOO.util.Event.stopEvent(p_oEvent);
69
		}
69
                }
70
		YAHOO.util.Event.addListener("show"+menuid, "click", onYahooClick);
70
71
		YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMenu);
71
				YAHOO.util.Event.addListener("showlang", "click", onYahooClick);
72
	});
72
73
});
73
				YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMenu);
74
            });
75
			
74
			
76
// http://jennifermadden.com/javascript/stringEnterKeyDetector.html
75
// http://jennifermadden.com/javascript/stringEnterKeyDetector.html
77
function checkEnter(e){ //e is event object passed from function invocation
76
function checkEnter(e){ //e is event object passed from function invocation
78
- 

Return to bug 5048