Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fix some issues with the browserID javascript code

Roland Geider5f1979ec1b58
diff --git a/manager/static/js/browserid.js b/manager/static/js/browserid.js
index 789c2d521..3069194bf 100644
--- a/manager/static/js/browserid.js
+++ b/manager/static/js/browserid.js
@@ -34,11 +34,12 @@
});
$('.browserid-logout').bind('click', function(e) {
- e.preventDefault();
- navigator.id.logout(); // Clears User Agent BrowserID state.
+ // Clears User Agent BrowserID state.
+ navigator.id.logout();
});
navigator.id.watch({
+
onlogin: function(assertion) {
if (assertion) {
var $e = $('#id_assertion');
@@ -48,12 +49,8 @@
},
onlogout: function() {
- $.ajax({
- type: 'GET',
- url: '/logout',
- success: function(res, status, xhr) { window.location.reload(); },
- error: function(xhr, status, err) { alert("logout failure: " + err); }
- });
+ // No functionality here
+ //console.debug('navigator.id.watch onLogout');
}
});
});