/* * Copyright 2016, KNX-User-Forum e.V. * * This file is part of xxAPI2. * * xxAPI2 is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * xxAPI2 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with xxAPI2. If not, see . * * Diese Datei ist Teil von xxAPI2. * * xxAPI2 ist Freie Software: Sie können es unter den Bedingungen * der GNU Lesser General Public License, wie von der Free Software Foundation, * Version 3 der Lizenz oder (nach Ihrer Wahl) jeder späteren * veröffentlichten Version, weiterverbreiten und/oder modifizieren. * * xxAPI2 wird in der Hoffnung, dass es nützlich sein wird, aber * OHNE JEDE GEWÄHRLEISTUNG, bereitgestellt; sogar ohne die implizite * Gewährleistung der MARKTFÄHIGKEIT oder EIGNUNG FÜR EINEN BESTIMMTEN ZWECK. * Siehe die GNU Lesser General Public License für weitere Details. * * Sie sollten eine Kopie der GNU Lesser General Public License zusammen mit diesem * Programm erhalten haben. Wenn nicht, siehe . * https://github.com/knxuf/xxAPI2/blob/master/LICENSE * */ "use strict"; // xml2json library $.base64 = { "decode" : function(arg) { return window.atob(arg);}, "encode" : function(arg) { return window.btoa(arg);} } var xxAPI = {}; xxAPI.version = "2.044"; xxAPI.functions = {}; var performance = window.performance || $ // make performance.now() work in any case xxAPI.events = { "lastclick" : { "top" : 0, "left" : 0, "event" : null } } xxAPI.XXLINKURL = ""; xxAPI.registered_icons = { "XXPAGE" : "XXPAGE*", "XXPOPUP" : "XXPAGE*POPUP" }; xxAPI.marked_pages = {}; xxAPI.geolocation = {}; xxAPI.xxtemplates = { "default" : null }; // Homeserver Object var hs = {}; hs.debug_cache = []; hs.cached_load_count = -1; hs.libraries_loaded = false; hs.functions = {}; hs.functions.async = {}; hs.post_load_functions = []; hs.session = {}; // keyname ist target // Globale hs.user = null; hs.options = { "autoscale" : false, "scaledown" : false, "dateformat" : "%ddd% %dd%.%MM%.%YYYY% %HH%:%mm%:%ss%", "timezone" : null, "sliderstep_px" : 10, "visualclickdelay" : 800, "itemdiscardmode": 2, // discard items outside visu / 0 = don't discard / 1 = discard only html / 2 = discard html + xxapi "fadeouttime" : 200, "temp_colors" : { "one" : [52, 152, 219], "two" : [137, 224, 223], "three" : [46, 204, 113], "four" : [241, 196, 15], "five" : [231, 76, 60] } } hs.language = { "monthnames" : [ "","Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"], "weekdaynames" : [ "Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag" ], "shortweekdaynames" : [ "So","Mo","Di","Mi","Do","Fr","Sa" ], "filternames" : [ "Immer","Normale Tage","Feiertage","Urlaub","Nie" ] } hs.gui = {}; hs.gui.update_timer = null; hs.gui.fonts = {}; hs.gui.systemfonts = {}; hs.gui.popup_layer = 0; hs.gui.device = { "width" : $(window).width(), "height" : $(window).height() }; hs.gui.attr = { "initial_visu_width" : $(window).width(), "initial_visu_height" : $(window).height(), "visu_width" : $(window).width(), "visu_height" : $(window).height() }; hs.gui.hashes = {}; hs.gui.pages = {}; hs.gui.items = {}; hs.gui.designs_html = null; hs.gui.hidden = false; hs.gui.container_scale = 1; hs.auth = {}; hs.auth.username = null; hs.auth.password = null; hs.auth.gui_design = null; hs.auth.gui_refresh="R1"; hs.connection = { "timeout" : 300, // 300sec "failure" : 0, "hiddentime" : 120 // 120sec if page is hidden }; hs.debuglevel = 0; /* * XXAPICONFIG opens the xxAPI configmenu * Argument 1 (optional) is the text shown on Visu XXAPICONFIG* */ xxAPI.functions.XXAPICONFIG = function ( oarg ) { var _html = "

xxAPI² Config

"; _html += ""; _html += ""; _html += ""; _html += ""; _html += ""; _html += ""; _html += ""; _html += ""; _html += ""; //_html += ""; _html += "
Version:" + xxAPI.version + "
jQuery:" + $.md5(hs.functions.stringify($)) + "
HSClient:" + $.md5(hs.functions.stringify(hs.functions)) + "
xxAPI:" + $.md5(hs.functions.stringify(xxAPI.functions)) + "
Debuglevel
"; _html += "