Ticket #9956: submenu-position-fix.diff
| File submenu-position-fix.diff, 1.1 KB (added by , 17 years ago) |
|---|
-
wp-admin/js/common.dev.js
26 26 27 27 if ( $('body').hasClass('folded') ) { 28 28 this.fold(); 29 } else {30 this.restoreMenuState();31 29 } 30 this.restoreMenuState(); 32 31 }, 33 32 34 33 restoreMenuState : function() { … … 61 60 $('body').addClass('folded'); 62 61 $('#adminmenu li.wp-has-submenu').hoverIntent({ 63 62 over: function(e){ 64 var m = $(this).find('.wp-submenu'), t = e.clientY, H = $(window).height(), h = m.height(), o; 65 66 if ( (t+h+10) > H ) { 67 o = (t+h+10) - H; 63 var m = $(this).find('.wp-submenu'); 64 var b = m.parent().offset().top + m.height() + 1; // Bottom offset of the menu 65 var h = $('#wpwrap').height(); // Height of the entire page 66 var o = 60 + b - h; 67 var f = $(window).height() + $('body').scrollTop() - 15; // The fold 68 if (f < (b - o)) { 69 o = b - f; 70 } 71 if (o > 1) { 68 72 m.css({'marginTop':'-'+o+'px'}); 69 73 } else if ( m.css('marginTop') ) { 70 74 m.css({'marginTop':''});