| | |
| | | var pfad = ''; |
| | | var loc; |
| | | var modus = 'kacheln'; |
| | | var PERS_DIR = "Persoenlich"; |
| | | var PUB_DIR = "Oeffentlich"; |
| | | var DAV_DIR = "Austausch"; |
| | | var BASE_DIR = "$basis"; |
| | | var DATA_DIR = "$daten"; |
| | | var WWW_DIR = "www"; |
| | | |
| | | this.datei_neuer_text = function () { |
| | | self.meldung_mit_timeout("Neuer Text", 1500); |
| | |
| | | document.querySelector('.hamburger').addEventListener('click', function (e) { |
| | | self.menue_umschalten(); |
| | | }); |
| | | var dlg = document.querySelector(".dialog"); |
| | | dlg.style.flexBasis = '0em'; |
| | | self.seitenleiste_umschalten(); |
| | | self.um_get_login(); |
| | | self.um_get_user_list(); |
| | | self.loc = window.location.protocol + '//' + window.location.host; |
| | |
| | | vurl, |
| | | inhalt, |
| | | function (html) { |
| | | //dlg.html(html); |
| | | dlg.style.height = '5em'; |
| | | dlg.innerHTML = html; |
| | | document.querySelector('.close-btn').addEventListener('click', self.dialog_schliessen); |
| | | //dlg.slideDown(300); |
| | | dlg.style.flexBasis = '6em'; |
| | | setTimeout(function () { |
| | | dlg.innerHTML = html; |
| | | document.querySelector('.close-btn').addEventListener('click', self.dialog_schliessen); |
| | | }, 300); |
| | | }); |
| | | }; |
| | | |
| | | this.dialog_schliessen = function () { |
| | | document.querySelector('.close-btn').removeEventListener('click', self.dialog_schliessen); |
| | | //$('.dialog').slideUp(300); |
| | | var dlg = document.querySelector('.dialog'); |
| | | //dlg.style.display = "none"; |
| | | dlg.style.height = '0'; |
| | | dlg.innerHTML = ''; |
| | | dlg.style.flexBasis = '0em'; |
| | | }; |
| | | |
| | | /* API functions */ |
| | |
| | | //var m = 'getUserNameList'; |
| | | var m = 'getUserNameList'; |
| | | var u = '../svc/' + m; |
| | | self.fm_get(u, "json", function (antwort) { |
| | | self.um_get(u, "json", function (antwort) { |
| | | self.vorlagen.html_erzeugen( |
| | | 'data/tpl/inhalt.tpl', |
| | | JSON.parse(antwort), |
| | |
| | | this.um_get_login = function() { |
| | | var m = '?c=de.uhilger.um.pub.SessionManager&m=getSessionUser'; |
| | | var u = '../pub' + m; |
| | | self.fm_get(u, "text", function (resp) { |
| | | self.um_get(u, "text", function (resp) { |
| | | self.userid = resp; |
| | | self.login_zeigen(); |
| | | //document.querySelector("#userMenu").textContent = resp; |
| | |
| | | this.um_logout = function() { |
| | | var m = '?c=de.uhilger.um.pub.SessionManager&m=expireSession'; |
| | | var u = '../pub' + m; |
| | | self.fm_get(u, "text", function (resp) { |
| | | self.um_get(u, "text", function (resp) { |
| | | //$('#userMenu').text('nicht angemeldet'); |
| | | window.location.href = '../logout.html'; |
| | | }); |
| | |
| | | |
| | | /* -------- ajax helper functions ----------- */ |
| | | |
| | | this.fm_get = function (u, dtype, scallback) { |
| | | this.um_get = function (u, dtype, scallback) { |
| | | var xmlhttp = new XMLHttpRequest(); |
| | | var url = u; |
| | | xmlhttp.onreadystatechange = function() { |