From 58aa3b03b63bda8496a953a936ef847a611a52c9 Mon Sep 17 00:00:00 2001
From: ulrich <ulrich>
Date: Tue, 19 May 2020 14:02:12 +0000
Subject: [PATCH] Abmelden fertig, neues UI und neues Profil aktiviert 

---
 web/profil/app.js |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/web/profil2/app.js b/web/profil/app.js
similarity index 92%
rename from web/profil2/app.js
rename to web/profil/app.js
index b1b7b41..cd6ccc1 100644
--- a/web/profil2/app.js
+++ b/web/profil/app.js
@@ -3,6 +3,7 @@
   this.cache = {}; // mustache template cache
 
   this.init = function () {
+    document.querySelector('#top-logout-btn').addEventListener('click', self.logout);
     var dlg = document.querySelector(".dialog");
     dlg.style.flexBasis = '0em';
     document.querySelector('.west').style.flexBasis = '0em';
@@ -64,6 +65,15 @@
     });
   };
 
+  this.logout = function() {
+    var m = '?c=de.uhilger.um.pub.SessionManager&m=expireSession';
+    var u = '../pub' + m;
+    self.http_get(u, function (resp) {
+      //$('#userMenu').text('nicht angemeldet');
+      window.location.href = '../logout.jsp';
+    });
+  };
+
   /* -------- ajax helper functions ----------- */
   
   this.http_get = function(u, cb)  {

--
Gitblit v1.9.3