diff --git a/r2/r2/public/static/js/jquery.reddit.js b/r2/r2/public/static/js/jquery.reddit.js index f36e454bd..835213927 100644 --- a/r2/r2/public/static/js/jquery.reddit.js +++ b/r2/r2/public/static/js/jquery.reddit.js @@ -216,7 +216,7 @@ $.fn.vote = function(vh, callback) { /* let the user vote only if they are logged in */ if(reddit.logged) { things.each(function() { - var entry = $(this).find(".entry:first"); + var entry = $(this).find(".entry:first, .midcol:first"); if(dir > 0) entry.addClass('likes').removeClass('dislikes'); else if(dir < 0) diff --git a/r2/r2/public/static/js/reddit.js b/r2/r2/public/static/js/reddit.js index 159424044..0bc1964fb 100644 --- a/r2/r2/public/static/js/reddit.js +++ b/r2/r2/public/static/js/reddit.js @@ -525,7 +525,7 @@ function updateEventHandlers(thing) { .filter(":visible").trigger("onshow"); /* click on a title.. */ - $(thing).find("a.title").mousedown(function() { + $(thing).find("a.title, a.comments").mousedown(function() { /* the site is either stored in the sr dict, or we are on * an sr and it is the current one */ var sr = reddit.sr[$(this).thing_id()] || reddit.cur_site; diff --git a/r2/r2/templates/comment.html b/r2/r2/templates/comment.html index 85ffd650e..2f6fd8bda 100644 --- a/r2/r2/templates/comment.html +++ b/r2/r2/templates/comment.html @@ -30,8 +30,8 @@ ### specific fill-in functions for comment ################## -<%def name="midcol(display=True)"> -${parent.midcol(not thing.collapsed)} +<%def name="midcol(display=True, cls = '')"> +${parent.midcol(not thing.collapsed, cls = cls)} <%def name="ParentDiv()"> diff --git a/r2/r2/templates/comment_skeleton.html b/r2/r2/templates/comment_skeleton.html index 155780837..14a30420d 100644 --- a/r2/r2/templates/comment_skeleton.html +++ b/r2/r2/templates/comment_skeleton.html @@ -23,9 +23,9 @@ <%inherit file="printable.html"/> <%namespace file="utils.html" import="plain_link" /> -<%def name="midcol(display=True)"> +<%def name="midcol(display=True, cls = '')"> %if c.profilepage or (not thing._deleted and (not thing._spam or c.user == thing.author or c.user_is_admin)): -${parent.midcol(display=display)} +${parent.midcol(display=display, cls = cls)} %endif diff --git a/r2/r2/templates/link.html b/r2/r2/templates/link.html index 1d6b082db..a334e15e8 100644 --- a/r2/r2/templates/link.html +++ b/r2/r2/templates/link.html @@ -83,8 +83,8 @@ -<%def name="midcol(display=True)"> -
+
${self.arrow(thing, 1, thing.likes)} %if thing.hide_score: diff --git a/r2/r2/templates/linkcompressed.html b/r2/r2/templates/linkcompressed.html index c501fe8e4..a07de43eb 100644 --- a/r2/r2/templates/linkcompressed.html +++ b/r2/r2/templates/linkcompressed.html @@ -35,8 +35,8 @@ -<%def name="midcol(display=True)"> -
+
${self.arrow(thing, 1, thing.likes)} ${self.arrow(thing, 0, thing.likes == False)} diff --git a/r2/r2/templates/message.html b/r2/r2/templates/message.html index 2086c890f..a8b98973d 100644 --- a/r2/r2/templates/message.html +++ b/r2/r2/templates/message.html @@ -26,7 +26,7 @@ <%inherit file="comment_skeleton.html"/> ## disable voting arrows -<%def name="midcol()"> +<%def name="midcol(cls='')"> diff --git a/r2/r2/templates/morechildren.html b/r2/r2/templates/morechildren.html index 5673ef751..c344e2122 100644 --- a/r2/r2/templates/morechildren.html +++ b/r2/r2/templates/morechildren.html @@ -50,6 +50,6 @@ load more comments  (${thing.count} ${ungettext("reply", <%def name="tagline(collapse=False)"> -<%def name="midcol()"> +<%def name="midcol(cls = '')"> diff --git a/r2/r2/templates/morerecursion.html b/r2/r2/templates/morerecursion.html index dae165a7b..690fdda3d 100644 --- a/r2/r2/templates/morerecursion.html +++ b/r2/r2/templates/morerecursion.html @@ -41,6 +41,6 @@ <%def name="tagline(collapse=False)"> -<%def name="midcol()"> +<%def name="midcol(cls='')"> diff --git a/r2/r2/templates/printable.html b/r2/r2/templates/printable.html index aa6632229..f5e927b71 100644 --- a/r2/r2/templates/printable.html +++ b/r2/r2/templates/printable.html @@ -77,7 +77,6 @@ thing id-${what._fullname} ${self.ParentDiv()}

${self.numcol()} - ${self.midcol()} <% like_cls = "unvoted" if getattr(thing, "likes", None): @@ -85,6 +84,7 @@ thing id-${what._fullname} elif getattr(thing, "likes", None) is False: like_cls = "dislikes" %> + ${self.midcol(cls = like_cls)}
${self.entry()}
@@ -218,8 +218,8 @@ thing id-${what._fullname} -<%def name="midcol(display=True)"> -
+
${self.arrow(thing, 1, thing.likes)} ${self.arrow(thing, 0, thing.likes == False)} diff --git a/r2/r2/templates/subreddit.html b/r2/r2/templates/subreddit.html index 0276acc5a..bb4930ea1 100644 --- a/r2/r2/templates/subreddit.html +++ b/r2/r2/templates/subreddit.html @@ -98,7 +98,7 @@ -<%def name="midcol(display=True)"> +<%def name="midcol(display=True, cls='')">
${addremove_button(thing)} ${permission_icons(thing)}