comparison media/js/forums.js @ 98:d0d779dd0832

Forums: flag posts.
author Brian Neal <bgneal@gmail.com>
date Sun, 13 Sep 2009 21:45:35 +0000
parents 23035afdeae8
children 10d6182b9f6e
comparison
equal deleted inserted replaced
97:96eec1ed0fd3 98:d0d779dd0832
29 postButton.removeAttr('disabled').val('Submit Reply'); 29 postButton.removeAttr('disabled').val('Submit Reply');
30 } 30 }
31 }); 31 });
32 return false; 32 return false;
33 }); 33 });
34 $('a.post-flag').click(function () {
35 var id = this.id;
36 if (id.match(/fp-(\d)/)) {
37 id = RegExp.$1;
38 if (confirm('Only flag a post if you feel it is spam, abuse, violates site rules, ' +
39 'or is not appropriate. ' +
40 'A moderator will be notified and will review the post. ' +
41 'Are you sure you want to flag this post?')) {
42 $.post('/forums/flag-post/', { id : id }, function(response) {
43 alert(response);
44 }, 'text');
45 }
46 }
47 return false;
48 });
34 $('#id_body').markItUp(mySettings); 49 $('#id_body').markItUp(mySettings);
35 }); 50 });