mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-27 14:53:08 +02: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. Built from https://develop.svn.wordpress.org/trunk@27454 git-svn-id: http://core.svn.wordpress.org/trunk@27300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3b212f7e0f
commit
818bf7c6af
@ -1388,7 +1388,8 @@
|
|||||||
|
|
||||||
.attachment-info .edit-attachment,
|
.attachment-info .edit-attachment,
|
||||||
.attachment-info .refresh-attachment,
|
.attachment-info .refresh-attachment,
|
||||||
.attachment-info .delete-attachment {
|
.attachment-info .delete-attachment,
|
||||||
|
.attachment-info .trash-attachment {
|
||||||
display: block;
|
display: block;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -1404,11 +1405,13 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachment-info .delete-attachment {
|
.attachment-info .delete-attachment,
|
||||||
|
.attachment-info .trash-attachment {
|
||||||
color: #bc0b0b;
|
color: #bc0b0b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachment-info .delete-attachment:hover {
|
.attachment-info .delete-attachment:hover,
|
||||||
|
.attachment-info .trash-attachment:hover {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
wp-includes/css/media-views-rtl.min.css
vendored
2
wp-includes/css/media-views-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@ -1388,7 +1388,8 @@
|
|||||||
|
|
||||||
.attachment-info .edit-attachment,
|
.attachment-info .edit-attachment,
|
||||||
.attachment-info .refresh-attachment,
|
.attachment-info .refresh-attachment,
|
||||||
.attachment-info .delete-attachment {
|
.attachment-info .delete-attachment,
|
||||||
|
.attachment-info .trash-attachment {
|
||||||
display: block;
|
display: block;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -1404,11 +1405,13 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachment-info .delete-attachment {
|
.attachment-info .delete-attachment,
|
||||||
|
.attachment-info .trash-attachment {
|
||||||
color: #bc0b0b;
|
color: #bc0b0b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachment-info .delete-attachment:hover {
|
.attachment-info .delete-attachment:hover,
|
||||||
|
.attachment-info .trash-attachment:hover {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
wp-includes/css/media-views.min.css
vendored
2
wp-includes/css/media-views.min.css
vendored
File diff suppressed because one or more lines are too long
@ -5933,6 +5933,7 @@
|
|||||||
'change [data-setting] select': 'updateSetting',
|
'change [data-setting] select': 'updateSetting',
|
||||||
'change [data-setting] textarea': 'updateSetting',
|
'change [data-setting] textarea': 'updateSetting',
|
||||||
'click .delete-attachment': 'deleteAttachment',
|
'click .delete-attachment': 'deleteAttachment',
|
||||||
|
'click .trash-attachment': 'trashAttachment',
|
||||||
'click .edit-attachment': 'editAttachment',
|
'click .edit-attachment': 'editAttachment',
|
||||||
'click .refresh-attachment': 'refreshAttachment'
|
'click .refresh-attachment': 'refreshAttachment'
|
||||||
},
|
},
|
||||||
@ -5970,7 +5971,17 @@
|
|||||||
this.model.destroy();
|
this.model.destroy();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* @param {Object} event
|
||||||
|
*/
|
||||||
|
trashAttachment: function( event ) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
this.model.destroy();
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @param {Object} event
|
||||||
|
*/
|
||||||
editAttachment: function( event ) {
|
editAttachment: function( event ) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.controller.setState( 'edit-image' );
|
this.controller.setState( 'edit-image' );
|
||||||
|
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
@ -217,7 +217,11 @@ function wp_print_media_templates() {
|
|||||||
<# } #>
|
<# } #>
|
||||||
|
|
||||||
<# if ( ! data.uploading && data.can.remove ) { #>
|
<# if ( ! data.uploading && data.can.remove ) { #>
|
||||||
<a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
|
<?php if ( MEDIA_TRASH ): ?>
|
||||||
|
<a class="trash-attachment" href="#"><?php _e( 'Trash' ); ?></a>
|
||||||
|
<?php else: ?>
|
||||||
|
<a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
|
||||||
|
<?php endif; ?>
|
||||||
<# } #>
|
<# } #>
|
||||||
|
|
||||||
<div class="compat-meta">
|
<div class="compat-meta">
|
||||||
|
Loading…
Reference in New Issue
Block a user