When MEDIA_TRASH is true, show the proper context in the attachment-details sidebar. Without this fix, it always showed "Delete Permanently."

Props toszcze.
Fixes #26783.



git-svn-id: https://develop.svn.wordpress.org/trunk@27454 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-03-07 16:41:49 +00:00
parent 69cf45e4dd
commit a8bc73c543
3 changed files with 22 additions and 4 deletions
+11
View File
@@ -5933,6 +5933,7 @@
'change [data-setting] select': 'updateSetting',
'change [data-setting] textarea': 'updateSetting',
'click .delete-attachment': 'deleteAttachment',
'click .trash-attachment': 'trashAttachment',
'click .edit-attachment': 'editAttachment',
'click .refresh-attachment': 'refreshAttachment'
},
@@ -5970,7 +5971,17 @@
this.model.destroy();
}
},
/**
* @param {Object} event
*/
trashAttachment: function( event ) {
event.preventDefault();
this.model.destroy();
},
/**
* @param {Object} event
*/
editAttachment: function( event ) {
event.preventDefault();
this.controller.setState( 'edit-image' );