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:

startList = function() {
            if (
document.all&&document.getElementById) {
                
navRoot document.getElementById("nav");
                for (
i=0i<navRoot.childNodes.lengthi++) {
                    
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::

startList = function() {
            if (
document.all&&document.getElementById) {
                
navRoot document.getElementById("nav");
                if (
navRoot)
                for (
i=0i<navRoot.childNodes.lengthi++) {
                    
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.

Login

Who's Online

232 user(s) are online (165 user(s) are browsing Support Forums)


Members: 0


Guests: 232


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits