X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=auth%2Fstatic%2Fjs%2Flogout.js;h=3419b9d240642a052f10e66c32616421e7766b74;hb=111d0fcb9681bf94ff184fe43bf636b6d672cbff;hp=9c9b45326cbc109b240ac5fa6be55392d27cd86a;hpb=a7337c66c2c7c3312c4205a8119252f04a1fbd58;p=unfold.git diff --git a/auth/static/js/logout.js b/auth/static/js/logout.js index 9c9b4532..3419b9d2 100644 --- a/auth/static/js/logout.js +++ b/auth/static/js/logout.js @@ -4,7 +4,10 @@ function logout () { var username=$(this).data('username'); var msg="Are you sure you want to logout as " + username + " ?"; /* redirect to /logout, see urls.py */ - if (confirm(msg)) window.location="/logout/"; + if (confirm(msg)){ + localStorage.clear(); + window.location="/logout/"; + } } /* attach this function to the logout button */ $(document).ready(function() { $('#logout').click(logout); $('#logoutbtn').click(logout); });