view gpp/forums/static/js/forums_mod.js @ 445:e9f203c5f5bb

Attempting to fix #218; update the topic last visit time with 'now' when viewing the last page of a topic, otherwise use the creation time of the last post on the page.
author Brian Neal <bgneal@gmail.com>
date Wed, 08 Jun 2011 00:24:41 +0000
parents 88b2b9cb8c1f
children
line wrap: on
line source
$(document).ready(function() {
   var master = $('#forums-master-topic');
   var topics = $('.forums-topic_check');
   master.click(function() {
      var state = this.checked;
      topics.each(function() {
         this.checked = state;
      });
   });
   topics.click(function() {
      if (master[0].checked && !this.checked) {
         master[0].checked = false;
      }
   });
});