Ticket #31187: 31187.patch
| File 31187.patch, 1.6 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/js/common.js
707 707 708 708 window.wpResponsive = { 709 709 init: function() { 710 var self = this; 710 var self = this, 711 open = false, 712 x, y; 711 713 712 714 // Modify functionality based on custom activate/deactivate event 713 715 $document.on( 'wp-responsive-activate.wp-responsive', function() { … … 725 727 if ( $wpwrap.hasClass( 'wp-responsive-open' ) ) { 726 728 $(this).find('a').attr( 'aria-expanded', 'true' ); 727 729 $( '#adminmenu a:first' ).focus(); 730 open = true; 728 731 } else { 729 732 $(this).find('a').attr( 'aria-expanded', 'false' ); 733 open = false; 730 734 } 731 735 } ); 732 736 737 $window.on( 'touchstart.wp-responsive', function( event ) { 738 var touches = event.originalEvent.touches; 739 740 if ( 1 !== touches.length ) { 741 return; 742 } 743 744 x = touches[0].clientX; 745 y = touches[0].clientY; 746 } ); 747 748 $window.on( 'touchend.wp-responsive', function( event ) { 749 var touches = event.originalEvent.changedTouches, 750 distanceX; 751 752 if ( 1 === touches.length && x && y ) { 753 if ( window.isRtl == open ) { 754 distanceX = touches[0].clientX - x; 755 } else { 756 distanceX = x - touches[0].clientX; 757 } 758 759 if ( distanceX > Math.abs( touches[0].clientY - y ) ) { 760 $( '#wp-admin-bar-menu-toggle' ).trigger( 'click' ); 761 } 762 } 763 764 x = y = 0; 765 } ); 766 733 767 // Add menu events 734 768 $adminmenu.on( 'click.wp-responsive', 'li.wp-has-submenu > a', function( event ) { 735 769 if ( ! $adminmenu.data('wp-responsive') ) {
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)