WordPress.org

Make WordPress Core

Changeset 29263


Ignore:
Timestamp:
07/22/2014 02:19:21 AM (6 years ago)
Author:
helen
Message:

Move the "view" link for attachment details to the sidebar and use more specific language. Removes an unnecessary JS handler. fixes #28977.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-grid.js

    r29262 r29263  
    286286            'click .edit-attachment':         'editAttachment',
    287287            'click .refresh-attachment':      'refreshAttachment',
    288             'click .edit-image':              'handleEditImageClick',
    289             'click .view-attachment':         'handleViewAttachmentClick'
     288            'click .edit-image':              'handleEditImageClick'
    290289        },
    291290
     
    328327        handleEditImageClick: function() {
    329328            this.controller.setState( 'edit-image' );
    330         },
    331 
    332         /**
    333          * When View is clicked, navigate to the attachment page
    334          */
    335         handleViewAttachmentClick: function() {
    336             window.location = this.model.get( 'link' );
    337329        },
    338330
  • trunk/src/wp-includes/media-template.php

    r29262 r29263  
    298298                    <# } #>
    299299
    300                     <a class="button view-attachment" href="#"><?php _e( 'View' ); ?></a>
    301 
    302300                    <# if ( ! data.uploading && data.can.remove ) { #>
    303301                        <?php if ( MEDIA_TRASH ): ?>
     
    394392            </div>
    395393
     394            <a class="view-attachment" href="{{ data.link }}"><?php _e( 'View attachment page' ); ?></a> |
    396395            <a href="post.php?post={{ data.id }}&action=edit"><?php _e( 'Edit more details' ); ?></a>
    397396
Note: See TracChangeset for help on using the changeset viewer.