comparison media/js/forums_mod.js @ 112:d1b0b86441c0

Forums: added a sync() function on the forum model. Created javascript for the moderate forum function to drive the master topic select checkbox.
author Brian Neal <bgneal@gmail.com>
date Wed, 30 Sep 2009 00:42:13 +0000
parents
children
comparison
equal deleted inserted replaced
111:e5faf9f0c11a 112:d1b0b86441c0
1 $(document).ready(function() {
2 var master = $('#forums-master-topic');
3 var topics = $('.forums-topic_check');
4 master.click(function() {
5 var state = this.checked;
6 topics.each(function() {
7 this.checked = state;
8 });
9 });
10 topics.click(function() {
11 if (master[0].checked && !this.checked) {
12 master[0].checked = false;
13 }
14 });
15 });