Spam and remove options for big_modbuttons.

This commit is contained in:
bsimpson63
2012-03-06 15:01:45 -08:00
parent 2a8876bfb6
commit f5b829bcb8
2 changed files with 17 additions and 1 deletions

View File

@@ -1137,10 +1137,21 @@ function big_mod_action(elem, dir) {
if (dir == -1) {
$.request("remove", d, null, true);
elem.siblings(".spammed").show();
elem.siblings(".removed").hide();
elem.siblings(".approved").hide();
} else if (dir == -2) {
d = {
id: thing_id,
spam: false
};
$.request("remove", d, null, true);
elem.siblings(".spammed").hide();
elem.siblings(".removed").show();
elem.siblings(".approved").hide();
} else if (dir == 1) {
$.request("approve", d, null, true);
elem.siblings(".spammed").hide();
elem.siblings(".removed").hide();
elem.siblings(".approved").show();
}

View File

@@ -125,8 +125,10 @@
${pretty_button(_("confirm %(obj)s removal") % dict(obj=kind),
"big_mod_action", -1, "negative")}
%else:
${pretty_button(_("remove %(obj)s") % dict(obj=kind),
${pretty_button(_("spam %(obj)s") % dict(obj=kind),
"big_mod_action", -1, "negative")}
${pretty_button(_("remove %(obj)s") % dict(obj=kind),
"big_mod_action", -2, "negative")}
%endif
%if getattr(thing, "approval_checkmark", None):
@@ -138,6 +140,9 @@
%endif
 
<span class="spammed" style="display:none">
${_("spammed")}
</span>
<span class="removed" style="display:none">
${_("removed")}
</span>