new style, first version (header, login, dashboard)
[myslice.git] / auth / static / js / logout.js
index 1e140a9..c417bb5 100644 (file)
@@ -1,7 +1,7 @@
 /* retrieve username from the button that is clicked, the one named 'logout' 
    and that is expected to have the 'username' attribute */
 function logout () {
-    var username=$(this).attr('username');
+    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/";