Mercurial > public > sg101
annotate forums/static/js/forums_mod.js @ 581:ee87ea74d46b
For Django 1.4, rearranged project structure for new manage.py.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 05 May 2012 17:10:48 -0500 |
parents | gpp/forums/static/js/forums_mod.js@88b2b9cb8c1f |
children |
rev | line source |
---|---|
bgneal@312 | 1 $(document).ready(function() { |
bgneal@312 | 2 var master = $('#forums-master-topic'); |
bgneal@312 | 3 var topics = $('.forums-topic_check'); |
bgneal@312 | 4 master.click(function() { |
bgneal@312 | 5 var state = this.checked; |
bgneal@312 | 6 topics.each(function() { |
bgneal@312 | 7 this.checked = state; |
bgneal@312 | 8 }); |
bgneal@312 | 9 }); |
bgneal@312 | 10 topics.click(function() { |
bgneal@312 | 11 if (master[0].checked && !this.checked) { |
bgneal@312 | 12 master[0].checked = false; |
bgneal@312 | 13 } |
bgneal@312 | 14 }); |
bgneal@312 | 15 }); |