Make WordPress Core

Changeset 29086


Ignore:
Timestamp:
07/11/2014 05:33:29 AM (10 years ago)
Author:
wonderboymusic
Message:

Media Grid:

  • Move the grid down via CSS transition when the Screen Options slide open.
  • Remove some unused CSS for grid options.

See #24716.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/common.js

    r29079 r29086  
    151151            link.addClass('screen-meta-active').attr('aria-expanded', true);
    152152        });
     153
     154        $( document ).trigger( 'screen:options:open' );
    153155    },
    154156
     
    159161            panel.parent().hide();
    160162        });
     163
     164        $( document ).trigger( 'screen:options:close' );
    161165    }
    162166};
  • trunk/src/wp-includes/css/media-views.css

    r29084 r29086  
    25812581}
    25822582
    2583 .media-grid-view .view-switch,
    2584 .media-grid-field-options {
     2583.media-grid-view .view-switch {
    25852584    display: inline-block;
    25862585    float: none;
    25872586    margin-top: 13px;
    25882587    vertical-align: middle;
    2589 }
    2590 
    2591 .media-grid-field-options span {
    2592     padding-right: 5px;
    2593 }
    2594 
    2595 .media-grid-field-options label {
    2596     margin-right: 10px;
    25972588}
    25982589
     
    26082599    right: 0;
    26092600    top: 32px;
    2610 }
     2601    -webkit-transition: 200ms ease-in-out;
     2602    transition: 200ms ease-in-out;
     2603}
     2604
     2605.media-grid-view-options {
     2606    top: 120px;
     2607}
     2608
    26112609@media screen and (max-width: 900px) {
    26122610    .auto-fold .media-grid-view {
  • trunk/src/wp-includes/js/media-grid.js

    r29085 r29086  
    103103
    104104            $(document).on( 'click', '.add-new-h2', _.bind( this.addNewClickHandler, this ) );
     105            $(document).on( 'screen:options:open', _.bind( this.screenOptionsOpen, this ) );
     106            $(document).on( 'screen:options:close', _.bind( this.screenOptionsClose, this ) );
     107
    105108            // Ensure core and media grid view UI is enabled.
    106109            this.$el.addClass('wp-core-ui media-grid-view');
     
    151154
    152155            _.delay( _.bind( this.createRouter, this ), 1000 );
     156        },
     157
     158        screenOptionsOpen: function() {
     159            this.$el.addClass( 'media-grid-view-options' );
     160        },
     161
     162        screenOptionsClose: function() {
     163            this.$el.removeClass( 'media-grid-view-options' );
    153164        },
    154165
Note: See TracChangeset for help on using the changeset viewer.