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 |
- |
|
|