From 045d4840c96bfddba207cdb5eb9aa64ffea12f29 Mon Sep 17 00:00:00 2001 From: undisclosed Date: Thu, 14 May 2020 20:56:54 +0000 Subject: [PATCH] Design angepasst, App-Menu deaktiviert --- web/ui2/js/app.js | 43 +++++++++++++++++++++++++++++++------------ 1 files changed, 31 insertions(+), 12 deletions(-) diff --git a/web/ui2/js/app.js b/web/ui2/js/app.js index 0548b27..8f7f251 100644 --- a/web/ui2/js/app.js +++ b/web/ui2/js/app.js @@ -49,6 +49,7 @@ this.init = function () { self.vorlagen = new Vorlagen(); + /* self.appMenu = new AppMenu(); self.appMenu.init( "data/menu/", @@ -59,9 +60,13 @@ document.querySelector('.hamburger').addEventListener('click', function (e) { self.menue_umschalten(); }); + */ var dlg = document.querySelector(".dialog"); dlg.style.flexBasis = '0em'; + document.querySelector('#nutzer-neu-btn').addEventListener('click', self.nutzer_neu_dialog_zeigen); self.seitenleiste_umschalten(); + self.west_umschalten(); + self.west_umschalten(); self.get_login(); self.get_user_list(); self.loc = window.location.protocol + '//' + window.location.host; @@ -103,7 +108,8 @@ }); }); }); - }); + }); + document.querySelector('.zurueck-btn').style.color = 'black'; }; this.grant_role_klick = function(event) { @@ -137,7 +143,7 @@ this.info_dialog_zeigen = function () { self.dialog_zeigen('data/tpl/dlg-info.tpl', ''); - self.menue_umschalten(); + //self.menue_umschalten(); }; this.nutzer_neu_dialog_zeigen = function () { @@ -147,7 +153,7 @@ btn.addEventListener('click', self.nutzer_speichern); } }); - self.menue_umschalten(); + //self.menue_umschalten(); }; this.seitenleiste_umschalten = function () { @@ -162,6 +168,18 @@ //self.menue_umschalten(); }; + this.west_umschalten = function() { + var westDiv = document.querySelector('.west'); + if (westDiv.classList.contains('west-open')) { + westDiv.classList.remove('west-open'); + westDiv.style.flexBasis = '0em'; + } else { + westDiv.classList.add('west-open'); + westDiv.style.flexBasis = '6em'; + } + //self.menue_umschalten(); + }; + this.fusszeile_umschalten = function () { var suedDiv = document.querySelector('.sued'); if (suedDiv.classList.contains('sued-open')) { @@ -171,7 +189,7 @@ suedDiv.classList.add('sued-open'); suedDiv.style.height = '1.5em'; } - self.menue_umschalten(); + //self.menue_umschalten(); }; this.meldung_mit_timeout = function (meldung, timeout) { @@ -240,15 +258,16 @@ var m = 'getUserNameList'; var u = '../svc/' + m; self.http_get(u, function (antwort) { - self.vorlagen.html_erzeugen( - 'data/tpl/inhalt.tpl', - JSON.parse(antwort), - function (h) { - var elem = document.getElementById('nutzer'); - elem.innerHTML = h; - self.addEvtListener('p.nutzer-liste-eintrag', 'click', self.nutzerliste_klick); + self.vorlagen.html_erzeugen( + 'data/tpl/inhalt.tpl', + JSON.parse(antwort), + function (h) { + var elem = document.getElementById('nutzer'); + elem.innerHTML = h; + self.addEvtListener('p.nutzer-liste-eintrag', 'click', self.nutzerliste_klick); + document.querySelector('.zurueck-btn').style.color = '#eee'; + }); }); - }); }; this.neuen_nutzer_speichern = function(u) { -- Gitblit v1.9.3