Move the "view" link for attachment details to the sidebar and use more specific language. Removes an unnecessary JS handler. fixes #28977.
Built from https://develop.svn.wordpress.org/trunk@29263 git-svn-id: http://core.svn.wordpress.org/trunk@29046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8923bb0c0e
commit
89a8316946
|
@ -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;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue