/* DynAPI Distribution ExplorerBlockStyle The DynAPI Distribution is distributed under the terms of the GNU LGPL license. Requires: StyleManager, Explorer, ExplorerStyle */ function ExplorerBlockStyle(){ var style = ExplorerStyle(); // inherits or extends ExplorerStyle object style.styleName='ExplorerBlockStyle'; style.loadImages = function(){ // load default images if(!this.imageFile) this.imageFile = Styles.getImage('tvw_file.gif',16,16); if(!this.imageFoldOpen) this.imageFoldOpen = Styles.getImage('tvw_foldopen.gif',16,16); if(!this.imageFoldClose) this.imageFoldClose = Styles.getImage('tvw_foldclose.gif',16,16); if(!this.imageWhite) this.imageWhite = Styles.getImage('tvw_white.gif',15,18); if(!this.imageExpand) this.imageExpand = Styles.getImage('tvw_expand.gif',15,18); if(!this.imageCollapse) this.imageCollapse= Styles.getImage('tvw_collapse.gif',15,18); }; style._buildHTML = function(leave,level,last,lD) { var niv = level||0; var listaD = lD || new Array(); var tree = leave.tree; var iFL = tree.getStyleAttribute('imageFile'); var iFOp = tree.getStyleAttribute('imageFoldOpen'); var iFCl = tree.getStyleAttribute('imageFoldClose'); var iWht = tree.getStyleAttribute('imageWhite'); var iEx = tree.getStyleAttribute('imageExpand'); var iCx = tree.getStyleAttribute('imageCollapse'); var csLV = tree.getStyleAttribute('cssLeave')||''; var csRLV = tree.getStyleAttribute('cssRootLeave')||''; var csCLV = tree.getStyleAttribute('cssCurrentLeave')||''; var ret = ''; ret+='
'; if((niv-1)>=1)ret += ''; if(niv == 0) ret += ''; else if (leave.children.length==0) ret += ''; else { if(leave.open) ret += ''; else ret += ''; } if(niv!=0) { var icon = leave.icon||iFCl; var icon_sel = leave.icon_sel||iFOp; if (leave.open||leave.id == leave.tree.currentPos) ret += ''; else ret += ''; } //dq 17.1.2007: vorher: //ret += ''; //jetzt: ret += ''; if(niv!=0) ret += ' '; ret += leave.text+'
' ret+=''; var q=0; listaD[niv-1] = last; if((leave.open || niv==0) && leave.children.length!=0) { for(var i in leave.children) { q++; ret += this._buildHTML(leave.children[i],niv+1,q==leave.count,listaD); } } return ret; }; return style; }; // Creates the style once it has been loaded Styles.addStyle('ExplorerBlock',ExplorerBlockStyle);