Changeset 26516
- Timestamp:
- 12/02/2013 03:18:40 AM (11 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/wp-admin.css
r26507 r26516 11824 11824 } 11825 11825 11826 .auto-fold #adminmenu a.menu-top:focus + .wp-submenu, 11827 .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu { 11828 position: relative; 11829 left: -1px; 11830 right: 0; 11831 top: 0; 11832 } 11833 11826 11834 /* Remove submenu headers and adjust sub meu*/ 11827 11835 #adminmenu .wp-submenu .wp-submenu-head { -
trunk/src/wp-admin/js/common.js
r26421 r26516 252 252 return; 253 253 254 if ( menu.data('wp-responsive') ) { 255 // The menu is in responsive mode, bail 256 return; 257 } 258 254 259 menutop = $(this).offset().top; 255 260 wintop = $(window).scrollTop(); … … 276 281 }, 277 282 out: function(){ 283 if ( menu.data('wp-responsive') ) { 284 // The menu is in responsive mode, bail 285 return; 286 } 287 278 288 $(this).removeClass('opensub').find('.wp-submenu').css('margin-top', ''); 279 289 }, … … 284 294 285 295 menu.on('focus.adminmenu', '.wp-submenu a', function(e){ 296 if ( menu.data('wp-responsive') ) { 297 // The menu is in responsive mode, bail 298 return; 299 } 300 286 301 $(e.target).closest('li.menu-top').addClass('opensub'); 287 302 }).on('blur.adminmenu', '.wp-submenu a', function(e){ 303 if ( menu.data('wp-responsive') ) { 304 // The menu is in responsive mode, bail 305 return; 306 } 307 288 308 $(e.target).closest('li.menu-top').removeClass('opensub'); 289 309 }); … … 542 562 $adminmenu.on( 'touchstart.wp-responsive', 'li.wp-has-submenu > a', function() { 543 563 scrollStart = $window.scrollTop(); 544 }).on( 'touchend.wp-responsive', 'li.wp-has-submenu > a', function( event ) { 545 if ( ! $adminmenu.data('wp-responsive') || $window.scrollTop() !== scrollStart ) { 564 }).on( 'touchend.wp-responsive click.wp-responsive', 'li.wp-has-submenu > a', function( event ) { 565 if ( ! $adminmenu.data('wp-responsive') || 566 ( event.type === 'touchend' && $window.scrollTop() !== scrollStart ) ) { 567 546 568 return; 547 569 } 548 570 549 $( this ).find( 'li.wp-has-submenu' ).removeClass( 'selected' ); 550 $( this ).parent( 'li' ).addClass( 'selected' ); 571 $( this ).parent( 'li' ).toggleClass( 'selected' ); 551 572 event.preventDefault(); 552 573 }); … … 554 575 self.trigger(); 555 576 $document.on( 'wp-window-resized.wp-responsive', $.proxy( this.trigger, this ) ); 577 578 // This needs to run later as UI Sortable may be initialized later on $(document).ready() 579 $window.on( 'load.wp-responsive', function() { 580 var width = navigator.userAgent.indexOf('AppleWebKit/') > -1 ? $window.width() : window.innerWidth; 581 582 if ( width <= 782 ) { 583 self.disableSortables(); 584 } 585 }); 556 586 }, 557 587
Note: See TracChangeset
for help on using the changeset viewer.