From 6d7130bffc2e124c9eed9fca3f772dcbd620fd12 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 13 Nov 2008 05:17:58 +0000 Subject: Progress is being made... you can now logout --- themes/default/js/login.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'themes/default/js') diff --git a/themes/default/js/login.js b/themes/default/js/login.js index e08897df..5acc711f 100644 --- a/themes/default/js/login.js +++ b/themes/default/js/login.js @@ -3,6 +3,10 @@ $(document).ready(function() { process_login(); return false; }); + $("#gLogoutLink").click(function() { + process_logout(); + return false; + }); }); function show_login() { @@ -46,4 +50,20 @@ function process_login() { } } }); +} + +function process_logout() { + $.ajax({ + url: $("#gLogoutLink").attr("href"), + type: "GET", + dataType: "json", + error: function(XMLHttpRequest, textStatus, errorThrown) { + alert("textStatus: " + textStatus + "\nerrorThrown: " + errorThrown); + }, + success: function(data, textStatus) { + if (data.logout) { + window.location.reload(); + } + } + }); } \ No newline at end of file -- cgit v1.2.3