click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r962433 - in /click/trunk/click: examples/webapp/assets/js/imports.js extras/src/META-INF/resources/click/menu-fix-ie6.js
Date Fri, 09 Jul 2010 07:37:37 GMT
Author: sabob
Date: Fri Jul  9 07:37:37 2010
New Revision: 962433

URL: http://svn.apache.org/viewvc?rev=962433&view=rev
Log:
added extra checks to only fix menu for IE6

Modified:
    click/trunk/click/examples/webapp/assets/js/imports.js
    click/trunk/click/extras/src/META-INF/resources/click/menu-fix-ie6.js

Modified: click/trunk/click/examples/webapp/assets/js/imports.js
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/webapp/assets/js/imports.js?rev=962433&r1=962432&r2=962433&view=diff
==============================================================================
--- click/trunk/click/examples/webapp/assets/js/imports.js (original)
+++ click/trunk/click/examples/webapp/assets/js/imports.js Fri Jul  9 07:37:37 2010
@@ -710,7 +710,7 @@ if ( typeof Click.menu == 'undefined' )
 
 // Code adapted from jquery.bgiframe. Add an IFrame to the menu ensuring Select
 // elements does not burn through when menu is open
-Click.menu.fixHiddenMenu = function(menuId){
+Click.menu.fixHiddenMenu = (document.all && /msie 6\.0/i.test(navigator.userAgent)
? function(menuId) {
     var menu = document.getElementById(menuId);
 
     // If menu is not available, exit early
@@ -744,10 +744,10 @@ Click.menu.fixHiddenMenu = function(menu
         var el = document.createElement(html);
         ul.insertBefore(el);
     }
-}
+} : function() {});
 
 // Add 'over' class when hovering over menu items
-Click.menu.fixHover = function(menuId) {
+Click.menu.fixHover = (document.all && /msie 6\.0/i.test(navigator.userAgent) ? function(menuId)
{
     var elements = document.getElementById(menuId);
     if (elements != null) {
         var list = elements.getElementsByTagName("LI");
@@ -763,7 +763,7 @@ Click.menu.fixHover = function(menuId) {
             }
         }
     }
-}
+} : function() {});
 
 Click.addLoadEvent(function(){
  if(typeof Click != 'undefined' && typeof Click.menu != 'undefined') {

Modified: click/trunk/click/extras/src/META-INF/resources/click/menu-fix-ie6.js
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/META-INF/resources/click/menu-fix-ie6.js?rev=962433&r1=962432&r2=962433&view=diff
==============================================================================
--- click/trunk/click/extras/src/META-INF/resources/click/menu-fix-ie6.js (original)
+++ click/trunk/click/extras/src/META-INF/resources/click/menu-fix-ie6.js Fri Jul  9 07:37:37
2010
@@ -12,7 +12,7 @@ if ( typeof Click.menu == 'undefined' )
 
 // Code adapted from jquery.bgiframe. Add an IFrame to the menu ensuring Select
 // elements does not burn through when menu is open
-Click.menu.fixHiddenMenu = function(menuId){
+Click.menu.fixHiddenMenu = (document.all && /msie 6\.0/i.test(navigator.userAgent)
? function(menuId) {
     var menu = document.getElementById(menuId);
 
     // If menu is not available, exit early
@@ -46,10 +46,10 @@ Click.menu.fixHiddenMenu = function(menu
         var el = document.createElement(html);
         ul.insertBefore(el);
     }
-}
+} : function() {});
 
 // Add 'over' class when hovering over menu items
-Click.menu.fixHover = function(menuId) {
+Click.menu.fixHover = (document.all && /msie 6\.0/i.test(navigator.userAgent) ? function(menuId)
{
     var elements = document.getElementById(menuId);
     if (elements != null) {
         var list = elements.getElementsByTagName("LI");
@@ -65,4 +65,4 @@ Click.menu.fixHover = function(menuId) {
             }
         }
     }
-}
+} : function() {});
\ No newline at end of file



Mime
View raw message