Ticket #23697: 23697-6.patch
File 23697-6.patch, 3.9 KB (added by , 11 years ago) |
---|
-
wp-admin/css/wp-admin.css
3392 3392 border-style: solid; 3393 3393 } 3394 3394 3395 #notification-dialog {3395 .notification-dialog { 3396 3396 position: fixed; 3397 3397 top: 30%; 3398 3398 left: 50%; … … 3403 3403 z-index: 1000005; 3404 3404 } 3405 3405 3406 #notification-dialog-background {3406 .notification-dialog-background { 3407 3407 position: fixed; 3408 3408 top: 0; 3409 3409 left: 0; … … 3415 3415 z-index: 1000000; 3416 3416 } 3417 3417 3418 # notification-dialog .post-locked-message,3419 # notification-dialog .post-taken-over {3418 #post-lock-dialog .post-locked-message, 3419 #post-lock-dialog .post-taken-over { 3420 3420 margin: 25px; 3421 3421 } 3422 3422 3423 # notification-dialog .post-locked-message a.button {3423 #post-lock-dialog .post-locked-message a.button { 3424 3424 margin-right: 10px; 3425 3425 } 3426 3426 3427 # notification-dialog .post-locked-avatar {3427 #post-lock-dialog .post-locked-avatar { 3428 3428 float: left; 3429 3429 margin: 0 20px 20px 0; 3430 3430 } 3431 3431 3432 # notification-dialog .wp-tab-first {3432 #post-lock-dialog .wp-tab-first { 3433 3433 outline: 0; 3434 3434 } 3435 3435 3436 # notification-dialog .locked-saving img {3436 #post-lock-dialog .locked-saving img { 3437 3437 float: left; 3438 3438 margin-right: 3px; 3439 3439 } 3440 3440 3441 # notification-dialog-wrap.saving .locked-saving,3442 # notification-dialog-wrap.saved .locked-saved {3441 #post-lock-dialog.saving .locked-saving, 3442 #post-lock-dialog.saved .locked-saved { 3443 3443 display: inline; 3444 3444 } 3445 3445 -
wp-admin/includes/post.php
1202 1202 $locked = false; 1203 1203 } 1204 1204 1205 $ class = $locked ? '' : ' class="hidden"';1205 $hidden = $locked ? '' : ' hidden'; 1206 1206 1207 1207 ?> 1208 <div id=" notification-dialog-wrap"<?php echo $class; ?>>1209 <div id="notification-dialog-background"></div>1210 <div id="notification-dialog">1208 <div id="post-lock-dialog" class="notification-dialog-wrap<?php echo $hidden; ?>"> 1209 <div class="notification-dialog-background"></div> 1210 <div class="notification-dialog"> 1211 1211 <?php 1212 1212 1213 1213 if ( $locked ) { -
wp-admin/js/post.js
256 256 post_id = $('#post_ID').val(), 257 257 send = {}; 258 258 259 if ( ! post_id)259 if ( ! post_id || ! $('#post-lock-dialog').length ) 260 260 return; 261 261 262 262 send['post_id'] = post_id; … … 276 276 277 277 if ( received.lock_error ) { 278 278 // show "editing taken over" message 279 wrap = $('# notification-dialog-wrap');279 wrap = $('#post-lock-dialog'); 280 280 281 281 if ( wrap.length && ! wrap.is(':visible') ) { 282 282 if ( typeof autosave == 'function' ) { … … 305 305 } else if ( received.new_lock ) { 306 306 $('#active_post_lock').val( received.new_lock ); 307 307 } 308 309 if ( received.update_nonces ) {310 $.each( received.update_nonces, function( selector, value ) {311 if ( selector.match(/^replace-/) )312 $( '#' + selector.replace('replace-', '') ).val( value );313 });314 }315 308 } 316 309 }); 317 310 … … 359 352 postboxes.add_postbox_toggles(pagenow); 360 353 361 354 // Post locks: contain focus inside the dialog. If the dialog is shown, focus the first item. 362 $('# notification-dialog').on( 'keydown', function(e) {355 $('#post-lock-dialog .notification-dialog').on( 'keydown', function(e) { 363 356 if ( e.which != 9 ) 364 357 return; 365 358 -
wp-admin/post.php
176 176 wp_enqueue_script('autosave'); 177 177 } 178 178 179 add_action( 'admin_footer', '_admin_notice_post_locked');179 $blog_users = get_users( array( 'blog_id' => get_current_blog_id(), 'fields' => 'ID' ) ); 180 180 181 if ( count( $blog_users ) > 1 ) 182 add_action( 'admin_footer', '_admin_notice_post_locked' ); 183 184 unset( $blog_users ); 185 181 186 $title = $post_type_object->labels->edit_item; 182 187 $post = get_post($post_id, OBJECT, 'edit'); 183 188