diff options
Diffstat (limited to 'jsquery/src/main/java/gwtquery/jsplugins/menu/client/jsmenu.diff')
-rw-r--r-- | jsquery/src/main/java/gwtquery/jsplugins/menu/client/jsmenu.diff | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/jsquery/src/main/java/gwtquery/jsplugins/menu/client/jsmenu.diff b/jsquery/src/main/java/gwtquery/jsplugins/menu/client/jsmenu.diff new file mode 100644 index 00000000..a9ac0d20 --- /dev/null +++ b/jsquery/src/main/java/gwtquery/jsplugins/menu/client/jsmenu.diff @@ -0,0 +1,69 @@ +--- query.menu.js 2012-03-17 21:13:29.000000000 +0100 ++++ JsMenu.java 2012-03-17 21:04:09.000000000 +0100 +@@ -114,7 +113,7 @@ + this.openTimer = null; + + this.init(); +- if ( items && items.constructor == Array ) ++ if ( items && $.isArray(items) ) + this.addItems(items); + } + }); +@@ -132,11 +129,15 @@ + while ( t.parentNode && t.parentNode != $rootDiv[0] ) + t = t.parentNode; + +- //is the found node one of the visible menu elements? +- if ( !$(visibleMenus).filter(function(){ return this.$eDIV[0] == t }).length ) +- { +- $.Menu.closeAll(); +- } ++ // FIXME: why do we need a timeout ++ setTimeout($.Menu.closeAll, 100); ++ ++ // FIXME: JsQuery each doesn't work with arrays ++ // if ( !$(visibleMenus).filter(function(){ return this.$eDIV[0] == t }).length ) ++ // { ++ // $.Menu.closeAll(); ++ // } ++ return true; + }, + checkKey : function(e) + { +@@ -395,7 +394,7 @@ + this.$eDIV.css({display:'none', visibility: ''}).show(); + + //IEs default width: auto is bad! ie6 and ie7 have are producing different errors.. (7 = 5px shadowbox + 2px border) +- if ( $.browser.msie ) ++ if ( 0) //$.browser.msie ) + this.$eUL.css('width', parseInt($.browser.version) == 6 ? this.$eDIV.width() - 7 : this.$eUL.width()); + + if ( this.settings.onOpen ) +@@ -437,7 +438,7 @@ + } + + //y-pos +- if ( $.fn.scrollTop ) ++ if ($().scrollTop ) + { + wst = $(window).scrollTop(); + if ( wh < height ) //menu is bigger than the window +@@ -476,7 +477,7 @@ + } + } + //x-pos +- if ( $.fn.scrollLeft ) ++ if ($().scrollLeft ) + { + wsl = $(window).scrollLeft(); + if ( ww + wsl < posX + width ) +@@ -898,7 +897,7 @@ + { + return this.each(function() + { +- if ( items && items.constructor == Array ) ++ if ( items && $.isArray(items) ) + new $.Menu(this, items, options); + else + { + |