1
wishcraft
2.4.5 - JSON and formenu.js - Oxygen

I have been writing a paid module for content that is multilingual and using some of the features in XOOPS to make a great module, I have been using a lot of JSON lately as it is reliable and good in performance but I had to patch the file formenu.js with oxygen that would fire an intermittent fault with javascript and stop the scripts from running.

Just a small bug, this is also contributed to the dialogue boxes not loading or the pop downs from displaying in the cpanel control home.

In /modules/system/class/gui/oxygen/js you will find a file called formenu.js it will currently look like:

le="color: #000000"><?php startList = function() { if (document.all&&document.getElementById) { navRoot = document.getElementById("nav"); for (i=0; i<navRoot.childNodes.length; i++) { node = navRoot.childNodes[i]; if (node.nodeName=="li") { node.onmouseover=function() { this.className+=" over"; } node.onmouseout=function() { this.className=this.className.replace(" over", ""); } } } } } xoopsOnloadEvent(startList);;


On all getElementById you need to run and if test on the object to see if it is populate in this code it looks like :: if (navRoot)

Your formenu.js patched should look like - this is now bug free and doesn't interfere with JSON and JQuery::

le="color: #000000"><?php startList = function() { if (document.all&&document.getElementById) { navRoot = document.getElementById("nav"); if (navRoot) for (i=0; i<navRoot.childNodes.length; i++) { node = navRoot.childNodes[i]; if (node.nodeName=="li") { node.onmouseover=function() { this.className+=" over"; } node.onmouseout=function() { this.className=this.className.replace(" over", ""); } } } } } xoopsOnloadEvent(startList);

2
Mazarin
Re: 2.4.5 - JSON and formenu.js - Oxygen
  • 2010/2/22 15:52

  • Mazarin

  • Just can't stay away

  • Posts: 533

  • Since: 2008/12/10


Thanks wishcraft! That bug has been annoying me for quite some time.