WordPress.org

Make WordPress Core

Changeset 24576


Ignore:
Timestamp:
07/05/2013 11:17:25 PM (7 years ago)
Author:
markjaquith
Message:

Gracefully slide down the "{Name} is editing" notice portion of the post row, so everything isn't shifting down in an instant and throwing off people's clicks.

fixes #24553. props kadamwhite, johnbillion.

Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/wp-admin.css

    r24574 r24576  
    25352535    background: url('../images/lock.png') no-repeat;
    25362536    margin: -2px 0 0 6px;
    2537     height: 16px;
     2537    height: 20px;
    25382538    width: 16px;
    25392539}
     
    25442544tr.wp-locked .row-actions .trash {
    25452545    display: none;
     2546}
     2547
     2548tr .locked-info {
     2549    height: 0;
     2550    opacity: 0;
     2551    -webkit-transition: height 1s, opacity 500ms;
     2552    transition:         height 1s, opacity 500ms;
     2553}
     2554
     2555tr.wp-locked .locked-info {
     2556    height: 22px;
     2557    opacity: 1;
     2558    -webkit-transition: height 1s, opacity 500ms 500ms;
     2559    transition:         height 1s, opacity 500ms 500ms;
    25462560}
    25472561
  • trunk/wp-admin/includes/class-wp-posts-list-table.php

    r24429 r24576  
    575575                    }
    576576
    577                     echo '<span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span>\n";
     577                    echo '<div class="locked-info"><span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span></div>\n";
    578578                }
    579579
  • trunk/wp-admin/js/inline-edit-post.js

    r24406 r24576  
    303303            if ( ! row.hasClass('wp-locked') ) {
    304304                lock_data = locked[key];
    305                 row.addClass('wp-locked').find('.column-title .locked-text').text( lock_data.text );
     305                row.find('.column-title .locked-text').text( lock_data.text );
    306306                row.find('.check-column checkbox').prop('checked', false);
    307307
     
    310310                    row.find('.column-title .locked-avatar').empty().append( avatar );
    311311                }
     312                row.addClass('wp-locked');
    312313            }
    313314        } else if ( row.hasClass('wp-locked') ) {
    314             row.removeClass('wp-locked').find('.column-title .locked-text').empty();
    315             row.find('.column-title .locked-avatar').empty();
     315            // Make room for the CSS animation
     316            row.removeClass('wp-locked').delay(1000).find('.locked-info span').empty();
    316317        }
    317318    });
Note: See TracChangeset for help on using the changeset viewer.