Greetings fellow coders...<br><br>While using vtiger, I've found the second and third row of menus to be a wonderful idea but difficult to use because when you mouseover the main menu, it drops down to cover the other menu options. So I've been playing with the vtiger menu subsystem to correct this annoyance.<br>
<br>I figured I would post the "patch" here first and get some feedback from the development community before I post it to the forums. The patch affects the <b>include/js/general.js</b> file only and requires the addition of two global variables and contitional use of the <b>setTimeout</b> function. The logic behind the change keeps the main menu from being desplayed on mouseover unless the user pauses on a menu item for more than half a second. When that happens the menus funciton normally until the page is refreshed.<br>
<br>Add the global variables around line 13<br><br>var gMenu=0;<br>var gMenuDelay;<br><br>In function <b>fnDropDown</b> change the last line <b>tagName.style.display = 'block';</b> (near line 2070) in the function to look like the following:<br>
<br> if(gMenu)<br> tagName.style.display = 'block';<br> else<br> gMenuDelay=setTimeout(function(){tagName.style.display = 'block';gMenu=1;},500);<br><br>In function <b>fnHideDrop</b> add the following code to the end of the function:<br>
<br> clearTimeout(gMenuDelay);<br><br>That's it. Try it out and post your feedback.<br><br clear="all">-- Stephen Mack<br>Gerente de Ventas y Marketing<br>Escuela Fronteras<br><a href="http://www.eFronteras.com">www.eFronteras.com</a><br>
skype: eFronteras.Stephen<br>