Ticket #20614: 20614.7-tabs.diff

File 20614.7-tabs.diff, 3.6 KB (added by DrewAPicture, 6 months ago)

spaces to tabs

  • wp-includes/js/admin-bar.js

     
    3030                                        el.addClass('hover'); 
    3131                                } 
    3232                        }); 
    33                 } else { 
    34                         adminbar.find('li.menupop').hoverIntent({ 
     33                } 
     34 
     35                adminbar.find('li.menupop').hoverIntent({ 
    3536                                over: function(e){ 
    36                                         $(this).addClass('hover'); 
     37                                                $(this).addClass('hover'); 
    3738                                }, 
    3839                                out: function(e){ 
    39                                         $(this).removeClass('hover'); 
     40                                                $(this).removeClass('hover'); 
    4041                                }, 
    4142                                timeout: 180, 
    4243                                sensitivity: 7, 
    4344                                interval: 100 
    44                         }); 
    45                 } 
     45                }); 
    4646 
    4747                $('#wp-admin-bar-get-shortlink').click(function(e){ 
    4848                        e.preventDefault(); 
  • wp-admin/js/common.js

     
    211211                                el.addClass('opensub'); 
    212212                        } 
    213213                }); 
    214         } else { 
    215                 menu.find('li.wp-has-submenu').hoverIntent({ 
    216                         over: function(e){ 
    217                                 var b, h, o, f, m = $(this).find('.wp-submenu'), menutop, wintop, maxtop, top = parseInt( m.css('top'), 10 ); 
     214        } 
    218215 
    219                                 if ( isNaN(top) || top > -5 ) // meaning the submenu is visible 
    220                                         return; 
     216        menu.find('li.wp-has-submenu').hoverIntent({ 
     217                over: function(e){ 
     218                        var b, h, o, f, m = $(this).find('.wp-submenu'), menutop, wintop, maxtop, top = parseInt( m.css('top'), 10 ); 
    221219 
    222                                 menutop = $(this).offset().top; 
    223                                 wintop = $(window).scrollTop(); 
    224                                 maxtop = menutop - wintop - 30; // max = make the top of the sub almost touch admin bar 
     220                        if ( isNaN(top) || top > -5 ) // meaning the submenu is visible 
     221                                return; 
    225222 
    226                                 b = menutop + m.height() + 1; // Bottom offset of the menu 
    227                                 h = $('#wpwrap').height(); // Height of the entire page 
    228                                 o = 60 + b - h; 
    229                                 f = $(window).height() + wintop - 15; // The fold 
     223                        menutop = $(this).offset().top; 
     224                        wintop = $(window).scrollTop(); 
     225                        maxtop = menutop - wintop - 30; // max = make the top of the sub almost touch admin bar 
    230226 
    231                                 if ( f < (b - o) ) 
    232                                         o = b - f; 
     227                        b = menutop + m.height() + 1; // Bottom offset of the menu 
     228                        h = $('#wpwrap').height(); // Height of the entire page 
     229                        o = 60 + b - h; 
     230                        f = $(window).height() + wintop - 15; // The fold 
    233231 
    234                                 if ( o > maxtop ) 
    235                                         o = maxtop; 
     232                        if ( f < (b - o) ) 
     233                                o = b - f; 
    236234 
    237                                 if ( o > 1 ) 
    238                                         m.css('margin-top', '-'+o+'px'); 
    239                                 else 
    240                                         m.css('margin-top', ''); 
     235                        if ( o > maxtop ) 
     236                                o = maxtop; 
    241237 
    242                                 menu.find('li.menu-top').removeClass('opensub'); 
    243                                 $(this).addClass('opensub'); 
    244                         }, 
    245                         out: function(){ 
    246                                 $(this).removeClass('opensub').find('.wp-submenu').css('margin-top', ''); 
    247                         }, 
    248                         timeout: 200, 
    249                         sensitivity: 7, 
    250                         interval: 90 
    251                 }); 
     238                        if ( o > 1 ) 
     239                                m.css('margin-top', '-'+o+'px'); 
     240                        else 
     241                                m.css('margin-top', ''); 
    252242 
    253                 menu.on('focus.adminmenu', '.wp-submenu a', function(e){ 
     243                        menu.find('li.menu-top').removeClass('opensub'); 
     244                        $(this).addClass('opensub'); 
     245                }, 
     246                out: function(){ 
     247                        $(this).removeClass('opensub').find('.wp-submenu').css('margin-top', ''); 
     248                }, 
     249                timeout: 200, 
     250                sensitivity: 7, 
     251                interval: 90 
     252        }); 
     253 
     254        menu.on('focus.adminmenu', '.wp-submenu a', function(e){ 
    254255                        $(e.target).closest('li.menu-top').addClass('opensub'); 
    255                 }).on('blur.adminmenu', '.wp-submenu a', function(e){ 
     256        }).on('blur.adminmenu', '.wp-submenu a', function(e){ 
    256257                        $(e.target).closest('li.menu-top').removeClass('opensub'); 
    257                 }); 
    258         } 
     258        }); 
    259259 
    260260        // Move .updated and .error alert boxes. Don't move boxes designed to be inline. 
    261261        $('div.wrap h2:first').nextAll('div.updated, div.error').addClass('below-h2');