Skip to content
Snippets Groups Projects
Commit 251940d6 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

Merge cookies disabled fix for browserid.org - closes #1201, closes #1202

parents 5392c5ce 20fcd205
No related branches found
No related tags found
No related merge requests found
......@@ -70,21 +70,35 @@ $(function() {
});
var ANIMATION_TIME = 500;
user.checkAuthentication(function(authenticated) {
$(".display_always").fadeIn(ANIMATION_TIME);
dom.addClass("body", authenticated ? "authenticated" : "not_authenticated");
if (authenticated) {
$(".display_auth").fadeIn(ANIMATION_TIME);
if ($('#emailList').length) {
bid.manageAccount();
}
network.cookiesEnabled(function(cookiesEnabled) {
if(cookiesEnabled) {
user.checkAuthentication(function(authenticated) {
if (authenticated) {
displayAuthenticated();
}
else {
displayNonAuthenticated();
}
});
}
else {
$(".display_nonauth").fadeIn(ANIMATION_TIME);
displayNonAuthenticated();
}
});
function displayAuthenticated() {
$(".display_always").fadeIn(ANIMATION_TIME);
dom.addClass("body", "authenticated");
$(".display_auth").fadeIn(ANIMATION_TIME);
if ($('#emailList').length) {
bid.manageAccount();
}
}
function displayNonAuthenticated() {
$(".display_always").fadeIn(ANIMATION_TIME);
dom.addClass("body", "not_authenticated");
$(".display_nonauth").fadeIn(ANIMATION_TIME);
}
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment