From e86f3c41186ab42109aa8e19697a56b38a3ef0df Mon Sep 17 00:00:00 2001
From: ulrich@undisclosed
Date: Sat, 09 May 2020 15:26:26 +0000
Subject: [PATCH] Info-Dialog

---
 web/ui2/js/app.js |   31 +++++++++++++------------------
 1 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/web/ui2/js/app.js b/web/ui2/js/app.js
index 77ebd3c..60b62d6 100644
--- a/web/ui2/js/app.js
+++ b/web/ui2/js/app.js
@@ -7,12 +7,6 @@
   var pfad = '';
   var loc;
   var modus = 'kacheln';
-  var PERS_DIR = "Persoenlich";
-  var PUB_DIR = "Oeffentlich";
-  var DAV_DIR = "Austausch";
-  var BASE_DIR = "$basis";
-  var DATA_DIR = "$daten";
-  var WWW_DIR = "www";
 
   this.datei_neuer_text = function () {
     self.meldung_mit_timeout("Neuer Text", 1500);
@@ -32,6 +26,9 @@
     document.querySelector('.hamburger').addEventListener('click', function (e) {
       self.menue_umschalten();
     });
+    var dlg = document.querySelector(".dialog");
+    dlg.style.flexBasis = '0em';
+    self.seitenleiste_umschalten();
     self.um_get_login();
     self.um_get_user_list();
     self.loc = window.location.protocol + '//' + window.location.host;
@@ -119,21 +116,19 @@
             vurl,
             inhalt,
             function (html) {
-              //dlg.html(html);
-              dlg.style.height = '5em';
-              dlg.innerHTML = html;
-              document.querySelector('.close-btn').addEventListener('click', self.dialog_schliessen);
-              //dlg.slideDown(300);
+              dlg.style.flexBasis = '6em';
+              setTimeout(function () {
+                dlg.innerHTML = html;
+                document.querySelector('.close-btn').addEventListener('click', self.dialog_schliessen);
+              }, 300);
             });
   };
 
   this.dialog_schliessen = function () {
     document.querySelector('.close-btn').removeEventListener('click', self.dialog_schliessen);
-    //$('.dialog').slideUp(300);
     var dlg = document.querySelector('.dialog');
-    //dlg.style.display = "none";
-    dlg.style.height = '0';
     dlg.innerHTML = '';
+    dlg.style.flexBasis = '0em';
   };
 
   /* API functions */
@@ -142,7 +137,7 @@
     //var m = 'getUserNameList';
     var m = 'getUserNameList';
     var u = '../svc/' + m;
-    self.fm_get(u, "json", function (antwort) {
+    self.um_get(u, "json", function (antwort) {
     self.vorlagen.html_erzeugen(
       'data/tpl/inhalt.tpl',
       JSON.parse(antwort),
@@ -158,7 +153,7 @@
   this.um_get_login = function() {
     var m = '?c=de.uhilger.um.pub.SessionManager&m=getSessionUser';
     var u = '../pub' + m;
-    self.fm_get(u, "text", function (resp) {
+    self.um_get(u, "text", function (resp) {
       self.userid = resp;
       self.login_zeigen();
       //document.querySelector("#userMenu").textContent = resp;
@@ -168,7 +163,7 @@
   this.um_logout = function() {
     var m = '?c=de.uhilger.um.pub.SessionManager&m=expireSession';
     var u = '../pub' + m;
-    self.fm_get(u, "text", function (resp) {
+    self.um_get(u, "text", function (resp) {
       //$('#userMenu').text('nicht angemeldet');
       window.location.href = '../logout.html';
     });
@@ -176,7 +171,7 @@
 
   /* -------- ajax helper functions ----------- */
 
-  this.fm_get = function (u, dtype, scallback) {    
+  this.um_get = function (u, dtype, scallback) {    
     var xmlhttp = new XMLHttpRequest();
     var url = u;
     xmlhttp.onreadystatechange = function() {

--
Gitblit v1.9.3