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:
@@ -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;
|
||||
|
||||
2
wp-includes/js/media-grid.min.js
vendored
2
wp-includes/js/media-grid.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user