Ignore:
Timestamp:
Feb 10, 2012, 1:30:15 PM (12 years ago)
Author:
plg
Message:

feature 2565 added: pending comments screen, highlight selected comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/comments.tpl

    r9586 r13078  
    11{footer_script}{literal}
    22jQuery(document).ready(function(){
     3  function highlighComments() {
     4    jQuery(".checkComment").each(function() {
     5      var parent = jQuery(this).parent('tr');
     6      if (jQuery(this).children("input[type=checkbox]").is(':checked')) {
     7        jQuery(parent).addClass('selectedComment');
     8      }
     9      else {
     10        jQuery(parent).removeClass('selectedComment');
     11      }
     12    });
     13  }
     14
    315  jQuery(".checkComment").click(function(event) {
    416    if (event.target.type !== 'checkbox') {
    517      var checkbox = jQuery(this).children("input[type=checkbox]");
    618      jQuery(checkbox).attr('checked', !jQuery(checkbox).is(':checked'));
     19      highlighComments();
    720    }
    821  });
     
    1023  jQuery("#commentSelectAll").click(function () {
    1124    jQuery(".checkComment input[type=checkbox]").attr('checked', true);
     25    highlighComments();
    1226    return false;
    1327  });
     
    1529  jQuery("#commentSelectNone").click(function () {
    1630    jQuery(".checkComment input[type=checkbox]").attr('checked', false);
     31    highlighComments();
    1732    return false;
    1833  });
     
    2237      jQuery(this).attr('checked', !$(this).is(':checked'));
    2338    });
     39    highlighComments();
    2440    return false;
    2541  });
Note: See TracChangeset for help on using the changeset viewer.