mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Display warning when bulk deleting posts, pages, attachments, comments, etc.
git-svn-id: https://develop.svn.wordpress.org/trunk@9560 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+12
-9
@@ -450,21 +450,24 @@ endif; // posts;
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
$('#doaction').click(function(e) {
|
||||
if ( 'attach' == $('#posts-filter select[name="action"]').val() ) {
|
||||
e.preventDefault();
|
||||
findPosts.open();
|
||||
}
|
||||
});
|
||||
$('#doaction2').click(function(e) {
|
||||
if ( 'attach' == $('#posts-filter select[name="action2"]').val() ) {
|
||||
/* <![CDATA[ */
|
||||
(function($){
|
||||
$(document).ready(function(){
|
||||
$('#doaction, #doaction2').click(function(e){
|
||||
if ( $('select[name^="action"]').val() == 'delete' ) {
|
||||
var n = $('#the-list input[type="checkbox"]:checked').length;
|
||||
var m = n > 1 ? '<?php echo js_escape(__("You are about to delete the selected attachments.\n 'Cancel' to stop, 'OK' to delete.")); ?>' : '<?php echo js_escape(__("You are about to delete the selected attachment.\n 'Cancel' to stop, 'OK' to delete.")); ?>';
|
||||
return showNotice.warn(m);
|
||||
} else if ( $('select[name^="action"]').val() == 'attach' ) {
|
||||
e.preventDefault();
|
||||
findPosts.open();
|
||||
}
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
include('admin-footer.php');
|
||||
|
||||
Reference in New Issue
Block a user