Merge pull request #386 from adarqui/issue-login-redirect-40x

Issue login redirect 40x
This commit is contained in:
Julian Lam
2013-10-06 11:12:19 -07:00
2 changed files with 7 additions and 3 deletions

View File

@@ -117,7 +117,8 @@ var ajaxify = {};
if (hrefEmpty(this.href) || this.target !== '' || this.protocol === 'javascript:')
return;
app.previousUrl = window.location.href;
if(!window.location.pathname.match(/\/(403|404)$/g))
app.previousUrl = window.location.href;
if (!e.ctrlKey && e.which === 1) {
if (this.host === window.location.host) {
@@ -192,4 +193,4 @@ var ajaxify = {};
}
}
}(jQuery));
}(jQuery));

View File

@@ -35,6 +35,9 @@ define(function() {
$('#login-error-notify').show();
} else {
$('#login-error-notify').hide();
if(!app.previousUrl) { app.previousUrl = '/'; }
if(app.previousUrl.indexOf('/reset/') != -1)
window.location.replace(RELATIVE_PATH + "/?loggedin");
else
@@ -63,4 +66,4 @@ define(function() {
};
return Login;
});
});