From d65863f4765853660eab4197ac4caa00f893f0b1 Mon Sep 17 00:00:00 2001 From: ulrich Date: Sat, 16 May 2020 12:23:00 +0000 Subject: [PATCH] Wechsel zurueck zu 'Neuer Benutzer' bei Anzeige Nutzerliste --- web/ui2/js/app.js | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/web/ui2/js/app.js b/web/ui2/js/app.js index 7dde16e..36c9fcf 100644 --- a/web/ui2/js/app.js +++ b/web/ui2/js/app.js @@ -246,7 +246,6 @@ /* API functions */ this.get_user_list = function() { - //var m = 'getUserNameList'; var m = 'getUserNameList'; var u = '../svc/' + m; self.http_get(u, function (antwort) { @@ -258,6 +257,10 @@ elem.innerHTML = h; self.addEvtListener('p.nutzer-liste-eintrag', 'click', self.nutzerliste_klick); document.querySelector('.zurueck-btn').style.color = '#eee'; + self.removeAllListeners('top-neu-btn'); + var topBtn = document.querySelector('#top-neu-btn'); + topBtn.title = "Neuer Benutzer"; + topBtn.addEventListener('click', self.nutzer_neu_dialog_zeigen); }); }); }; @@ -340,6 +343,12 @@ elems[index].addEventListener(eventName, func); } }; + + this.removeAllListeners = function(elementId) { + var el = document.getElementById(elementId); + elClone = el.cloneNode(true); + el.parentNode.replaceChild(elClone, el); + }; } -- Gitblit v1.9.3