Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 5 commits
  • 5 files changed
  • 0 commit comments
  • 2 contributors
View
BIN r2/r2/public/static/bg-button-neutral-pressed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN r2/r2/public/static/bg-button-neutral-unpressed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
25 r2/r2/public/static/css/reddit.css
@@ -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; }
@@ -4558,23 +4563,35 @@ a.pretty-button:hover { text-decoration: none !important }
outline-style: none;
}
-a.pretty-button.negative {
+a.pretty-button {
color: black;
+}
+
+a.pretty-button.pressed {
+ color: white;
+}
+
+a.pretty-button.negative {
background-image: url(../bg-button-negative-unpressed.png); /* SPRITE stretch-x */
}
a.pretty-button.negative.pressed {
- color: white;
background-image: url(../bg-button-negative-pressed.png); /* SPRITE stretch-x */
}
+a.pretty-button.neutral {
+ background-image: url(../bg-button-neutral-unpressed.png); /* SPRITE stretch-x */
+}
+
+a.pretty-button.neutral.pressed {
+ background-image: url(../bg-button-neutral-pressed.png); /* SPRITE stretch-x */
+}
+
a.pretty-button.positive {
- color: black;
background-image: url(../bg-button-positive-unpressed.png); /* SPRITE stretch-x */
}
a.pretty-button.positive.pressed {
- color: white;
background-image: url(../bg-button-positive-pressed.png); /* SPRITE stretch-x */
}
View
7 r2/r2/public/static/js/reddit.js
@@ -1135,13 +1135,16 @@ function big_mod_action(elem, dir) {
id: thing_id
};
+ elem.siblings(".status-msg").hide();
if (dir == -1) {
+ d.spam = false;
$.request("remove", d, null, true);
elem.siblings(".removed").show();
- elem.siblings(".approved").hide();
+ } else if (dir == -2) {
+ $.request("remove", d, null, true);
+ elem.siblings(".spammed").show();
} else if (dir == 1) {
$.request("approve", d, null, true);
- elem.siblings(".removed").hide();
elem.siblings(".approved").show();
}
}
View
11 r2/r2/templates/printablebuttons.html
@@ -125,8 +125,10 @@
${pretty_button(_("confirm %(obj)s removal") % dict(obj=kind),
"big_mod_action", -1, "negative")}
%else:
+ ${pretty_button(_("spam %(obj)s") % dict(obj=kind),
+ "big_mod_action", -2, "negative")}
${pretty_button(_("remove %(obj)s") % dict(obj=kind),
- "big_mod_action", -1, "negative")}
+ "big_mod_action", -1, "neutral")}
%endif
%if getattr(thing, "approval_checkmark", None):
@@ -138,10 +140,13 @@
%endif
 
- <span class="removed" style="display:none">
+ <span class="status-msg spammed">
+ ${_("spammed")}
+ </span>
+ <span class="status-msg removed">
${_("removed")}
</span>
- <span class="approved" style="display:none">
+ <span class="status-msg approved">
${_("approved")}
</span>
</span>

No commit comments for this range

Something went wrong with that request. Please try again.