Mercurial > public > sg101
view media/js/forums_mod.js @ 231:a2d388ed106e
Guard against the request object not having a user attribute in my Who's online middleware. This can happen if a redirect is issued before the authentication middleware gets to run.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 14 Jul 2010 02:35:39 +0000 |
parents | d1b0b86441c0 |
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; } }); });