Changeset 31925
- Timestamp:
- 03/30/2015 03:08:30 AM (10 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/press-this.css
r31809 r31925 855 855 .add-cat-toggle { 856 856 float: right; 857 margin-top: -33px; 857 margin-top: -45px; 858 line-height: 20px; 859 padding: 12px 10px 8px; 858 860 } 859 861 … … 864 866 865 867 .add-cat-toggle.is-toggled { 866 margin-top: -36px;868 padding: 10px; 867 869 } 868 870 … … 1186 1188 } 1187 1189 1188 .options-open, 1189 .options-close { 1190 .options, 1191 .options.open .on-closed, 1192 .options.closed .on-open { 1190 1193 display: none; 1191 1194 } 1192 1195 1193 1196 @media (max-width: 900px) { 1194 .options-open, 1195 .options-close { 1197 .options { 1196 1198 display: block; 1197 1199 } 1198 1200 } 1199 1201 1200 .options-open.is-hidden,1201 .options-close.is-hidden,1202 1202 .options-panel-back.is-hidden { 1203 1203 display: none; 1204 1204 } 1205 1205 1206 .options -open:focus .dashicons {1206 .options:focus .dashicons { 1207 1207 color: #fff; 1208 1208 text-decoration: none; 1209 1209 } 1210 1210 1211 .options -open.dashicons {1211 .options .dashicons { 1212 1212 margin-top: 3px; 1213 1213 } 1214 1214 1215 .options -close{1215 .options { 1216 1216 color: #2ea2cc; 1217 1217 } -
trunk/src/wp-admin/includes/class-wp-press-this.php
r31907 r31925 1202 1202 </a> 1203 1203 </h1> 1204 <button type="button" class="options-open button-subtle"> 1205 <span class="dashicons dashicons-tag"></span><span class="screen-reader-text"><?php _e( 'Show post options' ); ?></span> 1204 <button type="button" class="options button-subtle closed"> 1205 <span class="dashicons dashicons-tag on-closed"></span> 1206 <span class="screen-reader-text on-closed"><?php _e( 'Show post options' ); ?></span> 1207 <span aria-hidden="true" class="on-open"><?php _e( 'Done' ); ?></span> 1208 <span class="screen-reader-text on-open"><?php _e( 'Hide post options' ); ?></span> 1206 1209 </button> 1207 <button type="button" class="options-close button-subtle is-hidden"><?php _e( 'Done' ); ?></button>1208 1210 </div> 1209 1211 -
trunk/src/wp-admin/js/press-this.js
r31919 r31925 489 489 sidebarIsOpen = true; 490 490 491 $( '.options-open, .press-this-actions, #scanbar' ).addClass( isHidden ); 492 $( '.options-close, .options-panel-back' ).removeClass( isHidden ); 491 $( '.options' ).removeClass( 'closed' ).addClass( 'open' ); 492 $( '.press-this-actions, #scanbar' ).addClass( isHidden ); 493 $( '.options-panel-back' ).removeClass( isHidden ); 493 494 494 495 $( '.options-panel' ).removeClass( offscreenHidden ) 495 .one( 'transitionend', function() {496 .one( transitionEndEvent, function() { 496 497 $( '.post-option:first' ).focus(); 497 498 } ); … … 501 502 sidebarIsOpen = false; 502 503 503 $( '.options-close, .options-panel-back' ).addClass( isHidden ); 504 $( '.options-open, .press-this-actions, #scanbar' ).removeClass( isHidden ); 504 $( '.options' ).removeClass( 'open' ).addClass( 'closed' ); 505 $( '.options-panel-back' ).addClass( isHidden ); 506 $( '.press-this-actions, #scanbar' ).removeClass( isHidden ); 505 507 506 508 $( '.options-panel' ).addClass( isOffScreen ) 507 .one( 'transitionend', function() {509 .one( transitionEndEvent, function() { 508 510 $( this ).addClass( isHidden ); 509 511 // Reset to options list … … 621 623 monitorCatList(); 622 624 623 $( '.options-open' ).on( 'click.press-this', openSidebar ); 624 $( '.options-close' ).on( 'click.press-this', closeSidebar ); 625 $( '.options' ).on( 'click.press-this', function() { 626 if ( $( this ).hasClass( 'open' ) ) { 627 closeSidebar(); 628 } else { 629 openSidebar(); 630 } 631 }); 625 632 626 633 // Close the sidebar when focus moves outside of it. … … 633 640 ( node.nodeName === 'BODY' || 634 641 ( ! $node.closest( '.options-panel' ).length && 635 ! $node.closest( '.options -open' ).length ) ) ) {642 ! $node.closest( '.options' ).length ) ) ) { 636 643 637 644 closeSidebar();
Note: See TracChangeset
for help on using the changeset viewer.