[TYPO3-core] RFC: de-highlighting page in page tree in non-life workspaces

Ernesto Baschny [cron IT] ernst at cron-it.de
Sat Feb 24 20:42:12 CET 2007


Hi,

commited to trunk with the modification suggested by Oliver (usig
prototype's $w function).

Cheers,
Ernesto

Ernesto Baschny [cron IT] wrote: on 23.02.2007 23:39:
> This is a SVN patch request.
> 
> Problem:
> 
> The fix of http://bugs.typo3.org/view.php?id=2677 that was added on
> 16.2. added some code to set multiple CSS classes to the highlighted
> page in the page tree in non-life workspaces. The highlighting works,
> but the previous page is not de-highlighted when you select a new one.
> You end up with every page you clicked on highlighted. I wonder if
> anyone that has +1 that change has tested it???
> 
> Solution:
> 
> The JS-code which removes the classes from the previous page is wrong,
> as removeClassName seem to expect a single class and it is passed the
> space separated list of classes. So we just need to iterate through the
> list of classes and remove each one of it. Attached patch should do that.
> 
> Branches: Trunk only
> 
> 
> Cheers,
> Ernesto
> 
> 
> ------------------------------------------------------------------------
> 
> Index: typo3/tree.js
> ===================================================================
> --- typo3/tree.js	(revision 2149)
> +++ typo3/tree.js	(working copy)
> @@ -110,7 +110,11 @@
>  
>  		// Remove all items that are already highlighted
>  		obj = $(top.fsMod.navFrameHighlightedID[frameSetModule]);
> -		if (obj) Element.removeClassName(obj, this.highlightClass);
> +		if (obj) {
> +			var classes = this.highlightClass.split(' ');
> +			for (var i = 0; i < classes.length; i++)
> +				Element.removeClassName(obj, classes[i]);
> +		}
>  
>  		// Set the new item
>  		top.fsMod.navFrameHighlightedID[frameSetModule] = highlightID;


More information about the TYPO3-team-core mailing list