Changeset 39141
- Timestamp:
- 11/04/2016 04:01:24 PM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/admin-menu.css
r37365 r39141 265 265 .folded #adminmenu a.menu-top:focus + .wp-submenu, 266 266 .folded #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu, 267 .no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu 267 .no-js.folded #adminmenu .wp-has-submenu:hover .wp-submenu { 268 268 top: 0; 269 269 left: 36px; … … 548 548 } 549 549 550 #collapse-menu { 551 font-size: 13px; 550 #collapse-button { 551 display: block; 552 width: 100%; 553 height: 34px; 554 margin: 0; 555 border: none; 556 padding: 0; 557 position: relative; 558 overflow: visible; 552 559 line-height: 34px; 553 margin-top: 10px; 554 color: #a0a5aa; 555 color: rgba(240,245,250,0.6); 556 -webkit-transition: all .1s ease-in-out; 557 transition: all .1s ease-in-out; 558 } 559 560 #collapse-menu:hover, 561 #collapse-menu:hover #collapse-button div:after { 560 background: none; 561 color: #aaa; 562 cursor: pointer; 563 outline: 0; 564 } 565 566 #collapse-button:hover, 567 #collapse-button:focus { 562 568 color: #00b9eb; 563 569 } 564 570 565 .folded #collapse-menu span { 571 #collapse-button .collapse-button-icon, 572 #collapse-button .collapse-button-label { 573 /* absolutely positioned to avoid 1px shift in IE when button is pressed */ 574 display: block; 575 position: absolute; 576 top: 0; 577 left: 0; 578 line-height: 34px; 579 } 580 581 #collapse-button .collapse-button-icon { 582 width: 36px; 583 height: 34px; 584 } 585 586 #collapse-button .collapse-button-label { 587 padding: 0 0 0 36px; 588 } 589 590 .folded #collapse-button .collapse-button-label { 566 591 display: none; 567 592 } 568 593 569 #collapse-button, 570 #collapse-button div { 571 width: 15px; 572 height: 15px; 573 } 574 575 #collapse-button { 576 float: left; 577 height: 15px; 578 margin: 10px 8px 10px 11px; 579 width: 15px; 580 -webkit-border-radius: 10px; 581 border-radius: 10px; 582 } 583 584 #wpwrap #collapse-button div { 585 padding: 0; 586 } 587 588 #collapse-button div:after { 594 #collapse-button .collapse-button-icon:after { 589 595 content: "\f148"; 590 596 display: block; 591 line-height: 15px; 592 left: -3px; 593 top: -3px; 594 color: #a0a5aa; 595 color: rgba(240,245,250,0.6); 597 position: relative; 598 top: 7px; 599 text-align: center; 596 600 font: normal 20px/1 dashicons !important; 597 601 speak: none; 598 margin: 0 auto;599 padding: 0 !important;600 position: relative;601 text-align: center;602 width: 20px;603 -webkit-transition: all .1s ease-in-out;604 transition: all .1s ease-in-out;605 602 -webkit-font-smoothing: antialiased; 606 603 -moz-osx-font-smoothing: grayscale; … … 608 605 609 606 /* rtl:ignore */ 610 .folded #collapse-button div:after,611 .rtl #collapse-button div:after {607 .folded #collapse-button :after, 608 .rtl #collapse-button :after { 612 609 -webkit-transform: rotate(180deg); 613 610 -ms-transform: rotate(180deg); … … 615 612 } 616 613 617 .rtl.folded #collapse-button div:after {614 .rtl.folded #collapse-button :after { 618 615 -webkit-transform: none; 619 616 -ms-transform: none; 620 617 transform: none; 618 619 620 621 622 623 621 624 } 622 625 … … 653 656 .auto-fold #adminmenu .wp-has-current-submenu.opensub .wp-submenu, 654 657 .auto-fold #adminmenu a.menu-top:focus + .wp-submenu, 655 .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu 658 .auto-fold #adminmenu .wp-has-current-submenu a.menu-top:focus + .wp-submenu { 656 659 top: 0px; 657 660 left: 36px; … … 732 735 } 733 736 734 .auto-fold #collapse-menu span{737 .auto-fold #collapse-menu { 735 738 display: none; 736 739 } 737 740 738 .auto-fold #collapse-button div {739 background: none;740 }741 742 741 /* rtl:ignore */ 743 .auto-fold #collapse-button div:after {742 .auto-fold #collapse-button :after { 744 743 -webkit-transform: rotate(180deg); 745 744 -ms-transform: rotate(180deg); … … 747 746 } 748 747 749 .rtl.auto-fold #collapse-button div:after {748 .rtl.auto-fold #collapse-button :after { 750 749 -webkit-transform: none; 751 750 -ms-transform: none; -
trunk/src/wp-admin/css/colors/_admin.scss
r38660 r39141 228 228 /* Admin Menu: collapse button */ 229 229 230 #collapse- menu{230 #collapse- { 231 231 color: $menu-collapse-text; 232 232 } 233 233 234 #collapse-menu:hover { 235 color: $menu-collapse-focus-text; 236 } 237 238 #collapse-button div:after { 239 color: $menu-collapse-icon; 240 } 241 242 #collapse-menu:hover #collapse-button div:after { 243 color: $menu-collapse-focus-icon; 244 } 245 234 #collapse-button:hover, 235 #collapse-button:focus { 236 color: $menu-submenu-focus-text; 237 } 246 238 247 239 /* Admin Bar */ -
trunk/src/wp-admin/js/common.js
r38983 r39141 197 197 pinnedMenuBottom = false, 198 198 menuTop = 0, 199 199 200 menuIsPinned = false, 200 201 height = { … … 212 213 }); 213 214 214 $( '#collapse-menu').on('click.collapse-menu', function() {215 var respWidth, state;215 $('click.collapse-menu', function() { 216 var ; 216 217 217 218 // reset any compensation for submenus near the bottom of the screen 218 219 $('#adminmenu div.wp-submenu').css('margin-top', ''); 219 220 220 if ( window.innerWidth ) { 221 // window.innerWidth is affected by zooming on phones 222 respWidth = Math.max( window.innerWidth, document.documentElement.clientWidth ); 223 } else { 224 // IE < 9 doesn't support @media CSS rules 225 respWidth = 961; 226 } 227 228 if ( respWidth && respWidth < 960 ) { 221 if ( viewportWidth < 960 ) { 229 222 if ( $body.hasClass('auto-fold') ) { 230 223 $body.removeClass('auto-fold').removeClass('folded'); 231 224 setUserSetting('unfold', 1); 232 225 setUserSetting('mfold', 'o'); 233 state = 'open';226 tate = 'open'; 234 227 } else { 235 228 $body.addClass('auto-fold'); 236 229 setUserSetting('unfold', 0); 237 state = 'folded';230 tate = 'folded'; 238 231 } 239 232 } else { … … 241 234 $body.removeClass('folded'); 242 235 setUserSetting('mfold', 'o'); 243 state = 'open';236 tate = 'open'; 244 237 } else { 245 238 $body.addClass('folded'); 246 239 setUserSetting('mfold', 'f'); 247 state = 'folded'; 248 } 249 } 250 251 currentMenuItemHasPopup(); 252 $document.trigger( 'wp-collapse-menu', { state: state } ); 240 menuState = 'folded'; 241 } 242 } 243 244 $document.trigger( 'wp-collapse-menu', { state: menuState } ); 253 245 }); 254 246 255 247 // Handle the `aria-haspopup` attribute on the current menu item when it has a sub-menu. 256 248 function currentMenuItemHasPopup() { 257 var respWidth, 258 $current = $( 'a.wp-has-current-submenu' ); 259 260 if ( window.innerWidth ) { 261 respWidth = Math.max( window.innerWidth, document.documentElement.clientWidth ); 262 } else { 263 respWidth = 961; 264 } 265 266 if ( $body.hasClass( 'folded' ) || ( $body.hasClass( 'auto-fold' ) && respWidth && respWidth <= 960 && respWidth > 782 ) ) { 249 var $current = $( 'a.wp-has-current-submenu' ); 250 251 if ( 'folded' === menuState ) { 267 252 // When folded or auto-folded and not responsive view, the current menu item does have a fly-out sub-menu. 268 253 $current.attr( 'aria-haspopup', 'true' ); … … 273 258 } 274 259 275 $document.on( 'wp- window-resizedwp-responsive-activate wp-responsive-deactivate', currentMenuItemHasPopup );260 $document.on( 'wp- wp-responsive-activate wp-responsive-deactivate', currentMenuItemHasPopup ); 276 261 277 262 /** … … 837 822 838 823 trigger: function() { 839 var width; 840 841 if ( window.innerWidth ) { 842 // window.innerWidth is affected by zooming on phones 843 width = Math.max( window.innerWidth, document.documentElement.clientWidth ); 844 } else { 845 // Exclude IE < 9, it doesn't support @media CSS rules 824 var viewportWidth = getViewportWidth(); 825 826 // Exclude IE < 9, it doesn't support @media CSS rules. 827 if ( ! viewportWidth ) { 846 828 return; 847 829 } 848 830 849 if ( width <= 782 ) {831 if ( idth <= 782 ) { 850 832 if ( ! wpResponsiveActive ) { 851 833 $document.trigger( 'wp-responsive-activate' ); … … 859 841 } 860 842 861 if ( width <= 480 ) {843 if ( idth <= 480 ) { 862 844 this.enableOverlay(); 863 845 } else { … … 913 895 }); 914 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 915 970 window.wpResponsive.init(); 916 971 setPinMenu(); 972 917 973 currentMenuItemHasPopup(); 918 974 makeNoticesDismissible(); -
trunk/src/wp-admin/menu-header.php
r37488 r39141 235 235 } 236 236 237 echo '<li id="collapse-menu" class="hide-if-no-js"><div id="collapse-button"><div></div></div>'; 238 echo '<span>' . esc_html__( 'Collapse menu' ) . '</span>'; 239 echo '</li>'; 237 echo '<li id="collapse-menu" class="hide-if-no-js">' . 238 '<button type="button" id="collapse-button" aria-label="' . esc_attr__( 'Collapse Main menu' ) . '" aria-expanded="true">' . 239 '<span class="collapse-button-icon" aria-hidden="true"></span>' . 240 '<span class="collapse-button-label">' . __( 'Collapse menu' ) . '</span>' . 241 '</button></li>'; 240 242 } 241 243 -
trunk/src/wp-includes/css/customize-preview.css
r39136 r39141 24 24 background: transparent; 25 25 color: transparent; 26 26 27 box-shadow: none; 27 28 outline: none; … … 49 50 background-color: #0085ba; 50 51 background: #0085ba; 52 51 53 border-radius: 50%; 52 54 border: 2px solid #fff; 55 53 56 box-shadow: 0 2px 1px rgba(46,68,83,0.15); 54 57 text-align: center; 58 59 60 61 55 62 display: flex; 63 64 65 66 67 68 56 69 flex-direction: row; 70 71 72 73 57 74 justify-content: center; 75 76 77 78 58 79 align-items: center; 59 80 cursor: pointer; 60 81 padding: 0; 82 61 83 animation-fill-mode: both; 84 62 85 animation-duration: .4s; 63 86 opacity: 0; … … 85 108 86 109 body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut button { 110 87 111 animation-name: customize-partial-edit-shortcut-bounce-appear; 88 112 pointer-events: auto; 89 113 } 90 114 body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut button { 115 91 116 animation-name: customize-partial-edit-shortcut-bounce-disappear; 92 117 pointer-events: none; … … 102 127 } 103 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 104 163 @keyframes customize-partial-edit-shortcut-bounce-appear { 105 164 from, 20%, 40%, 60%, 80%, to { 106 animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); 107 } 108 0% { 109 opacity: 0; 110 transform: scale3d(.3, .3, .3); 111 } 112 20% { 113 transform: scale3d(1.1, 1.1, 1.1); 114 } 115 40% { 116 transform: scale3d(.9, .9, .9); 117 } 118 60% { 119 opacity: 1; 120 transform: scale3d(1.03, 1.03, 1.03); 121 } 122 80% { 123 transform: scale3d(.97, .97, .97); 124 } 125 to { 126 opacity: 1; 127 transform: scale3d(1, 1, 1); 165 -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); 166 animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); 167 } 168 0% { 169 opacity: 0; 170 -webkit-transform: scale3d(.3, .3, .3); 171 transform: scale3d(.3, .3, .3); 172 } 173 20% { 174 -webkit-transform: scale3d(1.1, 1.1, 1.1); 175 transform: scale3d(1.1, 1.1, 1.1); 176 } 177 40% { 178 -webkit-transform: scale3d(.9, .9, .9); 179 transform: scale3d(.9, .9, .9); 180 } 181 60% { 182 opacity: 1; 183 -webkit-transform: scale3d(1.03, 1.03, 1.03); 184 transform: scale3d(1.03, 1.03, 1.03); 185 } 186 80% { 187 -webkit-transform: scale3d(.97, .97, .97); 188 transform: scale3d(.97, .97, .97); 189 } 190 to { 191 opacity: 1; 192 -webkit-transform: scale3d(1, 1, 1); 193 transform: scale3d(1, 1, 1); 194 } 195 } 196 197 @-webkit-keyframes customize-partial-edit-shortcut-bounce-disappear { 198 from, 20%, 40%, 60%, 80%, to { 199 -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); 200 animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); 201 } 202 0% { 203 opacity: 1; 204 -webkit-transform: scale3d(1, 1, 1); 205 transform: scale3d(1, 1, 1); 206 } 207 20% { 208 -webkit-transform: scale3d(.97, .97, .97); 209 transform: scale3d(.97, .97, .97); 210 } 211 40% { 212 opacity: 1; 213 -webkit-transform: scale3d(1.03, 1.03, 1.03); 214 transform: scale3d(1.03, 1.03, 1.03); 215 } 216 60% { 217 -webkit-transform: scale3d(.9, .9, .9); 218 transform: scale3d(.9, .9, .9); 219 } 220 80% { 221 -webkit-transform: scale3d(1.1, 1.1, 1.1); 222 transform: scale3d(1.1, 1.1, 1.1); 223 } 224 to { 225 opacity: 0; 226 -webkit-transform: scale3d(.3, .3, .3); 227 transform: scale3d(.3, .3, .3); 128 228 } 129 229 } … … 131 231 @keyframes customize-partial-edit-shortcut-bounce-disappear { 132 232 from, 20%, 40%, 60%, 80%, to { 133 animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); 134 } 135 0% { 136 opacity: 1; 137 transform: scale3d(1, 1, 1); 138 } 139 20% { 140 transform: scale3d(.97, .97, .97); 141 } 142 40% { 143 opacity: 1; 144 transform: scale3d(1.03, 1.03, 1.03); 145 } 146 60% { 147 transform: scale3d(.9, .9, .9); 148 } 149 80% { 150 transform: scale3d(1.1, 1.1, 1.1); 151 } 152 to { 153 opacity: 0; 233 -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); 234 animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); 235 } 236 0% { 237 opacity: 1; 238 -webkit-transform: scale3d(1, 1, 1); 239 transform: scale3d(1, 1, 1); 240 } 241 20% { 242 -webkit-transform: scale3d(.97, .97, .97); 243 transform: scale3d(.97, .97, .97); 244 } 245 40% { 246 opacity: 1; 247 -webkit-transform: scale3d(1.03, 1.03, 1.03); 248 transform: scale3d(1.03, 1.03, 1.03); 249 } 250 60% { 251 -webkit-transform: scale3d(.9, .9, .9); 252 transform: scale3d(.9, .9, .9); 253 } 254 80% { 255 -webkit-transform: scale3d(1.1, 1.1, 1.1); 256 transform: scale3d(1.1, 1.1, 1.1); 257 } 258 to { 259 opacity: 0; 260 -webkit-transform: scale3d(.3, .3, .3); 154 261 transform: scale3d(.3, .3, .3); 155 262 } -
trunk/src/wp-includes/script-loader.php
r39132 r39141 78 78 $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 ); 79 79 did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array( 80 'warnDelete' => __( "You are about to permanently delete these items.\n 'Cancel' to stop, 'OK' to delete." ), 81 'dismiss' => __( 'Dismiss this notice.' ), 80 'warnDelete' => __( "You are about to permanently delete these items.\n 'Cancel' to stop, 'OK' to delete." ), 81 'dismiss' => __( 'Dismiss this notice.' ), 82 'collapseMenu' => __( 'Collapse Main menu' ), 83 'expandMenu' => __( 'Expand Main menu' ), 82 84 ) ); 83 85
Note: See TracChangeset
for help on using the changeset viewer.