Media Grid: Add a View button to Attachment Details modal.

props adamsilverstein.
fixes #28977.
Built from https://develop.svn.wordpress.org/trunk@29262


git-svn-id: http://core.svn.wordpress.org/trunk@29045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2014-07-22 01:30:16 +00:00
parent b9222c9e1e
commit 8923bb0c0e
4 changed files with 13 additions and 3 deletions

View File

@@ -285,7 +285,8 @@
'click .trash-attachment': 'trashAttachment',
'click .edit-attachment': 'editAttachment',
'click .refresh-attachment': 'refreshAttachment',
'click .edit-image': 'handleEditImageClick'
'click .edit-image': 'handleEditImageClick',
'click .view-attachment': 'handleViewAttachmentClick'
},
initialize: function() {
@@ -328,6 +329,13 @@
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