2 YAHOO
.namespace("yui.examples");
4 //Only instantiate logger stuff if the page has loaded in logger mode:
5 if((YAHOO
.widget
.LogReader
)&&(YAHOO
.util
.Dom
.get("loggerDiv"))) {
6 //Create Logger instance for example page:
7 YAHOO
.yui
.examples
.exampleLogger
= new YAHOO
.widget
.LogReader("loggerDiv");
9 //Logger comes up a bit more cleanly if its container has an approximate
10 //height and is visibility:hidden intil after init;
11 YAHOO
.yui
.examples
.loggerInit = function() {
12 YAHOO
.util
.Dom
.setStyle("loggerDiv", "height", "auto");
13 YAHOO
.util
.Dom
.setStyle("loggerDiv", "visibility", "visible");
15 YAHOO
.util
.Event
.onDOMReady(YAHOO
.yui
.examples
.loggerInit
);
18 //instantiate buttons:
19 YAHOO
.yui
.examples
.onLinkButtonsMarkupReady = function() {
20 //if the logger is in use, enable its button:
21 if (YAHOO
.util
.Dom
.get("loggerLink")) {
22 var loggerButton
= new YAHOO
.widget
.Button("loggerLink");
25 //if a new window button is present, initialize it:
26 if (YAHOO
.util
.Dom
.get("newWindowLink")) {
27 var newWindowButton
= new YAHOO
.widget
.Button("newWindowLink");
30 //wait until loggerDiv is present; the window buttons will have loaded
32 YAHOO
.util
.Event
.onContentReady("module", YAHOO
.yui
.examples
.onLinkButtonsMarkupReady
);