mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Clean up some big-mod-buttons frontend code.
This commit is contained in:
@@ -1103,6 +1103,11 @@ a.star { text-decoration: none; color: #ff8b60 }
|
||||
|
||||
.entry .buttons a:hover {text-decoration: underline}
|
||||
|
||||
.entry .buttons .status-msg {
|
||||
display: none;
|
||||
margin-right: .5em;
|
||||
}
|
||||
|
||||
/* links */
|
||||
|
||||
.toggle .error { font-size: x-small; }
|
||||
|
||||
@@ -1135,24 +1135,16 @@ function big_mod_action(elem, dir) {
|
||||
id: thing_id
|
||||
};
|
||||
|
||||
elem.siblings(".status-msg").hide();
|
||||
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
|
||||
};
|
||||
d.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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,13 +140,13 @@
|
||||
%endif
|
||||
|
||||
 
|
||||
<span class="spammed" style="display:none">
|
||||
<span class="status-msg spammed">
|
||||
${_("spammed")}
|
||||
</span>
|
||||
<span class="removed" style="display:none">
|
||||
<span class="status-msg removed">
|
||||
${_("removed")}
|
||||
</span>
|
||||
<span class="approved" style="display:none">
|
||||
<span class="status-msg approved">
|
||||
${_("approved")}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user