Ticket #23697: 23697-7.patch
File 23697-7.patch, 4.0 KB (added by , 11 years ago) |
---|
-
wp-admin/css/wp-admin.css
3391 3391 border-style: solid; 3392 3392 } 3393 3393 3394 #notification-dialog {3394 .notification-dialog { 3395 3395 position: fixed; 3396 3396 top: 30%; 3397 3397 left: 50%; … … 3402 3402 z-index: 1000005; 3403 3403 } 3404 3404 3405 #notification-dialog-background {3405 .notification-dialog-background { 3406 3406 position: fixed; 3407 3407 top: 0; 3408 3408 left: 0; … … 3414 3414 z-index: 1000000; 3415 3415 } 3416 3416 3417 # notification-dialog .post-locked-message,3418 # notification-dialog .post-taken-over {3417 #post-lock-dialog .post-locked-message, 3418 #post-lock-dialog .post-taken-over { 3419 3419 margin: 25px; 3420 3420 } 3421 3421 3422 # notification-dialog .post-locked-message a.button {3422 #post-lock-dialog .post-locked-message a.button { 3423 3423 margin-right: 10px; 3424 3424 } 3425 3425 3426 # notification-dialog .post-locked-avatar {3426 #post-lock-dialog .post-locked-avatar { 3427 3427 float: left; 3428 3428 margin: 0 20px 20px 0; 3429 3429 } 3430 3430 3431 # notification-dialog .wp-tab-first {3431 #post-lock-dialog .wp-tab-first { 3432 3432 outline: 0; 3433 3433 } 3434 3434 3435 # notification-dialog .locked-saving img {3435 #post-lock-dialog .locked-saving img { 3436 3436 float: left; 3437 3437 margin-right: 3px; 3438 3438 } 3439 3439 3440 # notification-dialog-wrap.saving .locked-saving,3441 # notification-dialog-wrap.saved .locked-saved {3440 #post-lock-dialog.saving .locked-saving, 3441 #post-lock-dialog.saved .locked-saved { 3442 3442 display: inline; 3443 3443 } 3444 3444 -
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 if ( is_multisite() ) { 180 add_action( 'admin_footer', '_admin_notice_post_locked' ); 181 } else { 182 $blog_users = get_users( array( 'fields' => 'ID' ) ); 180 183 184 if ( count( $blog_users ) > 1 ) 185 add_action( 'admin_footer', '_admin_notice_post_locked' ); 186 187 unset( $blog_users ); 188 } 189 181 190 $title = $post_type_object->labels->edit_item; 182 191 $post = get_post($post_id, OBJECT, 'edit'); 183 192