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

git-svn-id: https://develop.svn.wordpress.org/trunk@29263 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi 2014-07-22 02:19:21 +00:00
parent f171b362a9
commit 25b733cea2
2 changed files with 2 additions and 11 deletions

View File

@ -285,8 +285,7 @@
'click .trash-attachment': 'trashAttachment',
'click .edit-attachment': 'editAttachment',
'click .refresh-attachment': 'refreshAttachment',
'click .edit-image': 'handleEditImageClick',
'click .view-attachment': 'handleViewAttachmentClick'
'click .edit-image': 'handleEditImageClick'
},
initialize: function() {
@ -329,13 +328,6 @@
this.controller.setState( 'edit-image' );
},
/**
* When View is clicked, navigate to the attachment page
*/
handleViewAttachmentClick: function() {
window.location = this.model.get( 'link' );
},
afterDelete: function( model ) {
if ( ! model.destroyed ) {
return;

View File

@ -297,8 +297,6 @@ function wp_print_media_templates() {
<a class="button edit-image" href="#"><?php _e( 'Edit Image' ); ?></a>
<# } #>
<a class="button view-attachment" href="#"><?php _e( 'View' ); ?></a>
<# if ( ! data.uploading && data.can.remove ) { #>
<?php if ( MEDIA_TRASH ): ?>
<a class="trash-attachment" href="#"><?php _e( 'Trash' ); ?></a>
@ -393,6 +391,7 @@ function wp_print_media_templates() {
<# } #>
</div>
<a class="view-attachment" href="{{ data.link }}"><?php _e( 'View attachment page' ); ?></a> |
<a href="post.php?post={{ data.id }}&action=edit"><?php _e( 'Edit more details' ); ?></a>
</div>