Make WordPress Core

Changeset 29065


Ignore:
Timestamp:
07/10/2014 03:55:21 PM (10 years ago)
Author:
wonderboymusic
Message:

Media Grid: make the edit attachment icon clickable.

Props ericlewis.
See #24716.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/css/media-views.css

    r29056 r29065  
    26442644}
    26452645
     2646.media-frame.mode-bulk-edit .attachment:hover .inline-toolbar {
     2647    display: none;
     2648}
    26462649
    26472650.edit-attachment-frame .edit-media-header .left:before {
  • trunk/src/wp-includes/js/media-views.js

    r29056 r29065  
    18131813
    18141814            _.each( this.options.mode, function( mode ) {
    1815                 this.activeModes.add( new Backbone.Model( { id: mode } ) );
     1815                this.activateMode( mode );
    18161816            }, this );
    18171817
     
    20062006        },
    20072007        activateMode: function( mode ) {
     2008            if ( this.activeModes.where( { id: mode } ).length ) {
     2009                return;
     2010            }
    20082011            this.activeModes.add( [ { id: mode } ] );
     2012            this.$el.addClass( 'mode-' + mode );
    20092013            this.trigger( mode + ':activate' );
    20102014        },
     
    20152019            }
    20162020            this.activeModes.remove( this.activeModes.where( { id: mode } ) );
     2021            this.$el.removeClass( 'mode-' + mode );
    20172022            this.trigger( mode + ':deactivate' );
    20182023        }
     
    45914596
    45924597        events: {
    4593             'click .attachment-preview':      'toggleSelectionHandler',
     4598            'click .js--select-attachment':   'toggleSelectionHandler',
    45944599            'change [data-setting]':          'updateSetting',
    45954600            'change [data-setting] input':    'updateSetting',
  • trunk/src/wp-includes/media-template.php

    r29056 r29065  
    387387    <script type="text/html" id="tmpl-attachment">
    388388        <# if ( _.contains( data.controller.options.mode, 'grid' ) ) { #>
    389         <div class="inline-toolbar">
     389        <div class="inline-toolbar js--select-attachment">
    390390            <div class="dashicons dashicons-edit edit edit-media"></div>
    391391        </div>
    392392        <# } #>
    393         <div class="attachment-preview type-{{ data.type }} subtype-{{ data.subtype }} {{ data.orientation }}">
     393        <div class="attachment-preview js--select-attachment type-{{ data.type }} subtype-{{ data.subtype }} {{ data.orientation }}">
    394394            <# if ( data.uploading ) { #>
    395395                <div class="media-progress-bar"><div></div></div>
Note: See TracChangeset for help on using the changeset viewer.