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/edit-pages.php

    r9558 r9560  
    306306</div>
    307307
     308<script type="text/javascript">
     309/* <![CDATA[ */
     310(function($){
     311    $(document).ready(function(){
     312        $('#doaction, #doaction2').click(function(){
     313            if ( $('select[name^="action"]').val() == 'delete' ) {
     314                var n = $('table.post input[type="checkbox"]:checked').length;
     315                var m = n > 1 ? '<?php echo js_escape(__("You are about to delete the selected pages.\n  'Cancel' to stop, 'OK' to delete.")); ?>' : '<?php echo js_escape(__("You are about to delete the selected page.\n  'Cancel' to stop, 'OK' to delete.")); ?>';
     316                return showNotice.warn(m);
     317            }
     318        });
     319    });
     320})(jQuery);
     321/* ]]> */
     322</script>
     323
    308324<?php include('admin-footer.php'); ?>
Note: See TracChangeset for help on using the changeset viewer.