Make WordPress Core


Ignore:
Timestamp:
11/07/2008 03:13:50 AM (18 years ago)
Author:
azaozz
Message:

Display warning when bulk deleting posts, pages, attachments, comments, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit.php

    r9557 r9560  
    321321</div>
    322322
     323<script type="text/javascript">
     324/* <![CDATA[ */
     325(function($){
     326        $(document).ready(function(){
     327                $('#doaction, #doaction2').click(function(){
     328                        if ( $('select[name^="action"]').val() == 'delete' ) {
     329                                var n = $('table.post input[type="checkbox"]:checked').length;
     330                                var m = n > 1 ? '<?php echo js_escape(__("You are about to delete the selected posts.\n  'Cancel' to stop, 'OK' to delete.")); ?>' : '<?php echo js_escape(__("You are about to delete the selected post.\n  'Cancel' to stop, 'OK' to delete.")); ?>';
     331                                return showNotice.warn(m);
     332                        }
     333                });
     334        });
     335})(jQuery);
     336/* ]]> */
     337</script>
     338
    323339<?php include('admin-footer.php'); ?>
Note: See TracChangeset for help on using the changeset viewer.