[TYPO3-dev] CSS-problems with the new page/file tree

Tapio Markula tapio.markula at atwebteam.com
Thu Mar 29 09:13:03 CEST 2007


Martin Kutschker

> But if it's any help for you: the JS functions refresh_nav() and 
> hilight_row() will be availabe again in 4.1.1.
> 
> Masi

In fact this helped me lot!
I disabled usage of function 'Tree.highlightActiveItem' in XCLASS for 
navigation frames.


// Adding javascript for drag & drop activation and highlighting
//'.($this->doHighlight ? 
'Tree.highlightActiveItem("",top.fsMod.navFrameHighlightedID["web"]);' : 
'').'
	$this->content .=$this->doc->wrapScriptTags('
			
			'.(!$this->doc->isCMlayers() ? 'Tree.activateDragDrop = false;' : 
'Tree.registerDragDropHandlers();')
		);


Now 4.1 uses the function 'hilight_row' with
class "navFrameHL" highlighting the active item. That should then be 
also compatible with 4.1.1?

Result is
<li id="pages195_0" class="navFrameHL">

That result would help also much skin developers, but they still
must take account nested structure and
put CSS like this, which should be compatible with 4.0.x, 4.1.0 and 4.1.1

.navFrameHL {	background-color: #dedede }
UL.tree UL LI.active,
UL.tree UL LI.navFrameHL { background-color: #E0E0E0 }
UL.tree UL LI.active UL, UL.tree UL LI.navFrameHL UL { background-color: 
#F3F4F8; }

So small changes in class and function names cause much headashe for
skin- andi interface related plugins.

Just one problem remained - I can't get anything as default highligted.

This works in 4.0.x:

// Highlighting rows in the page tree:
	function hilight_row(frameSetModule,highLightID) {
		var compHIL=highLightID;		
		var startHIL="pages'.$startID.'_0";
			// Remove old: if undefined nothing to remove!
		if(compHIL!=undefined) {
			theObj = 
document.getElementById(top.fsMod.navFrameHighlightedID[frameSetModule]);
			if (theObj)	{
				theObj.className = "";
			}
		}

			// Set new:
		if(compHIL==undefined) { //  && startHIL!="pages0_0"
			compHIL=startHIL;
			top.fsMod.navFrameHighlightedID["web"]=startHIL;
		}
		saveUID(compHIL);
		top.fsMod.navFrameHighlightedID[frameSetModule] = compHIL;
		theObj = document.getElementById(compHIL);
		if (theObj)	{
			theObj.className = "navFrameHL";
		}
	}

var startHIL="pages'.$startID.'_0"; is used to highlight default item,
if no item in the page tree has not been clicked.
This would be really nice feature.




More information about the TYPO3-dev mailing list