Changeset 24304
- Timestamp:
- 05/20/2013 07:36:29 PM (11 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/wp-admin.css
r24294 r24304 3392 3392 } 3393 3393 3394 #notification-dialog {3394 .notification-dialog { 3395 3395 position: fixed; 3396 3396 top: 30%; … … 3403 3403 } 3404 3404 3405 #notification-dialog-background {3405 .notification-dialog-background { 3406 3406 position: fixed; 3407 3407 top: 0; … … 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 } -
trunk/wp-admin/includes/post.php
r24206 r24304 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 -
trunk/wp-admin/js/post.js
r24303 r24304 257 257 send = {}; 258 258 259 if ( ! post_id)259 if ( ! post_id || ! $('#post-lock-dialog').length ) 260 260 return; 261 261 … … 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') ) { … … 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 }); … … 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; -
trunk/wp-admin/post.php
r24201 r24304 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 $check_users = get_users( array( 'fields' => 'ID', 'number' => 2 ) ); 183 184 if ( count( $check_users ) > 1 ) 185 add_action( 'admin_footer', '_admin_notice_post_locked' ); 186 187 unset( $check_users ); 188 } 180 189 181 190 $title = $post_type_object->labels->edit_item;
Note: See TracChangeset
for help on using the changeset viewer.