Index: /extensions/rv_menutree/branches/2.0-radu/changelog.txt
===================================================================
--- /extensions/rv_menutree/branches/2.0-radu/changelog.txt	(revision 3574)
+++ /extensions/rv_menutree/branches/2.0-radu/changelog.txt	(revision 3574)
@@ -0,0 +1,3 @@
+2.0.c
+	- optimizations by calling make_index_url less frequently
+	- compatible with IE8
Index: /extensions/rv_menutree/branches/2.0-radu/main.inc.php
===================================================================
--- /extensions/rv_menutree/branches/2.0-radu/main.inc.php	(revision 3573)
+++ /extensions/rv_menutree/branches/2.0-radu/main.inc.php	(revision 3574)
@@ -2,5 +2,5 @@
 Plugin Name: RV Menu Tree
 Version: 2.0.c
-Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=238
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=238
 Description: Replaces the categories in the menu bar with a nicer one (javascript).
 Author: rvelices
Index: /extensions/rv_menutree/branches/2.0-radu/rvtree-min.js
===================================================================
--- /extensions/rv_menutree/branches/2.0-radu/rvtree-min.js	(revision 3573)
+++ /extensions/rv_menutree/branches/2.0-radu/rvtree-min.js	(revision 3574)
@@ -1,1 +1,1 @@
-var XElement={hasClassName:function(element,className){if(!element)return false;var elementClassName=element.className;if(elementClassName.length==0)return false;if(elementClassName==className||elementClassName.match(new RegExp("(^|\\s)"+className+"(\\s|$)")))return true;return false},addClassName:function(element,className){if(!element)return;var classNames=element.className.split(/\s+/);for(var i=0;i<classNames.length;i++)if(className==classNames[i])return;classNames.splice(0,0,className);element.className=classNames.join(' ');return element},toggleClassName:function(element,className){if(!element)return;var classNames=element.className.split(/\s+/);for(var i=0;i<classNames.length;i++)if(classNames[i]==className)break;if(i==classNames.length)classNames.splice(0,0,className);else classNames.splice(i,1);element.className=classNames.join(' ');return element}};var RVTree={options:{nodeClosedClass:"liClosed",nodeOpenClass:"liOpen",nodeBulletClass:"liBullet",nodeLinkClass:"bullet"},convertTree:function(root){if(!document.createElement)return;RVTree._processList(root,true)},_processList:function(ul,isRoot){if(!ul.childNodes||ul.childNodes.length==0)return;for(var i=0;i<ul.childNodes.length;i++){var item=ul.childNodes[i];if(item.nodeName!="LI")continue;var subLists=false;for(var sitemi=0;sitemi<item.childNodes.length;sitemi++){var sitem=item.childNodes[sitemi];if(sitem.nodeName=="UL"){subLists=true;RVTree._processList(sitem,false)}}var s=document.createElement("SPAN");var t='\u00A0';s.className=RVTree.options.nodeLinkClass;if(subLists){if(!XElement.hasClassName(item,RVTree.options.nodeOpenClass))XElement.addClassName(item,RVTree.options.nodeClosedClass);if(item.firstChild.nodeName=="#text"){t=t+item.firstChild.nodeValue;item.removeChild(item.firstChild)}s.onclick=function(){XElement.toggleClassName(this.parentNode,RVTree.options.nodeOpenClass);XElement.toggleClassName(this.parentNode,RVTree.options.nodeClosedClass);return false}}else{if(XElement.hasClassName(item,RVTree.options.nodeClosedClass)){s.onclick=function(){var nodes=this.parentNode.getElementsByTagName("A");if(nodes.length)document.location=nodes[0].href}}else XElement.addClassName(item,RVTree.options.nodeBulletClass)}item.style.listStyleType='none';if(isRoot&&(window.attachEvent&&!window.opera))item.style.marginLeft="-16px";if(s){s.appendChild(document.createTextNode(t));item.insertBefore(s,item.firstChild)}}ul.style.marginLeft=0;ul.style.paddingLeft=isRoot?0:"8px"}}
+var XElement={hasClassName:function(element,className){if(!element)return false;var elementClassName=element.className;if(elementClassName.length==0)return false;if(elementClassName==className||elementClassName.match(new RegExp("(^|\\s)"+className+"(\\s|$)")))return true;return false},addClassName:function(element,className){if(!element)return;var classNames=element.className.split(/\s+/);for(var i=0;i<classNames.length;i++)if(className==classNames[i])return;classNames.splice(0,0,className);element.className=classNames.join(' ');return element},toggleClassName:function(element,className){if(!element)return;var classNames=element.className.split(/\s+/);for(var i=0;i<classNames.length;i++)if(classNames[i]==className)break;if(i==classNames.length)classNames.splice(0,0,className);else classNames.splice(i,1);element.className=classNames.join(' ');return element}};var RVTree={options:{nodeClosedClass:"liClosed",nodeOpenClass:"liOpen",nodeBulletClass:"liBullet",nodeLinkClass:"bullet"},convertTree:function(root){if(!document.createElement)return;if(window.attachEvent&&!window.opera){if(new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent)!=null)RVTree.options.IEVersion=parseFloat(RegExp.$1)}RVTree._processList(root,true)},_processList:function(ul,isRoot){if(!ul.childNodes||ul.childNodes.length==0)return;for(var i=0;i<ul.childNodes.length;i++){var item=ul.childNodes[i];if(item.nodeName!="LI")continue;var subLists=false;for(var sitemi=0;sitemi<item.childNodes.length;sitemi++){var sitem=item.childNodes[sitemi];if(sitem.nodeName=="UL"){subLists=true;RVTree._processList(sitem,false)}}var s=document.createElement("SPAN");var t='\u00A0';s.className=RVTree.options.nodeLinkClass;if(subLists){if(!XElement.hasClassName(item,RVTree.options.nodeOpenClass))XElement.addClassName(item,RVTree.options.nodeClosedClass);if(item.firstChild.nodeName=="#text"){t=t+item.firstChild.nodeValue;item.removeChild(item.firstChild)}s.onclick=function(){XElement.toggleClassName(this.parentNode,RVTree.options.nodeOpenClass);XElement.toggleClassName(this.parentNode,RVTree.options.nodeClosedClass);return false}}else{if(XElement.hasClassName(item,RVTree.options.nodeClosedClass)){s.onclick=function(){var nodes=this.parentNode.getElementsByTagName("A");if(nodes.length)document.location=nodes[0].href}}else XElement.addClassName(item,RVTree.options.nodeBulletClass)}item.style.listStyleType='none';if(isRoot&&RVTree.options.IEVersion&&RVTree.options.IEVersion<8)item.style.marginLeft="-16px";if(s){s.appendChild(document.createTextNode(t));item.insertBefore(s,item.firstChild)}}ul.style.marginLeft=0;ul.style.paddingLeft=isRoot?0:"8px"}}
Index: /extensions/rv_menutree/branches/2.0-radu/rvtree.js
===================================================================
--- /extensions/rv_menutree/branches/2.0-radu/rvtree.js	(revision 3573)
+++ /extensions/rv_menutree/branches/2.0-radu/rvtree.js	(revision 3574)
@@ -2,36 +2,36 @@
 Based on Matt Kruse <matt@mattkruse.com> http://www.mattkruse.com/ */
 var XElement = {
-  hasClassName: function(element, className) {
-    if (!element) return false;
-    var elementClassName = element.className;
-    if (elementClassName.length == 0) return false;
-    if (elementClassName == className ||
-        elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
-      return true;
-    return false;
-  },
+	hasClassName: function(element, className) {
+		if (!element) return false;
+		var elementClassName = element.className;
+		if (elementClassName.length == 0) return false;
+		if (elementClassName == className ||
+				elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
+			return true;
+		return false;
+	},
 
-  addClassName: function(element, className) {
-    if (!element) return;
-    var classNames = element.className.split(/\s+/);
-    for (var i=0; i<classNames.length; i++)
-      if (className==classNames[i]) return;
-    classNames.splice(0,0,className);
-    element.className = classNames.join(' ');
-    return element;
-  },
+	addClassName: function(element, className) {
+		if (!element) return;
+		var classNames = element.className.split(/\s+/);
+		for (var i=0; i<classNames.length; i++)
+			if (className==classNames[i]) return;
+		classNames.splice(0,0,className);
+		element.className = classNames.join(' ');
+		return element;
+	},
 
-  toggleClassName: function(element, className) {
-    if (!element) return;
-    var classNames = element.className.split(/\s+/);
-    for (var i=0; i<classNames.length; i++)
-      if (classNames[i]==className) break;
-    if (i==classNames.length)
-      classNames.splice(0,0,className);
-    else
-      classNames.splice(i, 1);
-    element.className = classNames.join(' ');
-    return element;
-  }
+	toggleClassName: function(element, className) {
+		if (!element) return;
+		var classNames = element.className.split(/\s+/);
+		for (var i=0; i<classNames.length; i++)
+			if (classNames[i]==className) break;
+		if (i==classNames.length)
+			classNames.splice(0,0,className);
+		else
+			classNames.splice(i, 1);
+		element.className = classNames.join(' ');
+		return element;
+	}
 };
 
@@ -49,4 +49,9 @@
 	{
 		if (!document.createElement) return; // Without createElement, we can't do anything
+		if (window.attachEvent && !window.opera)
+		{
+			if ( new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})").exec( navigator.userAgent ) != null )
+				RVTree.options.IEVersion = parseFloat( RegExp.$1 );
+		}
 		RVTree._processList(root, true);
 	},
@@ -58,18 +63,18 @@
 		for (var i=0; i<ul.childNodes.length; i++)
 		{ //Iterate LIs
-      var item = ul.childNodes[i];
-      if (item.nodeName != "LI")
-        continue;
+			var item = ul.childNodes[i];
+			if (item.nodeName != "LI")
+				continue;
 
-      // Iterate things in this LI
-		  var subLists = false;
-		  for (var sitemi=0;sitemi<item.childNodes.length;sitemi++)
-      {
-        var sitem = item.childNodes[sitemi];
-        if (sitem.nodeName=="UL")
-        {
-          subLists = true;
-          RVTree._processList(sitem, false);
-        }
+			// Iterate things in this LI
+			var subLists = false;
+			for (var sitemi=0;sitemi<item.childNodes.length;sitemi++)
+			{
+				var sitem = item.childNodes[sitemi];
+				if (sitem.nodeName=="UL")
+				{
+					subLists = true;
+					RVTree._processList(sitem, false);
+				}
 			}
 
@@ -78,5 +83,5 @@
 			s.className = RVTree.options.nodeLinkClass;
 			if (subLists)
-      {
+			{
 				// This LI has UL's in it, so it's a +/- node
 				if ( !XElement.hasClassName(item, RVTree.options.nodeOpenClass) )
@@ -85,33 +90,33 @@
 				// If it's just text, make the text work as the link also
 				if (item.firstChild.nodeName=="#text")
-        {
+				{
 					t = t+item.firstChild.nodeValue;
 					item.removeChild(item.firstChild);
 				}
 				s.onclick = function ()
-        {
-          XElement.toggleClassName( this.parentNode, RVTree.options.nodeOpenClass );
-          XElement.toggleClassName( this.parentNode, RVTree.options.nodeClosedClass );
+				{
+					XElement.toggleClassName( this.parentNode, RVTree.options.nodeOpenClass );
+					XElement.toggleClassName( this.parentNode, RVTree.options.nodeClosedClass );
 					return false;
 				}
 			}
 			else
-      {// No sublists
-        if ( XElement.hasClassName(item, RVTree.options.nodeClosedClass) )
-        {
-          s.onclick = function()
-          {
-            var nodes = this.parentNode.getElementsByTagName("A");
-            if (nodes.length)
-              document.location = nodes[0].href;
-          }
-        }
-        else
-          XElement.addClassName(item, RVTree.options.nodeBulletClass);
+			{// No sublists
+				if ( XElement.hasClassName(item, RVTree.options.nodeClosedClass) )
+				{
+					s.onclick = function()
+					{
+						var nodes = this.parentNode.getElementsByTagName("A");
+						if (nodes.length)
+							document.location = nodes[0].href;
+					}
+				}
+				else
+					XElement.addClassName(item, RVTree.options.nodeBulletClass);
 			}
 
 			item.style.listStyleType='none';
-			if (isRoot && /*IE*/ (window.attachEvent && !window.opera) )
-        item.style.marginLeft="-16px"; // thats IE6 what about IE7 ?
+			if (isRoot && RVTree.options.IEVersion && RVTree.options.IEVersion < 8)
+				item.style.marginLeft="-16px"; // thats IE6,IE7 ; IE8 seems more compliant
 			if (s)
 			{
