mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-07 08:07:16 +00:00
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:
@@ -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' );
|
||||
|
||||
Reference in New Issue
Block a user