var navset = global['navset'];
if (typeof(navset) == 'undefined') {
navset = "nav.xml";
var lzr = global['lzr'];
if (lzr && lzr == 'dhtml') {
Debug.info("gonna use dhtml nav.");
navset = "nav_dhtml.xml";
}
}
canvas.navdata.setSrc(navset);
canvas.navdata.doRequest();
var lastclone = clones[ clones.length - 1 ];
if ( !this.doneDel ){
this.doneDel = new LzDelegate( this, 'replicationDone');
} else {
this.doneDel.unregisterAll();
}
this.doneDel.register( lastclone , "oninit" );
var mb = this.parent;
mb.dataBound();
this.children.sendToBack();
this.setAttribute("isleaf", !this.datapath.p.hasChildNodes());
if( !this['clonenumber'] || this.clonenumber == 0) {
var mb = this.parent;
if (mb instanceof menubutton) {
mb.dataBound();
}
}
if (this.children.itemlist.subviews.length > 0) {
// Debug.write('doOpenChildren', this, o, this.children.itemlist.subviews);
var item_hgt = this.item.height;
this.itemlist.childlayout.setAttribute('hgt', item_hgt);
if (o) {
this.itemlist.childlayout.setAttribute('spacing', -item_hgt);
this.itemlist.childlayout.setAttribute('inset', -item_hgt);
this.children.setVisible(true);
this.itemlist.childlayout.doOpen();
} else {
this.itemlist.childlayout.doClose();
}
}
if (seq[0] == this.name) {
// first, open self
this.header.open();
if (seq.length > 1) {
this.nextOpenList = seq.splice(1,seq.length - 1);
}
}
if (this.animateOpen == null) {
this.animateOpen = new openanimator(this, { item: classroot });
}
this.animateOpen.doStart();
if (this.animateClose == null) {
this.animateClose = new closeanimator(this, { item: classroot });
}
this.animateClose.doStart();
icon.setAttribute("y", 9);
label.setAttribute("fgcolor", 0xffffff);
label.setAttribute("fontsize", 13);
icon.setAttribute("y", 5);
label.setAttribute("fgcolor", 0xd4dcec);
label.setAttribute("fontsize", 11);
var dp = this.datapath;
this.setAttribute("isleaf", !this.datapath.p.hasChildNodes());
var tagtype = dp.xpathQuery("name()");
this.background.setResource(tagtype + "_btn");
if (tagtype == 'subitem') {
this.smalltext();
} else {
this.largetext();
}
var action = dp.xpathQuery("@action");
if (action == 'popup' || action == 'source' || action == 'popupexternal') {
icon.setResourceNumber(4);
}
0 &&
'open' in classroot.itemlist.subviews[0].header)
classroot.itemlist.subviews[0].header.open();
} else {
var action = dp.xpathQuery("@action");
var runtime = dp.xpathQuery("@runtime");
if (typeof runtime == "undefined")
runtime = $runtime;
var src = dp.xpathQuery("@src");
var tagline = dp.xpathQuery("@text");
var title = dp.xpathQuery("@title");
if (action=='popup'){
var popup = dp.xpathQuery("@popup");
var target = dp.xpathQuery("@target");
if (target == null) target = escape(popup + runtime);
if ($runtime == 'dhtml') {
LzBrowser.loadURL("loading.jsp?src=" + popup + "&lzr=" + runtime + "&lzt=html", target, "scrollbars=yes,width=860,height=600");
} else {
LzBrowser.loadJS('window.open("loading.jsp?src=' + popup + '&lzr=' + runtime + '&lzt=html", "' + target + '", "scrollbars=yes,width=860,height=600")');
}
if (src != null){
LzBrowser.loadURL('content.jsp?src=' + src + '&tag=' + tagline +
'&title=' + title + '&lzr=' + runtime, 'content');
}
} else if (action =='popupexternal') {
var jsOpenStr = "window.open('" + src + "',"
+ "'" + target + "'," +
"'scrollbars=yes,resizable=yes,toolbar=yes,location=yes,menubar=yes,width=860,height=600')";
LzBrowser.loadJS(jsOpenStr);
} else {
if (title ==null){
title = classroot.name;
}
LzBrowser.loadURL('content.jsp?src=' + src + '&tag=' + tagline +
'&title=' + title + '&action=' + action + '&lzr=' + runtime,
(action=='source') ? 'source' : 'content');
}
}
]]>
background.setResourceNumber(classroot.open ? 4 : 1);
// Only toggle arrow if there are subnodes
if (this.datapath.getNodeCount()) {
icon.setResourceNumber(classroot.open ? 2 : 1);
}
LzBrowser.loadURL('javascript:window.open("http://www.openlaszlo.org","test","resizable=1,width=1000,height=700,left=0,top=0,screenX=0,screenY=0,menubar,location,status,scrollbars,toolbar,address"); void(0);' );
// this is how we restore the state of the app from an incoming URL,
// this is always provided by the JSP wrappers
if (typeof(global.bookmark) != 'undefined'){
var restore = global.bookmark.split('|');
if (restore.length > 0) {
this[restore[0]].openSequence(restore);
}
}