var html = '
Montag Mo 02.09.2024 | |
Dienstag Di 03.09.2024 | |
Mittwoch Mi 04.09.2024 | |
Donnerstag Do 05.09.2024 | |
Freitag Fr 06.09.2024 | |
Samstag Sa 07.09.2024 | |
Sonntag So 08.09.2024 | |
';
var me = document.getElementById('div_tableOfHours147');
if (!me) {
me = document.getElementById('tableOfHours147');
}
if (me) {
var textnode = document.createElement('div');
textnode.id = 'div_tableOfHours147';
textnode.scriptSrc = '////app.eaero.de/api/tableOfHours/147/1,2,4,5,6//edf3182d097d714f58928808b82106b4?scriptId=tableOfHours147';
textnode.innerHTML = html;
me.parentNode.replaceChild(textnode, me);
}
else {
// typ und id suchen
var scripts = document.getElementsByTagName("script");
var src = '////app.eaero.de/api/tableOfHours/147/1,2,4,5,6//edf3182d097d714f58928808b82106b4?scriptId=tableOfHours147';
console.log(src);
var type = '';
var id = '';
var pos1TableOfHours = src.indexOf('/api/tableOfHours/');
var pos1CalendarOfHours = src.indexOf('/api/calendarOfHours/');
var pos1hours = src.indexOf('/api/hours/');
var offset = 0;
var idInNext = false;
var template = '/';
var pos1 = -1;
if(pos1TableOfHours > -1) {
pos1 = pos1TableOfHours;
offset = 18;
type = 'tableOfHours';
}
else if(pos1CalendarOfHours > -1) {
type = 'calendarOfHours';
template = 'document.write';
}
else if(pos1hours > -1) {
pos1 = pos1hours;
offset = 11;
idInNext = true;
type = 'hours';
}
if(pos1 > -1) {
var pos2 = src.indexOf('/', pos1 + offset);
if(!idInNext) {
id = src.substring(pos1 + offset, pos2);
}
else {
var pos2Back = pos2 + 1;
template = '/' + src.substring(pos1 + offset, pos2) + '/';
pos2 = src.indexOf('/', pos2 + 1);
id = src.substring(pos2Back, pos2);
}
console.log(type);
console.log(id);
console.log(template);
}
// /typ und id suchen
var scriptNodeReplaced = false;
if(type != '' && id != '') {
for(i=0;i -1) {
//console.log(scripts[i]);
var newNode = document.createElement('div');
newNode.innerHTML = html;
newNode.setAttribute('id', 'div_tableOfHours147');
newNode.setAttribute('scriptSrc', '////app.eaero.de/api/tableOfHours/147/1,2,4,5,6//edf3182d097d714f58928808b82106b4?scriptId=tableOfHours147');
scripts[i].parentNode.replaceChild(newNode, scripts[i]);
scriptNodeReplaced = true;
console.log('gefunden');
}
}
}
if(!scriptNodeReplaced && template != '/') {
console.log('document.write');
document.write('' + html + '
');
}
}
if ('withEQCSS' == 'withEQCSS') {
var bodyElement = document.getElementsByTagName('body')[0];
var bodyEQCSS = bodyElement.getAttribute('eqcss');
if (bodyEQCSS == null) {
//console.log('body eqcss: ' + bodyElement.getAttribute('eqcss'));
bodyElement.setAttribute('eqcss', 'eqcss');
//!!console.log(typeof(EQCSS));
if (typeof(EQCSS) === 'undefined') {
//!!console.log('EQCSS laden');
eaApiLoadScript('//app.eaero.de/app.php/js/EQCSS.min.js', function () {
if (typeof(EQCSS) !== 'undefined') {
//console.log('EQCSS apply');
EQCSS.apply();
}
});
}
else {
if (typeof(EQCSS) !== 'undefined') {
//console.log('EQCSS apply');
EQCSS.apply();
}
}
}
else {
if (typeof(EQCSS) !== 'undefined') {
//console.log('EQCSS apply');
EQCSS.apply();
}
}
}
if('withEQCSS' == 'withEQCSS' && '' != 'withoutMouseUpListener') {
if(window.eAeroMouseupInstalled === undefined) {
window.eAeroMouseupInstalled = true;
document.addEventListener("mouseup", function(e) {
console.log('mouseup');
setTimeout(function() {
console.log('EQCSS apply');
EQCSS.apply();
}, 1);
});
}
}
if ('not-withCalendarControl' == 'withCalendarControl') {
/*
var bodyElement = document.getElementsByTagName('body')[0];
var bodyJQUERY = bodyElement.getAttribute('jquery');
var bodyJQUERYUI = bodyElement.getAttribute('jqueryui');
*/
var isPreloadJs = typeof createjs !== 'undefined';
function doWithCalendar() {
return;
var bodyElement = document.getElementsByTagName('body')[0];
var preloadjs = bodyElement.getAttribute('preloadjs');
if (preloadjs) {
console.log('#div_tableOfHours147 #datepicker');
$('#div_tableOfHours147 #datepicker').datepicker({
language: 'de',
xmultidate: true
}).next().on('click', function () {
});
}
}
if (!isPreloadJs && false) {
eaApiLoadScript('//app.eaero.de/app.php/js/vendor/preloadjs-0.6.1.min.js', function () {
console.log('loaded preloadjs tableOfHours147');
if(typeof eaQueue == 'undefined') {
console.log('new eqQueue');
eaQueue = [];
}
eaQueue['tableOfHours147'] = new createjs.LoadQueue();
// Callback, wenn Queue abgearbeitet
eaQueue['tableOfHours147'].on("complete", function () {
var bodyElement = document.getElementsByTagName('body')[0];
bodyElement.setAttribute('preloadjs', 'preloadjs');
console.log('complete tableOfHours147');
//console.log($.fn.datepicker.dates['de']);
doWithCalendar();
}, this);
var manifest = [];
var mi = 0;
if (!window.jQuery) {
// nur, wenn kein jQuery da
//eaQueue['tableOfHours147'].loadFile('//app.eaero.de/app.php/js/vendor/jquery-1.11.3.min.js');
manifest[mi++] = '//app.eaero.de/app.php/js/vendor/jquery-1.11.3.min.js';
}
//eaQueue['tableOfHours147'].loadFile('//app.eaero.de/app.php/assets/js/date-time/bootstrap-datepicker.min.js');
manifest[mi++] = '//app.eaero.de/app.php/assets/js/date-time/bootstrap-datepicker.min.js';
//if(!window.jQuery || typeof ($.fn.datepicker.dates['de']) == 'undefined') {
// nur, wenn kein jquery oder locale da
//eaQueue['tableOfHours147'].loadFile('//app.eaero.de/app.php/assets/js/date-time/locales/bootstrap-datepicker.de.js');
manifest[mi++] = '//app.eaero.de/app.php/assets/js/date-time/locales/bootstrap-datepicker.de.js';
//}
//eaQueue['tableOfHours147'].loadFile('//app.eaero.de/app.php/assets/css/bootstrap.min.css');
manifest[mi++] = '//app.eaero.de/app.php/assets/css/bootstrap.min.css';
//eaQueue['tableOfHours147'].loadFile('//app.eaero.de/app.php/assets/css/bootstrap-datepicker.css');
manifest[mi++] = '//app.eaero.de/app.php/assets/css/bootstrap-datepicker.css';
//eaQueue['tableOfHours147'].loadFile('//app.eaero.de/app.php/assets/css/datepicker.css');
manifest[mi++] = '//app.eaero.de/app.php/assets/css/datepicker.css';
//eaQueue['tableOfHours147'].loadFile('//app.eaero.de/app.php/assets/css/custom.css');
manifest[mi++] = '//app.eaero.de/app.php/assets/css/custom.css';
//queue.loadFile('//app.eaero.de/app.php/assets/css/ace.min.css');
eaQueue['tableOfHours147'].loadManifest(manifest, true);
console.log('load tableOfHours147');
//eaQueue['tableOfHours147'].load();
setTimeout(function() {
//console.log('load tableOfHours147');
//eaQueue['tableOfHours147'].load();
}, 1000);
});
/*
if(bodyJQUERY == null) {
bodyElement.setAttribute('jquery', 'jquery');
eaApiLoadScript('//app.eaero.de/app.php/js/vendor/jquery-1.11.3.min.js', function() {
bodyJQUERY = true;
bodyElement.setAttribute('jqueryui', 'jqueryui');
//eaApiLoadScript('//app.eaero.de/app.php/assets/js/jquery-ui-1.10.3.full.min.js', function() {
eaApiLoadScript('//app.eaero.de/app.php/assets/js/date-time/bootstrap-datepicker.min.js', function() {
bodyJQUERYUI = true;
doWithCalendar();
});
});
}
else {
doWithCalendar();
}
*/
}
else {
doWithCalendar();
}
}
function eaApiLoadScript(url, callback) {
// script-Tag anlegen
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
// Callback-Funktion binden
//script.onreadystatechange = callback; // Probleme mit IE < 11, daher auskommentiert
script.onload = callback;
// Script-Tag im Header anlegen, damit Ladevorgang beginnt
head.appendChild(script);
}
if (eaeroApi == undefined) {
var eaeroApi = {};
eaeroApi.updateMultipleHours = function (idArr, template, date, clear, withDayAfterTomorrow, withFootnotes, withLegend) {
// todo: prüfen, ob dies ev. auch im head-Element funktioniert
var bodyElement = document.getElementsByTagName('body')[0];
if(!bodyElement && bodyElement == undefined) {
console.log('Fehler in der Implementierung der eaero-API. Kein Body-Element gefunden. Script wird eventuell zu früh geladen.');
return
}
if (!withDayAfterTomorrow || withDayAfterTomorrow == undefined) {
withDayAfterTomorrow = 0;
}
if (!withFootnotes || withFootnotes == undefined) {
withFootnotes = 0;
}
if (!withLegend || withLegend == undefined) {
withLegend = 0;
}
var src = '{url}/api/multiHours/' + template + '/' + idArr + '/' + date + '/{secret}';
var params = '';
if(withDayAfterTomorrow != 0) {
if(params == '') params += '?'; else params += '&';
params += 'withDayAfterTomorrow=1';
}
if(withFootnotes != 0) {
if(params == '') params += '?'; else params += '&';
params += 'withFootnotes=1';
}
if(withLegend != 0) {
if(params == '') params += '?'; else params += '&';
params += 'withLegend=1';
}
src += params;
var s = document.createElement("script");
s.type = "text/javascript";
s.src = src;
if (clear) {
for (var i = 0; i < idArr.length; i++) {
var divId = 'div_hours' + idArr[i];
var div = document.getElementById(divId);
if (div && div != undefined) {
div.innerHTML = '';
}
}
}
bodyElement.appendChild(s);
};
eaeroApi.updateHours = function (scriptId, id, template, date, clear, withDayAfterTomorrow, withFootnotes, withLegend) {
var divElement = document.getElementById('div_' + scriptId);
if (!divElement || divElement == undefined) {
return;
}
if (!withDayAfterTomorrow || withDayAfterTomorrow == undefined) {
withDayAfterTomorrow = 0;
}
if (!withFootnotes || withFootnotes == undefined) {
withFootnotes = 0;
}
if (!withLegend || withLegend == undefined) {
withLegend = 0;
}
var scriptSrc = '';
if (divElement.scriptSrc != undefined) {
scriptSrc = divElement.scriptSrc;
}
else {
scriptSrc = '{url}/api/hours/' + template + '/' + id + '/{secret}';
}
var scriptSrcArr = scriptSrc.split('/');
for (i = 0; i < scriptSrcArr.length; i++) {
if (scriptSrcArr[i] == 'hours') {
scriptSrcArr[i + 3] = date;
}
}
src = scriptSrcArr.join('/');
var params = '';
if(withDayAfterTomorrow != 0) {
if(params != '') params += '?'; else params += '&';
params += 'withDayAfterTomorrow=1';
}
if(withFootnotes != 0) {
if(params != '') params += '?'; else params += '&';
params += 'withFootnotes=1';
}
if(withLegend != 0) {
if(params != '') params += '?'; else params += '&';
params += 'withLegend=1';
}
src += params;
var s = document.createElement("script");
s.type = "text/javascript";
s.src = src;
s.id = 'div_' + scriptId;
if (clear) {
divElement.innerHTML = '';
}
divElement.appendChild(s);
};
eaeroApi.updateTableOfHours = function(scriptId, date, clear) {
var divElement = document.getElementById('div_' + scriptId);
var prevButton = document.getElementById('toh_prev_button_' + scriptId);
var nextButton = document.getElementById('toh_next_button_' + scriptId);
var loadIndicator = document.getElementById('toh_load_indicator_' + scriptId);
if (!divElement || divElement == undefined) {
return;
}
if(prevButton) {
prevButton.setAttribute('disabled', 'disabled');
}
if(nextButton) {
nextButton.setAttribute('disabled', 'disabled');
}
if(loadIndicator) {
loadIndicator.setAttribute('style', '');
}
var scriptSrc = '';
if (divElement.scriptSrc != undefined) {
scriptSrc = divElement.scriptSrc;
}
else if(divElement.getAttribute('scriptSrc') != undefined) {
scriptSrc = divElement.getAttribute('scriptSrc');
}
else {
scriptSrc = '{url}/api/tableOfHours/' + scriptId + '/1,2,3,4,5,6,7//{secret}';
}
var scriptSrcArr = scriptSrc.split('/');
for (i = 0; i < scriptSrcArr.length; i++) {
if (scriptSrcArr[i] == 'tableOfHours') {
scriptSrcArr[i + 3] = date;
}
}
src = scriptSrcArr.join('/');
var s = document.createElement("script");
s.type = "text/javascript";
s.src = src;
s.id = 'div_' + scriptId;
if (clear) {
divElement.innerHTML = '';
}
divElement.appendChild(s);
};
if (typeof eAeroApiLoaded == 'function') {
eAeroApiLoaded();
}
}