login.js: Redirect appropriately from login popup.

The login popup redirects to a link's href if one is present. This works for
all links, except for the login link which is hrefed to /login for middle
clickability. This ignores the login href specifically which results in the
current page being reloaded correctly.
This commit is contained in:
Ricky Ramirez
2013-05-15 14:51:38 -07:00
parent 38535c08fc
commit c1c55f638a

View File

@@ -119,7 +119,7 @@ r.login.ui = {
var el = $(e.target),
href = el.attr('href'),
dest
if (href && href != '#') {
if (href && href != '#' && !/\/login\/?$/.test(href)) {
// User clicked on a link that requires login to continue
dest = href
} else {