Make WordPress Core


Ignore:
Timestamp:
11/07/2008 03:13:50 AM (16 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/categories.php

    r9557 r9560  
    290290</div><!-- /wrap -->
    291291
     292<script type="text/javascript">
     293/* <![CDATA[ */
     294(function($){
     295    $(document).ready(function(){
     296        $('#doaction, #doaction2').click(function(){
     297            if ( $('select[name^="action"]').val() == 'delete' ) {
     298                var n = $('#the-list input[type="checkbox"]:checked').length;
     299                var m = n > 1 ? '<?php echo js_escape(__("You are about to delete the selected categories.\n  'Cancel' to stop, 'OK' to delete.")); ?>' : '<?php echo js_escape(__("You are about to delete the selected category.\n  'Cancel' to stop, 'OK' to delete.")); ?>';
     300                return showNotice.warn(m);
     301            }
     302        });
     303    });
     304})(jQuery);
     305/* ]]> */
     306</script>
     307
    292308<?php
    293309inline_edit_term_row('category');
Note: See TracChangeset for help on using the changeset viewer.