Index: typo3/sysext/cms/layout/db_layout.php =================================================================== --- typo3/sysext/cms/layout/db_layout.php (revision 3069) +++ typo3/sysext/cms/layout/db_layout.php (working copy) @@ -75,6 +75,7 @@ require_once(PATH_t3lib.'class.t3lib_pagetree.php'); require_once(PATH_t3lib.'class.t3lib_page.php'); require_once(PATH_t3lib.'class.t3lib_recordlist.php'); +require_once(PATH_t3lib.'class.t3lib_parsehtml.php'); require_once(PATH_typo3.'class.db_list.inc'); require_once('class.tx_cms_layout.php'); require_once(PATH_t3lib.'class.t3lib_positionmap.php'); @@ -403,8 +404,9 @@ $this->EDIT_CONTENT = ($this->CALC_PERMS&16) ? 1 : 0; // Start document template object: - $this->doc = t3lib_div::makeInstance('mediumDoc'); + $this->doc = t3lib_div::makeInstance('template'); $this->doc->backPath = $BACK_PATH; + $this->doc->setModuleTemplate('templates/db_layout.html'); $this->doc->docType='xhtml_trans'; // JavaScript: @@ -430,22 +432,88 @@ return false; } '); + $this->doc->JScode.= $this->doc->wrapScriptTags(' + var DTM_array = new Array(); + var DTM_origClass = new String(); + // if tabs are used in a popup window the array might not exists + if(!top.DTM_currentTabs) { + top.DTM_currentTabs = new Array(); + } + + function DTM_activate(idBase,index,doToogle) { // + // Hiding all: + if (DTM_array[idBase]) { + for(cnt = 0; cnt < DTM_array[idBase].length ; cnt++) { + if (DTM_array[idBase][cnt] != idBase+"-"+index) { + document.getElementById(DTM_array[idBase][cnt]+"-DIV").style.display = "none"; + document.getElementById(DTM_array[idBase][cnt]+"-MENU").attributes.getNamedItem("class").nodeValue = "tab"; + } + } + } + + // Showing one: + if (document.getElementById(idBase+"-"+index+"-DIV")) { + if (doToogle && document.getElementById(idBase+"-"+index+"-DIV").style.display == "block") { + document.getElementById(idBase+"-"+index+"-DIV").style.display = "none"; + if(DTM_origClass=="") { + document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab"; + } else { + DTM_origClass = "tab"; + } + top.DTM_currentTabs[idBase] = -1; + } else { + document.getElementById(idBase+"-"+index+"-DIV").style.display = "block"; + if(DTM_origClass=="") { + document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact"; + } else { + DTM_origClass = "tabact"; + } + top.DTM_currentTabs[idBase] = index; + } + } + } + function DTM_toggle(idBase,index,isInit) { // + // Showing one: + if (document.getElementById(idBase+"-"+index+"-DIV")) { + if (document.getElementById(idBase+"-"+index+"-DIV").style.display == "block") { + document.getElementById(idBase+"-"+index+"-DIV").style.display = "none"; + if(isInit) { + document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab"; + } else { + DTM_origClass = "tab"; + } + top.DTM_currentTabs[idBase+"-"+index] = 0; + } else { + document.getElementById(idBase+"-"+index+"-DIV").style.display = "block"; + if(isInit) { + document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact"; + } else { + DTM_origClass = "tabact"; + } + top.DTM_currentTabs[idBase+"-"+index] = 1; + } + } + } + + function DTM_mouseOver(obj) { // + DTM_origClass = obj.attributes.getNamedItem(\'class\').nodeValue; + obj.attributes.getNamedItem(\'class\').nodeValue += "_over"; + } + + function DTM_mouseOut(obj) { // + obj.attributes.getNamedItem(\'class\').nodeValue = DTM_origClass; + DTM_origClass = ""; + } + '); + // Setting doc-header $this->doc->form='