Changeset 23763
- Timestamp:
- 03/21/2013 12:57:27 AM (12 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/wp-admin.css
r23753 r23763 3412 3412 #notification-dialog .currently-editing { 3413 3413 margin-bottom: 20px; 3414 outline: 0; 3414 3415 } 3415 3416 -
trunk/wp-admin/includes/post.php
r23742 r23763 1216 1216 1217 1217 $preview_link = apply_filters( 'preview_post_link', $preview_link ); 1218 $override = apply_filters( 'override_post_lock', true, $post, $user ); 1219 $tab_last = $override ? '' : ' wp-tab-last'; 1218 1220 1219 1221 ?> 1220 1222 <div class="post-locked-message"> 1221 1223 <div class="post-locked-avatar"><?php echo get_avatar( $user->ID, 64 ); ?></div> 1222 <p class="currently-editing " tabindex="0"><?php esc_html_e( sprintf( __( 'This content is currently locked. If you take over, %s will be blocked from continuing to edit.' ), $user->display_name ) ); ?></p>1224 <p class="currently-editing wp-tab-first" tabindex="0"><?php esc_html_e( sprintf( __( 'This content is currently locked. If you take over, %s will be blocked from continuing to edit.' ), $user->display_name ) ); ?></p> 1223 1225 <p> 1224 1226 <a class="button" href="<?php echo esc_url( wp_get_referer() ); ?>"><?php _e('Go back'); ?></a> 1225 <a class="button " href="<?php echo esc_url( $preview_link ); ?>"><?php _e('Preview'); ?></a>1227 <a class="button<?php echo $tab_last; ?>" href="<?php echo esc_url( $preview_link ); ?>"><?php _e('Preview'); ?></a> 1226 1228 <?php 1227 1229 1228 1230 // Allow plugins to prevent some users overriding the post lock 1229 if ( apply_filters( 'override_post_lock', true, $post, $user )) {1231 if ( $override ) { 1230 1232 ?> 1231 <a class="button button-primary " href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', get_edit_post_link( $post->ID, 'url' ) ) ); ?>"><?php _e('Take over'); ?></a>1233 <a class="button button-primary wp-tab-last" href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', get_edit_post_link( $post->ID, 'url' ) ) ); ?>"><?php _e('Take over'); ?></a> 1232 1234 <?php 1233 1235 } … … 1241 1243 <div class="post-taken-over"> 1242 1244 <div class="post-locked-avatar"></div> 1243 <p class="currently-editing " tabindex="0"></p>1244 <p><a class="button button-primary " href="<?php echo esc_url( admin_url('edit.php') ); ?>"><?php _e('Go to All Posts'); ?></a></p>1245 <p class="currently-editing wp-tab-first" tabindex="0"></p> 1246 <p><a class="button button-primary wp-tab-last" href="<?php echo esc_url( admin_url('edit.php') ); ?>"><?php _e('Go to All Posts'); ?></a></p> 1245 1247 </div> 1246 1248 <?php -
trunk/wp-admin/js/post.js
r23733 r23763 300 300 postboxes.add_postbox_toggles(pagenow); 301 301 302 // Post locks: if the Post Locked dialog is shown, focus it. 303 $('#notification-dialog:visible').find('p.currently-editing').focus(); 302 // Post locks: contain focus inside the dialog. If the dialog is shown, focus the first item. 303 $('#notification-dialog').on( 'keydown', function(e) { 304 if ( e.which != 9 ) 305 return; 306 307 var target = $(e.target); 308 309 if ( target.hasClass('wp-tab-first') && e.shiftKey ) { 310 $(this).find('.wp-tab-last').focus(); 311 e.preventDefault(); 312 } else if ( target.hasClass('wp-tab-last') && ! e.shiftKey ) { 313 $(this).find('.wp-tab-first').focus(); 314 e.preventDefault(); 315 } 316 }).filter(':visible').find('.wp-tab-first').focus(); 304 317 305 318 // multi-taxonomies
Note: See TracChangeset
for help on using the changeset viewer.