; if (nss["id_"+id]) nss=nss["id_"+id]; return nss; } /** * @desc: set specific colors for specific tab * @param: id - id of tab for which setting will be applied * @param: color - tab color * @param: color - scolor - color in selected state ( optional) * @param: css - css class will be attached to text of tab in question * @type: public * @topic: 1 */ dhtmlXTabBar.prototype.setCustomStyle=function(id,color,scolor,css){ var nss=this._styles[this._cstyle]; if (nss["id_"+id]) nss=nss["id_"+id]; else { nss = ( nss["id_"+id] = ([]).concat(nss) ); } nss[10]=color; nss[11]=scolor; nss[13]=css } /** * @desc: hiding hover over tab * @param: tab - tab in question * @type: private * @topic: 0 */ dhtmlXTabBar.prototype._hideHover=function(tab){ if ((!this._lastHower)||(this._lastHower==tab)||(this._lastHower==this._lastActive)) return; var nss=this._getTabStyle(this._lastHower.idd); switch (this._tbst){ case "win_text": this._lastHower._lChild.style.backgroundImage='url('+this._imgPath+this._mode+nss[1]+')'; break; } this._lastHower=null; } /** * @desc: return tab by it's id * @param: tabId - id of searced tab * @type: private * @topic: 1 */ dhtmlXTabBar.prototype._getTabById=function(tabId){ return this.tabsId[tabId]; } /** * @desc: switch tab to active state * @param: tabId - id of tab * @param: mode - if to run onTabChanged handler (true by default) * @type: public * @topic: 1 */ dhtmlXTabBar.prototype.setTabActive=function(tabId,mode){ var tab=this._getTabById(tabId); if (tab) this._setTabActive(tab,(mode===false)); } /** * @desc: switch tab to active state * @param: tab - tab object * @param: mode - if to run onTabChanged handler (true by default) * @type: private * @topic: 0 */ dhtmlXTabBar.prototype._setTabActive=function(tab,mode){ if (tab==this._lastActive) return false; var nss=this._styles[this._cstyle] if (nss["id_"+tab.idd]) nss=nss["id_"+tab.idd]; if ((tab._disabled)||(tab.style.display=="none")) return false; if (((!mode) && this._onsel)&&(!this._onsel(tab.idd,this._lastActive?this._lastActive.idd:null))) return false; tab.className=tab.className.replace(/dhx_tab_element_inactive/g,"dhx_tab_element_active"); if (nss[11]) tab.style.backgroundColor=nss[11]; this._setContent(tab); this._deactivateTab(); //#4DTabs:23052006{ if (this._vMode){ switch (this._tbst){ case "win_text": tab._lChild.style.backgroundImage='url('+this._imgPath+this._mode+nss[4]+')'; tab.childNodes[0].childNodes[0].src=this._imgPath+this._mode+nss[3]; tab.childNodes[1].childNodes[0].src=this._imgPath+this._mode+nss[5]; tab.style.height=parseInt(tab.style.height)+nss[9]+"px"; tab._lChild.style.height=parseInt(tab._lChild.style.height)+nss[9]+"px"; tab.style[this._align=="right"?"marginBottom":"marginTop"]="-3px" tab.style.width=this._height+3+"px"; if (this._bMode) tab._lChild.style.width=this._height+3+"px"; this._conZone.scrollLeft=tab._scrollState||0; break; } } else //#} { switch (this._tbst){ case "win_text": tab._lChild.style.backgroundImage='url('+this._imgPath+this._mode+nss[4]+')'; tab.childNodes[0].childNodes[0].src=this._imgPath+this._mode+nss[3]; tab.childNodes[1].childNodes[0].src=this._imgPath+this._mode+nss[5]; tab.style.width=parseInt(tab.style.width)+nss[9]+"px"; tab._lChild.style.width=parseInt(tab._lChild.style.width)+nss[9]+"px"; tab.style[this._align=="left"?"marginLeft":"marginRight"]="-3px" tab.style.height=this._height+3+"px"; //#4DTabs:23052006{ if (this._bMode) tab._lChild.style.height=this._height+3+"px"; //#} this._conZone.scrollTop=tab._scrollState||0; break; } } //#multiline:23052006{ //#4DTabs:23052006{ if (this._bMode) this._setTabTop(tab); else //#} this._setTabBottom(tab); //#} //#scrollers:23052006{ this._scrollTo(tab); //#} this._lastActive=tab; return true; } //#multiline:23052006{ /** * @desc: move tab's row to the bottom * @param: tab - tab object * @type: private * @topic: 0 */ dhtmlXTabBar.prototype._setTabBottom=function(tab){ if (!this._vMode){ if (tab.parentNode!=this.rows[this.rows.length-1]) this._tabZone.appendChild(tab.parentNode); } var j=new Array(); for (var i=0; i