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