From eefd252e24fd8cdea9fbf6becb605a679e8b2f18 Mon Sep 17 00:00:00 2001
From: ulrich@undisclosed
Date: Fri, 15 May 2020 12:48:26 +0000
Subject: [PATCH] Code aufgeraeumt

---
 web/ui2/js/app.js  |  101 ++++++++++++---------------------
 web/ui2/index.html |   26 +-------
 2 files changed, 39 insertions(+), 88 deletions(-)

diff --git a/web/ui2/index.html b/web/ui2/index.html
index faecbe2..78a3d1e 100644
--- a/web/ui2/index.html
+++ b/web/ui2/index.html
@@ -11,15 +11,6 @@
   <body>
     <!-- Kopfzeile -->
     <div class="nord">
-      <!--
-      <div id="nav-menu">
-        <div id="nav-toggle" class="hamburger hamburger--elastic">
-          <div class="hamburger-box">
-            <div class="hamburger-inner"></div>
-          </div>
-        </div>
-      </div>
-      -->
       <div class="back-btn">
         <button type="button" class="zurueck-btn">&#10094; Zur&uuml;ck</button>
       </div>
@@ -27,24 +18,15 @@
         <span id="app-titel">Nutzerverwaltung</span>
       </div>
       <div class="top-btn-area">
-        <button type="button" class="top-btn" id="nutzer-neu-btn">+</button>
+        <button type="button"  title="Neuer Benutzer" class="top-btn" id="nutzer-neu-btn">+</button>
       </div>
     </div>
     <div class="inhalt">
       <!-- westliche Seitenleiste -->
-      <div class="west">
-        westliche Seitenleiste
-      </div>
+      <div class="west"></div>
       <div class="zentrum-behaelter">
         <!-- Einblendbereich -->
         <div class="dialog"></div>
-        <!-- Breadcrumb -->
-        <!--
-        <div class="breadcrumb">
-          <a class="bc-link">Ordner 1</a> / 
-          <a class="bc-link">Ordner 2</a>
-        </div>
-        -->
         <!-- zentraler Inhaltsbereich -->
         <div class="zentrum">
           <div class="zentraler-inhalt">
@@ -58,9 +40,7 @@
         </div>
       </div>
       <!-- oestliche Seitenleiste -->
-      <div class="ost ost-open">
-        &ouml;stliche Seitenleiste
-      </div>
+      <div class="ost"></div>
     </div>
     <!-- Fusszeile -->
     <div class="sued sued-open">
diff --git a/web/ui2/js/app.js b/web/ui2/js/app.js
index 8f7f251..6013ed8 100644
--- a/web/ui2/js/app.js
+++ b/web/ui2/js/app.js
@@ -1,12 +1,24 @@
 function NutzerApp() {
   var self = this;
-  var appMenu;
+  //var appMenu;
   var vorlagen;
-  var api;
+  //var api;
   var userid;
-  var pfad = '';
+  //var pfad = '';
   var loc;
-  var modus = 'kacheln';
+  //var modus = 'kacheln';
+
+  this.init = function () {
+    self.vorlagen = new Vorlagen();
+    var dlg = document.querySelector(".dialog");
+    dlg.style.flexBasis = '0em';
+    document.querySelector('#nutzer-neu-btn').addEventListener('click', self.nutzer_neu_dialog_zeigen);
+    document.querySelector('.west').style.flexBasis = '0em';
+    document.querySelector('.ost').style.flexBasis = '0em';
+    self.get_login();
+    self.get_user_list();
+    self.loc = window.location.protocol + '//' + window.location.host;
+  };
 
   this.datei_neuer_text = function () {
     self.meldung_mit_timeout("Neuer Text", 1500);
@@ -14,6 +26,16 @@
   
   /* Nutzerverwaltung */
   
+  this.nutzer_neu_dialog_zeigen = function () {
+    self.dialog_zeigen('data/tpl/dlg-nutzer-neu.tpl', '', function(){
+      var btn = document.getElementById('nutzer-speichern-btn');
+      if(btn !== null) {
+        btn.addEventListener('click', self.nutzer_speichern);                         
+      }                      
+    });
+    //self.menue_umschalten();
+  };
+
   this.nutzerliste_klick = function(event) {
     var target = event.target;
     var gewaehlterNutzer = document.querySelector(".nutzer-gewaehlt");
@@ -45,43 +67,8 @@
     return user;
   };
 
-  /* Funktionen aus App-Vorlage */
-
-  this.init = function () {
-    self.vorlagen = new Vorlagen();
-    /*
-    self.appMenu = new AppMenu();
-    self.appMenu.init(
-            "data/menu/",
-            "hauptmenue.json",
-            "data/tpl/app-menu.tpl",
-            ".west",
-            "8em");
-    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;
-  };
-
-  this.login_zeigen = function() {
-    self.meldung_mit_timeout("Benutzer: " + self.userid, 1500);
-  };
+  /* Rollen erteilen und entziehen */
   
-  this.menue_umschalten = function () {
-    var ham = document.querySelector(".hamburger");
-    ham.classList.toggle("is-active"); // hamburger-icon umschalten
-    self.appMenu.toggle(); // menue oeffnen/schliessen
-  };
-
   this.rollen_dialog_zeigen = function(nutzerId) {
     var m = 'getUserRoleNames';
     var u = '../svc/' + m + '?p=' + nutzerId;
@@ -141,19 +128,17 @@
     });        
   };
   
+  
+
+  /* Funktionen aus App-Vorlage */
+
+  this.login_zeigen = function() {
+    self.meldung_mit_timeout("Benutzer: " + self.userid, 1500);
+  };
+  
+  
   this.info_dialog_zeigen = function () {
     self.dialog_zeigen('data/tpl/dlg-info.tpl', '');
-    //self.menue_umschalten();
-  };
-
-  this.nutzer_neu_dialog_zeigen = function () {
-    self.dialog_zeigen('data/tpl/dlg-nutzer-neu.tpl', '', function(){
-      var btn = document.getElementById('nutzer-speichern-btn');
-      if(btn !== null) {
-        btn.addEventListener('click', self.nutzer_speichern);                         
-      }                      
-    });
-    //self.menue_umschalten();
   };
 
   this.seitenleiste_umschalten = function () {
@@ -165,21 +150,8 @@
       ostDiv.classList.add('ost-open');
       ostDiv.style.flexBasis = '6em';
     }
-    //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')) {
@@ -189,7 +161,6 @@
       suedDiv.classList.add('sued-open');
       suedDiv.style.height = '1.5em';
     }
-    //self.menue_umschalten();
   };
 
   this.meldung_mit_timeout = function (meldung, timeout) {

--
Gitblit v1.9.3