WordPress.org

Plugin Directory

Changeset 427911


Ignore:
Timestamp:
08/24/11 01:27:24 (3 years ago)
Author:
dd32
Message:

Don't display Error message when no items were selected; Don't visually select disabled elements

Location:
revision-control/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • revision-control/trunk/readme.txt

    r425829 r427911  
    2121 
    2222== Changelog == 
     23 
     24= 2.1.1 = 
     25 * Portuguese Translation from PedroDM of development.mowster.net 
     26 * Don't make people think it'll delete the current revisions 
     27 * Don't give strange error when no revisions are selected 
    2328 
    2429= 2.1 = 
  • revision-control/trunk/revision-control.js

    r425827 r427911  
    11jQuery(document).ready( function($) { 
    2  
    3     $('a#revision-compare-delete-label').bind('click', function () { 
    4         $(this).parents('table').find('.check-column input.toggle-type, tfoot input.toggle-type').toggle(); 
    5     }); 
    62 
    73    $('#post-revisions a.delete').click( function() { 
     
    95    }); 
    106 
     7    $('#revisionsdiv thead th.check-column :checkbox').change( function() { 
     8        $('#revisionsdiv tbody :checkbox:checked:disabled').each( function(i, element) { 
     9            this.checked = false; 
     10        }); 
     11    }); 
     12 
    1113    $('#revisions-delete').bind('click', function () { 
     14        var checked = []; 
     15        $('#revisionsdiv tbody :checkbox:checked').not(':disabled').each(function(i, element) { 
     16           checked[checked.length] = $(element).val(); 
     17           $(element).parents('tr').css('background-color', '#f7d2d6'); 
     18        }); 
     19 
     20        if ( !checked.length ) 
     21            return; 
     22 
    1223        if ( !confirm( RevisionControl.deleterevisions ) ) 
    1324            return; 
    1425 
    15         var checked = []; 
    16         $('#revisionsdiv :checkbox').each(function(i, element) { 
    17                                                if ( $(element).is(':checked') ) { 
    18                                                    checked[checked.length] = $(element).val(); 
    19                                                    $(element).parents('tr').css('background-color', '#f7d2d6'); 
    20                                                 } 
    21                                             }); 
    2226        $.post('admin-post.php', { 
    2327            action: 'revision-control-delete', 
  • revision-control/trunk/revision-control.php

    r425827 r427911  
    8181            if ( post_type_supports($type, 'revisions') ) { 
    8282                remove_meta_box('revisionsdiv', $type, 'normal'); 
    83                 add_meta_box('revisionsdiv', __('Post Revisions'), array('Plugin_Revision_Control_UI', 'revisions_meta_box'), $type, 'normal'); 
     83                add_meta_box('revisionsdiv', __('Post Revisions', 'revision-control'), array('Plugin_Revision_Control_UI', 'revisions_meta_box'), $type, 'normal'); 
    8484            } 
    8585        } 
Note: See TracChangeset for help on using the changeset viewer.