From 3d5fe0c05ec31993c5cf85f18f7202719f5bda11 Mon Sep 17 00:00:00 2001 From: ulrich@undisclosed Date: Sat, 09 May 2020 16:03:12 +0000 Subject: [PATCH] Dialog Neuer Nutzer begonnen --- web/ui2/js/app.js | 27 +++++++++++++++++++++++++-- web/ui2/data/menu/nutzer.json | 6 +++--- web/ui2/data/tpl/dlg-nutzer-neu.tpl | 20 ++++++++++++++++++++ web/ui2/index.html | 2 +- 4 files changed, 49 insertions(+), 6 deletions(-) diff --git a/web/ui2/data/menu/nutzer.json b/web/ui2/data/menu/nutzer.json index deec071..2106e22 100644 --- a/web/ui2/data/menu/nutzer.json +++ b/web/ui2/data/menu/nutzer.json @@ -1,6 +1,6 @@ { "menue": { - "menuetitel": "Untermenü 1", + "menuetitel": "Nutzer", "wurzel": false, "vorgaenger": { "vtitel": "Hauptmenü", @@ -8,9 +8,9 @@ }, "inhalt": [ { - "titel": "Benachrichtigung 1", + "titel": "Neu", "umenue": false, - "funktion": "app.message_1" + "funktion": "app.nutzer_neu_dialog_zeigen" }, { "titel": "noch mehr", diff --git a/web/ui2/data/tpl/dlg-nutzer-neu.tpl b/web/ui2/data/tpl/dlg-nutzer-neu.tpl new file mode 100644 index 0000000..9b5b773 --- /dev/null +++ b/web/ui2/data/tpl/dlg-nutzer-neu.tpl @@ -0,0 +1,20 @@ +<div class="dlg-nutzer-neu"> + <span class="close-btn pointer-cursor">✖</span> + <div class="dlg-behaelter"> + <div class="dlg-nutzer-titel">Neuer Nutzer</div> + <form> + <input id="nutzer-id" placeholder="Anmelde-ID" type="text" class="nutzer-eingabe"></br> + <!--<label class="inline-label">Name:</label>--> + <input id="nutzer-vorname" placeholder="Vorname" type="text" class="nutzer-eingabe"></br> + <!--<label class="inline-label">URL:</label>--> + <input id="nutzer-name" placeholder="Name" type="text" class="nutzer-eingabe"></br> + <!--<label class="inline-label">Bild:</label>--> + <input id="nutzer-email" placeholder="E-Mail-Adresse" type="text" class="nutzer-eingabe"></br> + <input id="nutzer-kw" placeholder="Kennwort" type="text" class="nutzer-eingabe"></br> + <input id="nutzer-wkw" placeholder="Wiederholung Kennwort" type="text" class="nutzer-eingabe"></br> + <div class="form-button-footer"> + <button type="button" id="nutzer-speichern">Speichern</button> + </div> + </form> + </div> +</div> \ No newline at end of file diff --git a/web/ui2/index.html b/web/ui2/index.html index 729bd5d..6f38b03 100644 --- a/web/ui2/index.html +++ b/web/ui2/index.html @@ -69,7 +69,7 @@ <script> var app; document.addEventListener('DOMContentLoaded', function () { - app = new AppVorlage(); + app = new NutzerApp(); app.init(); }); </script> diff --git a/web/ui2/js/app.js b/web/ui2/js/app.js index 60b62d6..07fb0dd 100644 --- a/web/ui2/js/app.js +++ b/web/ui2/js/app.js @@ -1,4 +1,4 @@ -function AppVorlage() { +function NutzerApp() { var self = this; var appMenu; var vorlagen; @@ -46,6 +46,11 @@ this.info_dialog_zeigen = function () { self.dialog_laden_und_zeigen('data/tpl/dlg-info.tpl', ''); + self.menue_umschalten(); + }; + + this.nutzer_neu_dialog_zeigen = function () { + self.dialog_laden_und_zeigen('data/tpl/dlg-nutzer-neu.tpl', ''); self.menue_umschalten(); }; @@ -116,7 +121,7 @@ vurl, inhalt, function (html) { - dlg.style.flexBasis = '6em'; + dlg.style.flexBasis = '14em'; setTimeout(function () { dlg.innerHTML = html; document.querySelector('.close-btn').addEventListener('click', self.dialog_schliessen); @@ -182,5 +187,23 @@ xmlhttp.open("GET", url, true); xmlhttp.send(); }; + +/* ----- Hilfsfunktionen ----- */ + + this.serialisieren = function(obj) { + return '{"' + obj.constructor.name + '":' + JSON.stringify(obj) + '}'; + }; } + + +/* ----- Objekte ----- */ + +function User(i, p, fn, ln, em) { + this.id = i; + this.pw = p; + this.firstName = fn; + this.lastName = ln; + this.email = em; +} + -- Gitblit v1.9.3