diff --git a/VERSION b/VERSION index 23bd2df5..d6d0992d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.0.9 (2012-09-27 22:15:52) stable +Version 2.0.9 (2012-09-27 22:28:55) stable diff --git a/applications/welcome/static/js/web2py_bootstrap.js b/applications/welcome/static/js/web2py_bootstrap.js index 8c762296..4fe46472 100644 --- a/applications/welcome/static/js/web2py_bootstrap.js +++ b/applications/welcome/static/js/web2py_bootstrap.js @@ -8,15 +8,20 @@ jQuery(function(){ if(jQuery(this).find('ul').length) jQuery(this).addClass('dropdown-submenu'); }); - if(jQuery(document).width()>=980) { - jQuery('ul.nav a.dropdown-toggle').parent().hover(function() { - mi = jQuery(this).addClass('open'); - mi.children('.dropdown-menu').stop(true, true).delay(200).fadeIn(400); - }, function() { - mi = jQuery(this); - mi.children('.dropdown-menu').stop(true, true).delay(200).fadeOut(function(){mi.removeClass('open')}); - }); + function hoverMenu(){ + var wid = document.documentElement.clientWidth; //faster than $(window).width() and cross browser + if (wid>=980){ + jQuery('ul.nav a.dropdown-toggle').parent().hover(function(){ + mi = jQuery(this).addClass('open'); + mi.children('.dropdown-menu').stop(true, true).delay(200).fadeIn(400); + }, function(){ + mi = jQuery(this); + mi.children('.dropdown-menu').stop(true, true).delay(200).fadeOut(function(){mi.removeClass('open')}); + }); + }; } + hoverMenu(); // first page load + jQuery(window).resize(hoverMenu); // on resize event jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');}); // make all buttons bootstrap buttons jQuery('button, form input[type="submit"], form input[type="button"]').addClass('btn');