ulrich
2020-05-16 70d6da1fb28dffe54a4bbc8b09097485875da4e3
Nicht mehr benoetigte Abhaengigkeiten entfernt, Stile verfeinert
3 files modified
9 files deleted
588 ■■■■ changed files
web/ui2/data/menu/datei.json 27 ●●●●● patch | view | raw | blame | history
web/ui2/data/menu/edit.json 27 ●●●●● patch | view | raw | blame | history
web/ui2/data/menu/hauptmenue.json 32 ●●●●● patch | view | raw | blame | history
web/ui2/data/menu/nutzer.json 27 ●●●●● patch | view | raw | blame | history
web/ui2/data/menu/untermenue-1.json 27 ●●●●● patch | view | raw | blame | history
web/ui2/data/menu/untermenue-2.json 27 ●●●●● patch | view | raw | blame | history
web/ui2/index.html 5 ●●●●● patch | view | raw | blame | history
web/ui2/js/app-menu.js 137 ●●●●● patch | view | raw | blame | history
web/ui2/js/app.js 57 ●●●●● patch | view | raw | blame | history
web/ui2/js/data.js 148 ●●●●● patch | view | raw | blame | history
web/ui2/js/vorlagen.js 66 ●●●●● patch | view | raw | blame | history
web/ui2/stile.css 8 ●●●●● patch | view | raw | blame | history
web/ui2/data/menu/datei.json
File was deleted
web/ui2/data/menu/edit.json
File was deleted
web/ui2/data/menu/hauptmenue.json
File was deleted
web/ui2/data/menu/nutzer.json
File was deleted
web/ui2/data/menu/untermenue-1.json
File was deleted
web/ui2/data/menu/untermenue-2.json
File was deleted
web/ui2/index.html
@@ -48,11 +48,6 @@
    </div>
    <!-- Skripte -->
    <script src="/jslib/mustache/mustache.min.js"></script>
    <script src="/jslib/moment/moment-with-locales.min.js"></script>
    <script src="/jslib/numeral/numeral.min.js"></script>
    <script src="js/app-menu.js"></script>
    <script src="js/vorlagen.js"></script>
    <script src="js/data.js"></script>
    <script src="js/app.js"></script>
    <script>
      var app;
web/ui2/js/app-menu.js
File was deleted
web/ui2/js/app.js
@@ -316,6 +316,63 @@
}
/* ----- Vorlagen ----- */
function Vorlagen() {
  var self = this;
  this.cache = {}; // mustache templates
  /*
    Das HTML erzeugen, das entsteht, wenn eine Vorlage mit Inhalt
    gefüllt wird
    Das Füllen erfolgt asynchron, d.h. der Programmlauf geht nach dem
    Aufruf weiter ohne auf das Laden und Füllen der Vorlage zu warten.
    Das fertige HTML wird der Callback-Funktion übergeben
    sobald die Vorlage geladen und gefüllt ist, unabhängig davon, wo der
    Programmlauf zu diesem Zeitpunkt mittlerweile ist.
    vurl - URL zur Vorlagendatei
    inhalt - die JSON-Struktur, deren Inhalt in die
              Vorlage gefüllt werden soll
    cb - Callback-Funktion, die gerufen wird, wenn die Vorlage gefüllt ist.
          Dieser Callback-Funktion wird das fertige HTML übergeben
  */
  this.html_erzeugen = function(vurl, inhalt, cb) {
    var vorlage = self.cache[vurl];
    if(vorlage === undefined) {
      self.vorlage_laden_und_fuellen(vurl, inhalt, cb);
    } else {
      self.vorlage_fuellen(vurl, inhalt, cb);
    }
  };
  this.vorlage_fuellen = function(vurl, inhalt, cb) {
    cb(Mustache.render(self.cache[vurl], inhalt));
  };
  /*
    Eine Vorlage vom Server in den lokalen Speicher laden
    vurl - der URL unter dem die Vorlage zu finden ist
    inhalt - die JSON-Struktur, deren Inhalt in die
              Vorlage gefüllt werden soll
    cb - callback: Diese Funktion wird gerufen, wenn die Vorlage mit dem
            Inhalt gefüllt ist
  */
  this.vorlage_laden_und_fuellen = function(vurl, inhalt, cb) {
    var xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange = function() {
      if (this.readyState == 4 && this.status == 200) {
        self.cache[vurl] = this.responseText;
        self.vorlage_fuellen(vurl, inhalt, cb);
      }
    };
    xmlhttp.open("GET", vurl, true);
    xmlhttp.send();
  };
}
/* ----- Objekte ----- */
web/ui2/js/data.js
File was deleted
web/ui2/js/vorlagen.js
File was deleted
web/ui2/stile.css
@@ -215,13 +215,21 @@
}
.granted-role-btn {
  height: 2.5em;
  padding: 0 0.5em;
  margin: 0.2em;
  background-color: lightcoral;
  text-transform: none;
  font-size: medium;
}
.avl-role-btn {
  height: 2.5em;
  padding: 0 0.5em;
  margin: 0.2em;
  background-color: darkseagreen;
  text-transform: none;
  font-size: medium;
}
/* für app-menu */