From 8a5b6f18c65a824f1cbf871bd9c71ff1fa4eaa99 Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 4 Jun 2009 11:10:39 -0700 Subject: [PATCH] Hovering over a link shows where it goes, even with the toolbar pref --- r2/r2/models/link.py | 12 ++++++++---- r2/r2/templates/link.html | 5 ++++- r2/r2/templates/link.htmllite | 13 +++++++++++-- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/r2/r2/models/link.py b/r2/r2/models/link.py index f109f0547..034828529 100644 --- a/r2/r2/models/link.py +++ b/r2/r2/models/link.py @@ -334,11 +334,15 @@ class Link(Thing, Printable): get_domain(cname = c.cname, subreddit=False), item._id36) - item.click_url = item.url if item.is_self: - item.click_url = item.permalink - elif c.user.pref_frame: - item.click_url = item.tblink + item.href_url = item.permalink + else: + item.href_url = item.url + + if c.user.pref_frame: + item.mousedown_url = item.tblink + else: + item.mousedown_url = None item.fresh = not any((item.likes != None, item.saved, diff --git a/r2/r2/templates/link.html b/r2/r2/templates/link.html index cd7ca1373..8d552f569 100644 --- a/r2/r2/templates/link.html +++ b/r2/r2/templates/link.html @@ -44,7 +44,7 @@ <%def name="make_link(name, css_class)"> ${caller.body()} diff --git a/r2/r2/templates/link.htmllite b/r2/r2/templates/link.htmllite index ed0d636d8..42bf39904 100644 --- a/r2/r2/templates/link.htmllite +++ b/r2/r2/templates/link.htmllite @@ -55,8 +55,17 @@ ${optionalstyle("margin-left: 28px; min-height:32px;")} %endif > - + ${thing.title} %if not expanded: