From 603be72552dec1465ae49fc392930a678f28bef1 Mon Sep 17 00:00:00 2001 From: horchi Date: Fri, 9 Feb 2018 21:08:00 +0100 Subject: 2018-02-09: version 1.1.130 (rechner)\n - added: Icons for timertypes\n - added: switchtimer on eventDetail \n \n --- http/src/js/5_timerDialog.js | 511 ++++++++++++++++++++-------------------- http/src/js/eventDetail.js | 16 +- http/src/js/pages.timer.js | 539 ++++++++++++++++++++++--------------------- http/src/lang/de.js | 14 +- http/www/epgd.js | 2 +- http/www/lang/de.js | 14 +- 6 files changed, 555 insertions(+), 541 deletions(-) (limited to 'http') diff --git a/http/src/js/5_timerDialog.js b/http/src/js/5_timerDialog.js index ad13bce..113e7a9 100644 --- a/http/src/js/5_timerDialog.js +++ b/http/src/js/5_timerDialog.js @@ -1,12 +1,12 @@ // Timer Dialoge - Basis Klasse -epgd.timerDialogBase = function (options) { - this.$win = null; - this.list = null; - if ( options ) - this.options= $.extend({}, this.options, options); +epgd.timerDialogBase = function (options) { + this.$win = null; + this.list = null; + if ( options ) + this.options= $.extend({}, this.options, options); } -epgd.timerDialogBase.prototype = { - options: { +epgd.timerDialogBase.prototype = { + options: { id: "baseDialog", modal: true, draggable: true, @@ -14,59 +14,59 @@ epgd.timerDialogBase.prototype = { autoOpen: false, width: 'auto', maxHeight: $(window).height(), - close: function () { + close: function () { this.list.dialog.form.reset(); $(this.list.dialog.form).next().remove(); //allFields.removeClass("ui-state-error"); - }, - buttons: [{ + }, + buttons: [{ text: epgd.tr.del, icons: { primary: "ui-icon-trash" }, id: 'tBDel', - click: function () { + click: function () { $(this).dialog("close"); - this.list.del(this.list.dialog.form.tID.value); - } - }, { + this.list.del(this.list.dialog.form.tID.value); + } + }, { text: epgd.tr.cancel, icons: { primary: "ui-icon-close" }, - click: function () { - $(this).dialog("close"); - } - }, { + click: function () { + $(this).dialog("close"); + } + }, { text: epgd.tr.save, icons: { primary: "ui-icon-disk" }, - click: function () { this.list.dialog.save() } - }] + click: function () { this.list.dialog.save() } + }] }, save: function (data, url, failFunc, succFunc) { this.list.save(data || this.getData(), url, failFunc, succFunc) && !this.options.embed && this.$win.dialog("close"); }, - showError: function (msg, field) { + showError: function (msg, field) { epgd.utils.popup((field && field.id ? '' + $('label[for="' + field.id + '"]').text() + '' : '') + '
' + msg + '
', { autoClose: 3000 }); field && field.focus(); - return false; - }, - loadFolder: function () { + return false; + }, + loadFolder: function () { var dialog = this; - epgd.ajax({ url: epgd.login.url + "data/recordingdirs" }, function (data) { - if (data.recordingdirs.length) { + epgd.ajax({ url: epgd.login.url + "data/recordingdirs" }, function (data) { + if (data.recordingdirs.length) { var folder = [], vdrs = epgd.vdrs.list, vdr; - $.each(data.recordingdirs, function (id, f) { + $.each(data.recordingdirs, function (id, f) { vdr = vdrs[f.vdruuid]; - folder.push({ value: f.directory, category: vdr ? vdr.name : '-' }); + folder.push({ value: f.directory, category: vdr ? vdr.name : '-' }); }); - $(dialog.form.tFolder).catcomplete("option", "source", folder); - } - }); - }, - close: function () { + $(dialog.form.tFolder).catcomplete("option", "source", folder); + } + }); + }, + close: function () { if (this.$win) - this.$win.dialog("close"); - }, - create: function () { + this.$win.dialog("close"); + }, + create: function () { var o = this.options, tr = epgd.tr.pages.timerList, week = '', @@ -94,27 +94,27 @@ epgd.timerDialogBase.prototype = { !o.embed && this.$win.appendTo(document.body).dialog(o); this.$win[0].list = this.list; this.form = this.$win.find('form')[0]; - $(this.form.tFolder).catcomplete({ + $(this.form.tFolder).catcomplete({ minLength: 0, - maxHeight: 300 - }).focus(function () { - $(this).catcomplete("search", ""); + maxHeight: 300 + }).focus(function () { + $(this).catcomplete("search", ""); }); - $(this.form.tType).change(function () { + $(this.form.tType).change(function () { if (this.selectedIndex < 0) - this.selectedIndex = 0; - this.form.className = this.form.className.replace(/ ?type./, '') + ' type' + this[this.selectedIndex].value; - // $('.onlyTypeR', this.form).toggle(this[this.selectedIndex].value == 'R'); - // $('#tSName').parent().toggle(this[this.selectedIndex].value == 'S'); - // $('#tRepeat,#tChFormat').parent().toggle(this[this.selectedIndex].value != 'S'); + this.selectedIndex = 0; + this.form.className = this.form.className.replace(/ ?type./, '') + ' type' + this[this.selectedIndex].value; + // $('.onlyTypeR', this.form).toggle(this[this.selectedIndex].value == 'R'); + // $('#tSName').parent().toggle(this[this.selectedIndex].value == 'S'); + // $('#tRepeat,#tChFormat').parent().toggle(this[this.selectedIndex].value != 'S'); }); - $(this.form.tNameMode).change(function () { - this.form.tTemplate.parentNode.style.display = (this.selectedIndex == 6) ? 'block': 'none'; + $(this.form.tNameMode).change(function () { + this.form.tTemplate.parentNode.style.display = (this.selectedIndex == 6) ? 'block': 'none'; }); epgd.utils.addPlaceholders(this.form.tTemplate, '%', tr.templateFields); - this.loadFolder(); - }, - render : function (t) { + this.loadFolder(); + }, + render : function (t) { t = t || {}; if (!this.$win) this.create(); @@ -122,14 +122,14 @@ epgd.timerDialogBase.prototype = { var form = this.form, d, i; form.tSName.focus(); - if (t.id) { + if (t.id) { form.tID.value = t.id; this.$win.parent().find('#tBDel').show(); - this.$win.parent().find('#tBToggle').hide(); - } else { + this.$win.parent().find('#tBToggle').hide(); + } else { form.tID.value = ''; this.$win.parent().find('#tBDel').hide(); - this.$win.parent().find('#tBToggle').show(); + this.$win.parent().find('#tBToggle').show(); } $(form.tType).val(t.type || 'R').change(); $(form.tVdr).val(t.vdruuid || epgd.profile.timerDefaultVDRuuid); @@ -141,43 +141,43 @@ epgd.timerDialogBase.prototype = { form.tVPS.checked = t.vps == 1; form.tInactive.checked = t.active === 0; form.tFolder.value = t.directory || ''; - form.tSName.value = t.name || ''; - epgd.pages.help.initButtons(this.$win); - this.resize(); - }, - resize: function () { - /*var dlgOpt = this.$win.dialog("instance").options; - dlgOpt.position.my = "center top"; - dlgOpt.position.at = "center top"; */ - this.$win.dialog("option", "maxHeight", $(window).height()); + form.tSName.value = t.name || ''; + epgd.pages.help.initButtons(this.$win); + this.resize(); + }, + resize: function () { + /*var dlgOpt = this.$win.dialog("instance").options; + dlgOpt.position.my = "center top"; + dlgOpt.position.at = "center top"; */ + this.$win.dialog("option", "maxHeight", $(window).height()); } - }; + }; // Timerdialog - Klasse -epgd.timerDialog = epgd.utils.inherits(function () { - epgd.timerDialogBase.call(this,{ +epgd.timerDialog = epgd.utils.inherits(function () { + epgd.timerDialogBase.call(this,{ id: 'timerDialog', title: epgd.tr.pages.timer.timerList + ' ' + epgd.tr.edit, - buttons: [{ + buttons: [{ text: epgd.tr.pages.timer.searchTimerList, icons: { primary: "ui-icon-transferthick-e-w" }, id: "tBToggle", - click: function () { + click: function () { var t = this.list.dialog.getData(true); - if (t) { + if (t) { $(this).dialog("close"); //t.channelid && (t.channelids = t.channelid); - if (t.title) { - t.expression = t.title; - t.searchfields = 1; + if (t.title) { + t.expression = t.title; + t.searchfields = 1; } - epgd.pages.searchTimerList.dialog.render(t); - } - } - }].concat(epgd.timerDialog.base.options.buttons) - }); + epgd.pages.searchTimerList.dialog.render(t); + } + } + }].concat(epgd.timerDialog.base.options.buttons) + }); }, epgd.timerDialogBase); -epgd.timerDialog.prototype.create = function () { +epgd.timerDialog.prototype.create = function () { epgd.timerDialog.base.create.call(this); var tr = epgd.tr.pages.timerList, @@ -189,8 +189,8 @@ epgd.timerDialog.prototype.create = function () { $(form.tNameMode).after(' '); $(form.tFolder).parent().after('
'); - $(this.form.tStart).datetimepicker({ - minDateTime: epgd.utils.now(), + $(this.form.tStart).datetimepicker({ + minDateTime: epgd.utils.now(), }); $(this.form.tEnd).timepicker({ // minDateTime: epgd.utils.now() @@ -198,15 +198,15 @@ epgd.timerDialog.prototype.create = function () { epgd.utils.addAutoComplete(form.tChannel, { source: epgd.channels.autoCompleteData }); form.tFile = $(form).find('#tFile')[0]; form.tEvTime = $(form).find('#tEvTime')[0]; - form.tTitle = $(form).find('#tTitle').click(function () { - if (form.tEvID.value) { - epgd.utils.loader.process(function () { - new epgd.eventDetail(form.tEvID.value).render(); - }); - } - })[0]; + form.tTitle = $(form).find('#tTitle').click(function () { + if (form.tEvID.value) { + epgd.utils.loader.process(function () { + new epgd.eventDetail(form.tEvID.value).render(); + }); + } + })[0]; }; -epgd.timerDialog.prototype.render = function (t) { +epgd.timerDialog.prototype.render = function (t) { t = t || {}; epgd.timerDialog.base.render.call(this, t); var form = this.form, @@ -219,7 +219,7 @@ epgd.timerDialog.prototype.render = function (t) { form.tEvTime.innerHTML = t.evStartTime ? epgd.utils.formatDateTime(t.evStartTime) + ' - ' + epgd.utils.formatTime(t.evStartTime + t.evDuration) : ''; $([form.tStart, form.tEnd]).datetimepicker("option", "disabled", !!t.eventid); - if (t.day || !t.evStartTime) { + if (t.day || !t.evStartTime) { if (t.starttime) d = epgd.utils.date((t.day + parseInt(t.starttime / 100, 10) * 60 * 60 + (t.starttime % 100) * 60)); else if (t.day) @@ -232,29 +232,29 @@ epgd.timerDialog.prototype.render = function (t) { d = epgd.utils.date((t.day + parseInt(t.endtime / 100, 10) * 60 * 60 + (t.endtime % 100) * 60)); else d = new Date(d.getTime() + 2 * 60 * 60000); - $(form.tEnd).datetimepicker('setTime', d); - } else { - $([form.tStart, form.tEnd]).val('...'); + $(form.tEnd).datetimepicker('setTime', d); + } else { + $([form.tStart, form.tEnd]).val('...'); } //form.tNameMode.defaultIndex = parseInt(t.category == 'Serie' ? epgd.profile.namingModeSerie : epgd.profile.namingModeMovie, 10); - form.tNameMode.selectedIndex = typeof t.namingmode == "undefined" ? parseInt(t.category == 'Serie' ? epgd.profile.namingModeSerie : epgd.profile.namingModeMovie, 10) : t.namingmode; - form.tTemplate.value = t.template || (t.category == 'Serie' ? epgd.profile.namingModeSerieTemplate : epgd.profile.namingModeMovieTemplate); - $(form.tNameMode).change(); + form.tNameMode.selectedIndex = typeof t.namingmode == "undefined" ? parseInt(t.category == 'Serie' ? epgd.profile.namingModeSerie : epgd.profile.namingModeMovie, 10) : t.namingmode; + form.tTemplate.value = t.template || (t.category == 'Serie' ? epgd.profile.namingModeSerieTemplate : epgd.profile.namingModeMovieTemplate); + $(form.tNameMode).change(); }; -epgd.timerDialog.prototype.getData = function (dontValid) { +epgd.timerDialog.prototype.getData = function (dontValid) { var form = this.form, d, i, data = {}; if (form.tEvID.value) data.eventid = parseInt(form.tEvID.value, 10); data.active = form.tInactive.checked ? 0 : 1; if (form.tID.value) data.id = parseInt(form.tID.value, 10); - if (form.tStart.value && form.tStart.value != '...') { + if (form.tStart.value && form.tStart.value != '...') { d = $(form.tStart).datepicker('getDate'); data.starttime = d.getHours() * 100 + d.getMinutes(); d.setHours(0); d.setMinutes(0); data.day = parseInt(d.getTime() / 1000, 10); - data.endtime = parseInt(form.tEnd.value.replace(':', ''), 10); + data.endtime = parseInt(form.tEnd.value.replace(':', ''), 10); } else if (!data.eventid && !dontValid) return this.showError(epgd.tr.error.emptyField.replace("$field$", epgd.tr.pages.timerList.recordTime), form.tStart); data.weekdays = 0; @@ -272,72 +272,75 @@ epgd.timerDialog.prototype.getData = function (dontValid) { if (form.tFolder.value) data.file = form.tFolder.value + '~' + data.file; */ + data.type = $(form.tType).val(); d = $(form.tVdr).val(); - if (d) data.vdruuid = d; + if (!d && data.type == 'V') + d= epgd.vdrs.current.uuid || ''; + if (d) + data.vdruuid = d; //if (!dontValid || form.tNameMode.defaultIndex != form.tNameMode.selectedIndex) data.namingmode = form.tNameMode.selectedIndex; data.template = form.tTemplate.value; - data.type = $(form.tType).val(); if (data.type == 'V' && !d && !dontValid) return this.showError(epgd.tr.error.emptyField.replace("$field$", "VDR"), form.tVdr); data.directory = form.tFolder.value; data.title = form.tTitle.innerHTML || ''; data.name = form.tSName.value; - return data; + return data; } // Suchtimerdialog - Klasse epgd.searchTimerDialog = epgd.utils.inherits(function (options) { this.searchResultList = null; - epgd.timerDialogBase.call(this,$.extend({},{ + epgd.timerDialogBase.call(this,$.extend({},{ id: 'searchTimerDialog', width: 530, title: epgd.tr.pages.timer.searchTimerList + ' ' + epgd.tr.edit, - buttons: [{ + buttons: [{ text: epgd.tr.pages.timer.timerList, icons: { primary: "ui-icon-transferthick-e-w" }, id: "tBToggle", - click: function () { + click: function () { var t = this.list.dialog.getData(true); - if (t) { + if (t) { $(this).dialog("close"); t.channelids && (t.channelid = t.channelids.split(',')[0]); t.expression && (t.title = t.expression); - epgd.pages.timerList.dialog.render(t); - } - } - }, { + epgd.pages.timerList.dialog.render(t); + } + } + }, { text: epgd.tr.test, - click: function () { - this.list.dialog.search(); - } - }].concat(epgd.searchTimerDialog.base.options.buttons, { + click: function () { + this.list.dialog.search(); + } + }].concat(epgd.searchTimerDialog.base.options.buttons, { text: epgd.tr.copy, icons: { primary: "ui-icon-copy" }, id: "tBCopy", - click: function (ev) { - $(ev.currentTarget).hide(); - this.list.dialog.form.tID.value = ''; - this.list.dialog.form.tSName.value += ' copy'; - this.list.dialog.form.tSName.select(); - } - }) + click: function (ev) { + $(ev.currentTarget).hide(); + this.list.dialog.form.tID.value = ''; + this.list.dialog.form.tSName.value += ' copy'; + this.list.dialog.form.tSName.select(); + } + }) },options)); }, epgd.timerDialogBase); -epgd.searchTimerDialog.prototype.search = function ($con, searchData) { - if (!this.searchResultList) - this.searchResultList = new epgd.searchResultList(null);//,this); - if (!this.searchResultList.$con || ($con && $con[0] != this.searchResultList.$con[0])) - this.searchResultList.render($con || ($('
').insertAfter(this.form))); - else - this.searchResultList.$con.find('tbody').empty(); - if (!this.searchResultList.$con.parent().length) { - this.searchResultList.$con.insertAfter(this.form); - this.searchResultList.init(); - } - this.searchResultList.update(searchData || this.getData()); - this.searchResultList.$con[0].scrollIntoView(true); +epgd.searchTimerDialog.prototype.search = function ($con, searchData) { + if (!this.searchResultList) + this.searchResultList = new epgd.searchResultList(null);//,this); + if (!this.searchResultList.$con || ($con && $con[0] != this.searchResultList.$con[0])) + this.searchResultList.render($con || ($('
').insertAfter(this.form))); + else + this.searchResultList.$con.find('tbody').empty(); + if (!this.searchResultList.$con.parent().length) { + this.searchResultList.$con.insertAfter(this.form); + this.searchResultList.init(); + } + this.searchResultList.update(searchData || this.getData()); + this.searchResultList.$con[0].scrollIntoView(true); } -epgd.searchTimerDialog.prototype.create = function () { +epgd.searchTimerDialog.prototype.create = function () { epgd.searchTimerDialog.base.create.call(this); var tr = epgd.tr.pages.timerList, @@ -348,13 +351,13 @@ epgd.searchTimerDialog.prototype.create = function () { for (key in trS.searchModes) sModes += ''; - if (!epgd.categories) { + if (!epgd.categories) { epgd.categories = []; - epgd.ajax({ url: 'data/categories', async: false }, function (data) { epgd.categories = data.categories; }); + epgd.ajax({ url: 'data/categories', async: false }, function (data) { epgd.categories = data.categories; }); } - if (!epgd.genres) { + if (!epgd.genres) { epgd.genres = []; - epgd.ajax({ url: 'data/genres', async: false }, function (data) { epgd.genres = data.genres; }); + epgd.ajax({ url: 'data/genres', async: false }, function (data) { epgd.genres = data.genres; }); } $(form.tSName).parent().parent().after('
' @@ -381,23 +384,23 @@ epgd.searchTimerDialog.prototype.create = function () { + '
'); $(form.tWeek[0]).before('' + epgd.tr.dateTimePicker.timeTextBetween + ' - ') .parent().append('
' + tr.nextDays.replace('$field$','') + '').insertAfter(form.tTime.parentNode); - $([form.tStart,form.tEnd]).timepicker({ - alwaysSetTime: false + $([form.tStart,form.tEnd]).timepicker({ + alwaysSetTime: false }); - $([form.tTime, form.tRepeat, form.tAdv]).change(function () { - $(this).parent().next().toggle(this.checked); + $([form.tTime, form.tRepeat, form.tAdv]).change(function () { + $(this).parent().next().toggle(this.checked); }); - $([form.tSFSeason, form.tSFSPart, form.tSFYear]).change(function () { + $([form.tSFSeason, form.tSFSPart, form.tSFYear]).change(function () { this.value = this.value.replace(/[^0-9-]/g, ''); if (this.value.length == 1 && this.value == '-') - this.value = ''; + this.value = ''; }); $(form.tType).append(''); epgd.utils.addAutoComplete(form.tChannels, { source: epgd.channels.autoCompleteData, multiselect: true }); epgd.utils.addAutoComplete(form.tSFCat, { source: epgd.categories, multiselect: true }); epgd.utils.addAutoComplete(form.tSFGenre, { source: epgd.genres, multiselect: true }); }; -epgd.searchTimerDialog.prototype.render = function (t) { +epgd.searchTimerDialog.prototype.render = function (t) { t = t || { searchfields: 1 }; epgd.searchTimerDialog.base.render.call(this, t); var form = this.form, @@ -408,12 +411,12 @@ epgd.searchTimerDialog.prototype.render = function (t) { d = t.searchfields || 0; for (i = 0, f = 1; i < form.tSFields.length; i++, f *= 2) form.tSFields[i].checked = (d & f); - if (t.starttime || t.endtime || t.weekdays || t.nextdays) { + if (t.starttime || t.endtime || t.weekdays || t.nextdays) { form.tTime.checked = true; t.starttime ? $(form.tStart).datetimepicker('setTime', new Date(0, 0, 0, parseInt(t.starttime / 100, 10), (t.starttime % 100))) : form.tStart.value = ''; - t.endtime ? $(form.tEnd).datetimepicker('setTime', new Date(0, 0, 0, parseInt(t.endtime / 100, 10), (t.endtime % 100))) : form.tEnd.value; - form.tNextDays.value = t.nextdays || ''; - } else + t.endtime ? $(form.tEnd).datetimepicker('setTime', new Date(0, 0, 0, parseInt(t.endtime / 100, 10), (t.endtime % 100))) : form.tEnd.value; + form.tNextDays.value = t.nextdays || ''; + } else form.tTime.checked = false; $(form.tTime).change(); d = t.repeatfields || 0; @@ -445,18 +448,18 @@ epgd.searchTimerDialog.prototype.render = function (t) { form.tChFormat.value = t.chformat || (t.id ? '' : epgd.profile.chFormat); form.tNameMode.defaultIndex = parseInt(t.category == 'Serie' ? epgd.profile.namingModeSearchSerie : epgd.profile.namingModeSearchMovie, 10); form.tNameMode.selectedIndex = typeof t.namingmode == "undefined" ? form.tNameMode.defaultIndex : t.namingmode; - form.tTemplate.value = typeof t.template == "undefined" ? (t.category == 'Serie' ? epgd.profile.namingModeSearchSerieTemplate : epgd.profile.namingModeSearchMovieTemplate) : t.template; - $(form.tNameMode).change(); - this.$win.parent().find('#tBCopy').toggle(!!t.id); + form.tTemplate.value = typeof t.template == "undefined" ? (t.category == 'Serie' ? epgd.profile.namingModeSearchSerieTemplate : epgd.profile.namingModeSearchMovieTemplate) : t.template; + $(form.tNameMode).change(); + this.$win.parent().find('#tBCopy').toggle(!!t.id); }; -epgd.searchTimerDialog.prototype.getData = function (dontValid) { +epgd.searchTimerDialog.prototype.getData = function (dontValid) { var form = this.form, d, i, data = { expression: form.tExpr.value }; if (form.tSFSeason.value) data.season = form.tSFSeason.value; if (form.tSFSPart.value) data.seasonpart = form.tSFSPart.value; if (form.tSFYear.value) data.year = form.tSFYear.value; - if (!dontValid) { + if (!dontValid) { if (!data.expression) return this.showError(epgd.tr.error.emptyField.replace("$field$", epgd.tr.pages.search.searchExpression), form.tExpr); if (data.season && !/^[0-9]{0,3}-?[0-9]{0,3}$/.test(data.season)) @@ -464,7 +467,7 @@ epgd.searchTimerDialog.prototype.getData = function (dontValid) { if (data.seasonpart && !/^[0-9]{0,3}-?[0-9]{0,3}$/.test(data.seasonpart)) return this.showError(epgd.tr.error.invalid, form.tSFSPart); if (data.year && !/^((19|20)[0-9]{2})?(-|-(19|20)[0-9]{2})?$/.test(data.year)) - return this.showError(epgd.tr.error.invalid, form.tSFYear); + return this.showError(epgd.tr.error.invalid, form.tSFYear); } if (form.tID.value) data.id = parseInt(form.tID.value, 10); if (form.tSFEpisode.value) data.episodename = form.tSFEpisode.value; @@ -483,23 +486,23 @@ epgd.searchTimerDialog.prototype.getData = function (dontValid) { data.searchfields += f; data.casesensitiv = form.tCaseSens.checked ? 1 : 0; data.repeatfields = 0; - if (form.tRepeat.checked) { + if (form.tRepeat.checked) { for (i = 0, f = 1; i < form.tRFields.length; i++, f *= 2) if (form.tRFields[i].checked) - data.repeatfields += f; + data.repeatfields += f; } data.active = form.tInactive.checked ? 0 : 1; data.channelids = epgd.utils.getAutoCompleteValues(form.tChannels); data.chformat = form.tChFormat.value; data.chexclude = form.tChExclude1.checked ? 1 : 0; - if (form.tTime.checked) { + if (form.tTime.checked) { data.starttime = parseInt(form.tStart.value.replace(':', ''), 10); - data.endtime = parseInt(form.tEnd.value.replace(':', ''), 10); + data.endtime = parseInt(form.tEnd.value.replace(':', ''), 10); data.weekdays = 0; for (i = 0, f = 1; i < form.tWeek.length; i++, f *= 2) if (form.tWeek[i].checked) - data.weekdays += f; + data.weekdays += f; } data.vps = form.tVPS.checked ? 1 : 0; if (form.tPrio.value) data.priority = parseInt(form.tPrio.value, 10); @@ -516,125 +519,125 @@ epgd.searchTimerDialog.prototype.getData = function (dontValid) { return this.showError(epgd.tr.error.emptyField.replace("$field$", "VDR"), form.tVdr); data.name = form.tSName.value; if (form.tNextDays.value) data.nextdays = parseInt(form.tNextDays.value,10); - return data; + return data; } -epgd.searchTimerDialog.prototype.save = function (d, url, failFunc, succFunc) { - d = d || this.getData(); - var self = this, - id= d.id, - name= d.name; - d.max = 0; - d.id && delete d.id; - d.name && delete d.name; - epgd.utils.loader.process(function () { - epgd.ajax({ +epgd.searchTimerDialog.prototype.save = function (d, url, failFunc, succFunc) { + d = d || this.getData(); + var self = this, + id= d.id, + name= d.name; + d.max = 0; + d.id && delete d.id; + d.name && delete d.name; + epgd.utils.loader.process(function () { + epgd.ajax({ url: epgd.login.url + "data/search", type: 'post', - data: JSON.stringify(d) - }, function (data) { - d.id = id; - d.name = name; - if (data.count > 50) { - epgd.utils.confirm(epgd.tr.pages.timerList.confirmSaveBigResult.replace('$cnt$', data.count), function (ok) { - ok && epgd.searchTimerDialog.base.save.call(self, d); - }); - } else - epgd.searchTimerDialog.base.save.call(self, d, url, failFunc, succFunc); - epgd.utils.loader.close(); - }); - },true); + data: JSON.stringify(d) + }, function (data) { + d.id = id; + d.name = name; + if (data.count > 50) { + epgd.utils.confirm(epgd.tr.pages.timerList.confirmSaveBigResult.replace('$cnt$', data.count), function (ok) { + ok && epgd.searchTimerDialog.base.save.call(self, d); + }); + } else + epgd.searchTimerDialog.base.save.call(self, d, url, failFunc, succFunc); + epgd.utils.loader.close(); + }); + },true); } // Suche - Klasse -epgd.searchDialog = epgd.utils.inherits(function () { - epgd.searchTimerDialog.call(this, { +epgd.searchDialog = epgd.utils.inherits(function () { + epgd.searchTimerDialog.call(this, { id: 'search', - embed: true, - buttons: null + embed: true, + buttons: null }); - this.searchResultList = new epgd.searchResultList({ - empty: epgd.tr.pages.search.empty + this.searchResultList = new epgd.searchResultList({ + empty: epgd.tr.pages.search.empty }, this); }, epgd.searchTimerDialog); -epgd.searchDialog.prototype.create = function () { - epgd.searchDialog.base.create.call(this); - var form = this.form, - search= this, - $result = $('
').appendTo(this.$win); - $('') - .insertAfter(form.tExpr) - .after('  '); - $(form.tType).parent().hide().parent().css('border-top','1px solid #ccc').insertAfter($(form.tVdr.parentNode.parentNode).hide()); - $('').insertAfter(form.tSName).click(function () { - search.form.tID.value = ''; - search.form.tSName.value += ' copy'; - search.form.tSName.select(); - }).prop("disabled", true); - $('').insertAfter(form.tSName).click(function () { - search.list.del(this.form.tID.value, function () { search.form.tID.value = '';search.loadSavedSearch() }); - }).prop("disabled", true); $('').insertAfter(form.tSName).click(function () { - var d = search.getData(); - if (!d.name) - return this.showError(epgd.tr.error.invalid, form.tSName); - search.save(d, null, null, function () { search.loadSavedSearch() }); - }); - $(form).submit(function () { - search.search($result); - return false; +epgd.searchDialog.prototype.create = function () { + epgd.searchDialog.base.create.call(this); + var form = this.form, + search= this, + $result = $('
').appendTo(this.$win); + $('') + .insertAfter(form.tExpr) + .after('  '); + $(form.tType).parent().hide().parent().css('border-top','1px solid #ccc').insertAfter($(form.tVdr.parentNode.parentNode).hide()); + $('').insertAfter(form.tSName).click(function () { + search.form.tID.value = ''; + search.form.tSName.value += ' copy'; + search.form.tSName.select(); + }).prop("disabled", true); + $('').insertAfter(form.tSName).click(function () { + search.list.del(this.form.tID.value, function () { search.form.tID.value = '';search.loadSavedSearch() }); + }).prop("disabled", true); $('').insertAfter(form.tSName).click(function () { + var d = search.getData(); + if (!d.name) + return this.showError(epgd.tr.error.invalid, form.tSName); + search.save(d, null, null, function () { search.loadSavedSearch() }); + }); + $(form).submit(function () { + search.search($result); + return false; }); this.$win.find('#sExpr').keyup(function (ev) { if (ev.keyCode == 13) { this.form.sSearch.click(); $(this).blur(); } }).focus(); //$(form.tExpr).parent().next().nextAll().wrapAll('
'); - this.$win.find('#sAdv').change(function () { + this.$win.find('#sAdv').change(function () { $(form).toggleClass("noAdv", !this.checked); search.resize(); }).prop('checked', epgd.profile.searchAdv == "1").change(); - $(form.tSName).autocomplete({ + $(form.tSName).autocomplete({ minLength: 0, - maxHeight: 300, - source:function(){return false}, // damit bei einem focus kein error ausgel�st wird - select: function (ev, ui) { - var d = ui.item.data || { id: '' }; - if (d.id) { - search.render(d); - search.form.sSearch.click(); - $([form.tDel, form.tCopy, form.tInactive]).prop("disabled", false); - return false; - } else { - form.tID.value = ''; - $([form.tDel, form.tCopy, form.tInactive]).prop("disabled", true); - } - } - }).focus(function () { - $(this).autocomplete("search", ""); + maxHeight: 300, + source:function(){return false}, // damit bei einem focus kein error ausgel�st wird + select: function (ev, ui) { + var d = ui.item.data || { id: '' }; + if (d.id) { + search.render(d); + search.form.sSearch.click(); + $([form.tDel, form.tCopy, form.tInactive]).prop("disabled", false); + return false; + } else { + form.tID.value = ''; + $([form.tDel, form.tCopy, form.tInactive]).prop("disabled", true); + } + } + }).focus(function () { + $(this).autocomplete("search", ""); }); - this.loadSavedSearch(); + this.loadSavedSearch(); } -epgd.searchDialog.prototype.loadSavedSearch = function () { - var form = this.form; - epgd.ajax({ url: epgd.login.url + "data/searchtimers?type=S" }, function (data) { - var list = []; - $.each(data.searchtimers, function (id, t) { - list.push({ value: t.name || t.expression, label: t.name || t.expression, data: t }); - }); - $(form.tSName).autocomplete("option", "source", list); - }); +epgd.searchDialog.prototype.loadSavedSearch = function () { + var form = this.form; + epgd.ajax({ url: epgd.login.url + "data/searchtimers?type=S" }, function (data) { + var list = []; + $.each(data.searchtimers, function (id, t) { + list.push({ value: t.name || t.expression, label: t.name || t.expression, data: t }); + }); + $(form.tSName).autocomplete("option", "source", list); + }); } -epgd.searchDialog.prototype.resize = function () { +epgd.searchDialog.prototype.resize = function () { var $result = this.$win.find('#searchResult'), h = $(window).height() - $result.offset().top - 20; if (h < 100) $result.css({ 'height': 'auto', 'overflow-y': 'visible' }); else - $result.css({ 'height': h + 'px', 'overflow-y': 'auto' }); + $result.css({ 'height': h + 'px', 'overflow-y': 'auto' }); } -epgd.searchDialog.prototype.render = function (t) { - if (!epgd.$con.find('#search').length) { +epgd.searchDialog.prototype.render = function (t) { + if (!epgd.$con.find('#search').length) { $('#menu_search').addClass("menu-active"); - this.create(); + this.create(); epgd.$con.html(''); this.$win.appendTo(epgd.$con); } - t = t || { searchfields: 1 }; - t.type = 'S'; - epgd.searchDialog.base.render.call(this, t); -} -epgd.searchDialog.prototype.close = function () { } + t = t || { searchfields: 1 }; + t.type = 'S'; + epgd.searchDialog.base.render.call(this, t); +} +epgd.searchDialog.prototype.close = function () { } diff --git a/http/src/js/eventDetail.js b/http/src/js/eventDetail.js index 939b7ff..6574aab 100644 --- a/http/src/js/eventDetail.js +++ b/http/src/js/eventDetail.js @@ -66,10 +66,20 @@ epgd.eventDetail.prototype.doRepeat = function (checkAvail) { } epgd.eventDetail.prototype.doPlay = function (checkAvail) { var t = parseInt(epgd.utils.now().getTime() / 1000, 10) - this.data.starttime; - if (t < 0 || t > this.data.duration) + if (t > this.data.duration) return false; - if (checkAvail) return true; - epgd.vdrs.current.switchChannel(this.data.channelid); + if (checkAvail) return !!epgd.vdrs.current.uuid; + if (t < 0 ){ // Umschalttimer + epgd.pages.timerList.save({ + type: 'V', + active: 1, + vdruuid: epgd.vdrs.current.uuid, + eventid: this.data.id, + channelid: this.data.channelid, + title: this.data.title + }); + } else + epgd.vdrs.current.switchChannel(this.data.channelid); } epgd.eventDetail.prototype.doPrev = function (checkAvail) { var t = this.data.starttime - 500, diff --git a/http/src/js/pages.timer.js b/http/src/js/pages.timer.js index 44b1cd7..c6501f0 100644 --- a/http/src/js/pages.timer.js +++ b/http/src/js/pages.timer.js @@ -14,9 +14,9 @@ epgd.sortTable.prototype = { + ($ths.last().find('.i-doc-new').wrapAll('
').parent().html() || '') + ''); }, showHead: function(){ - this.$con.find('>table>thead').show(); - this.filter(); - this.sort(); + this.$con.find('>table>thead').show(); + this.filter(); + this.sort(); }, getTable: function () { }, action: function ($el, iconName, data) { @@ -42,10 +42,10 @@ epgd.sortTable.prototype = { this.init(); this.update(searchData); }, - init: function () { + init: function () { var list = this, - cIndex = 0; - this.$con.find('>table').click(function (ev) { + cIndex = 0; + this.$con.find('>table').click(function (ev) { var $el = $(ev.target), el = $el[0], data = el.getAttribute('data-evId'), @@ -53,133 +53,133 @@ epgd.sortTable.prototype = { $lastSel; if (data) list.action($el, 'detail', data); - else if (ev.target.className == 'i-tv') { - epgd.vdrs.current.switchChannel(ev.target.parentNode.id); - } else { + else if (ev.target.className == 'i-tv') { + epgd.vdrs.current.switchChannel(ev.target.parentNode.id); + } else { //if (!searchData || searchData.fromEventDetail != true) // $(window).trigger("epgd_close.eventDetail"); $el = $el.closest('span.sort'); - if ($el.length) { + if ($el.length) { $el.parent().parent().find('.ui-state-highlight').removeClass('ui-state-highlight'); $el.addClass("ui-state-highlight"); - list.sort($el); - } else { + list.sort($el); + } else { $el = $(el).closest('span.edit'); - if ($el.length) { - list.action($el, $el[0].className.match(/i-([a-z0-9-]+)/)[1]); - } if (list.o.selectable) { - if (el.nodeName == 'TD') { + if ($el.length) { + list.action($el, $el[0].className.match(/i-([a-z0-9-]+)/)[1]); + } if (list.o.selectable) { + if (el.nodeName == 'TD') { $el = $(el).parent().toggleClass('selected'); - if (ev.shiftKey && this.lastSel) { + if (ev.shiftKey && this.lastSel) { $lastSel = $(this.lastSel); d = $el.index() - $lastSel.index(); if (d > 0) $lastSel.nextAll(':lt(' + d + '):visible').toggleClass('selected', $lastSel.hasClass('selected')); else - $lastSel.prevAll(':lt(' + -d + '):visible').toggleClass('selected', $lastSel.hasClass('selected')); + $lastSel.prevAll(':lt(' + -d + '):visible').toggleClass('selected', $lastSel.hasClass('selected')); } else - this.lastSel = $el[0]; - } else if (el.nodeName == 'B') { + this.lastSel = $el[0]; + } else if (el.nodeName == 'B') { d = el.getAttribute('data-t'); $(list.trs).filter(":visible").toggleClass('selected', d == 1 ? true : d == 0 ? false : undefined); - return false; - } - } + return false; + } + } } - return false; - } - }).find('>thead>tr').find('>th').each(function () { - this.cIndex = cIndex; - cIndex += this.colSpan; + return false; + } + }).find('>thead>tr').find('>th').each(function () { + this.cIndex = cIndex; + cIndex += this.colSpan; }).end().find('[data-defaultSort="1"]>span.sort:last,[data-defaultSort="-1"]>span.sort:first').addClass('ui-state-highlight'); - this.$con.find('>table>thead input.filter').keyup(function () { - list.filter(); - }).each(function () { - if (!this.result) - this.result = $('').insertAfter(this)[0]; + this.$con.find('>table>thead input.filter').keyup(function () { + list.filter(); + }).each(function () { + if (!this.result) + this.result = $('').insertAfter(this)[0]; }); }, - sort: function ($el) { - $el = $el || this.$con.find('>table>thead .ui-state-highlight'); - if (!$el.length) return; + sort: function ($el) { + $el = $el || this.$con.find('>table>thead .ui-state-highlight'); + if (!$el.length) return; var i = $el.parent()[0], d = ($el.hasClass('i-sort-name-down') ? -1 : 1), trs = this.trs, l,td; - if (!i.sortInfo) { + if (!i.sortInfo) { i = i.cIndex; - for (l = 0; l < trs.length; l++) { + for (l = 0; l < trs.length; l++) { td = trs[l].cells[i]; - td.sort = td.getAttribute('data-sort') || $(td).text().toLowerCase(); - }; + td.sort = td.getAttribute('data-sort') || $(td).text().toLowerCase(); + }; } else i = i.cIndex; - trs.sort(function (a, b) { + trs.sort(function (a, b) { var va = a.cells[i].sort, vb = b.cells[i].sort; - return (va > vb ? 1 * d : va == vb ? 0 : -1 * d); + return (va > vb ? 1 * d : va == vb ? 0 : -1 * d); }); this.$con.find('>table>tbody').append(trs.slice()); }, filter: function(){ - var cells = {}, - l, i, - tr, hide; - this.$con.find('>table>thead input.filter').each(function () { - if (this.value) - cells[this.parentNode.cIndex] = [this.value.toLowerCase(),0,this.result || {}]; - else if (this.result) - this.result.innerHTML= ''; - }); - for (l = 0; l < this.trs.length; l++) { - tr = this.trs[l]; - hide = ''; - for (i in cells) { - if (tr.cells[i].innerHTML.toLowerCase().indexOf(cells[i][0]) == -1) - hide = 'none'; - else - cells[i][1]++; - } - tr.style.display = hide; - }; - for (i in cells) - if (cells[i][2].innerHTML = cells[i][1]); + var cells = {}, + l, i, + tr, hide; + this.$con.find('>table>thead input.filter').each(function () { + if (this.value) + cells[this.parentNode.cIndex] = [this.value.toLowerCase(),0,this.result || {}]; + else if (this.result) + this.result.innerHTML= ''; + }); + for (l = 0; l < this.trs.length; l++) { + tr = this.trs[l]; + hide = ''; + for (i in cells) { + if (tr.cells[i].innerHTML.toLowerCase().indexOf(cells[i][0]) == -1) + hide = 'none'; + else + cells[i][1]++; + } + tr.style.display = hide; + }; + for (i in cells) + if (cells[i][2].innerHTML = cells[i][1]); } } -epgd.timerEditChFormat = function (input) { +epgd.timerEditChFormat = function (input) { var formats = ',SD,HD,3D', values = input.value, i; - if (values) { + if (values) { values = values.split(','); for (i = 0; i < values.length; i++) - formats = formats.replace(',' + values[i] + ',', ','); + formats = formats.replace(',' + values[i] + ',', ','); } $('
    ' + (values.length ? '
  1. ' + values.join('
  2. ') + '
  3. ' : '') + '
    ' + (formats.length > 1 ? '
  • ' + formats.slice(1).replace(/,/g, '
  • ') + '
  • ' : '') + '
') - .dialog({ + .dialog({ modal: true, - buttons: [{ + buttons: [{ text: epgd.tr.apply, - click: function () { + click: function () { var val = ''; $(this).find('ol > li').each(function () { val += ',' + this.innerHTML; }); input.value = val.slice(1); - $(this).dialog("close"); - } - }, { + $(this).dialog("close"); + } + }, { text: epgd.tr.cancel, - click: function () { - $(this).dialog("close"); - } - }] - }).find('ul,ol').sortable({ - connectWith: "ul,ol" - }).disableSelection(); + click: function () { + $(this).dialog("close"); + } + }] + }).find('ul,ol').sortable({ + connectWith: "ul,ol" + }).disableSelection(); }; @@ -208,16 +208,16 @@ epgd.timerListBase.prototype.getTable = function () { } epgd.timerListBase.prototype.update = function () { var timerList = this; - epgd.utils.loader.process(function () { + epgd.utils.loader.process(function () { timerList.$con.find('tbody').empty(); - epgd.ajax({ url: epgd.login.url + timerList.o.updateUrl, async: false, cache: false }, function (data) { - if (!data.timers.length) { - timerList.hideHead(); - } else { + epgd.ajax({ url: epgd.login.url + timerList.o.updateUrl, async: false, cache: false }, function (data) { + if (!data.timers.length) { + timerList.hideHead(); + } else { var trs = [], editIcons = timerList.editIcons, noEditStates = 'DF', - stateIcons = { + stateIcons = { 'D': '
' + epgd.tr.pages.timerList.timerStates.D + '
', // gelöscht 'E': '
' + epgd.tr.pages.timerList.timerStates.E + '
', // Fehler 'F': '
' + epgd.tr.pages.timerList.timerStates.F + '
', // Aufnahme erfolgreich @@ -225,9 +225,10 @@ epgd.timerListBase.prototype.update = function () { 'P': '
' + epgd.tr.pages.timerList.timerStates.P + '
', // wartet auf Aufnhemebeginn 'U': '
' + epgd.tr.pages.timerList.timerStates.U + '
' // unbekannt }, + typeIcons = { 'V': 'i-tv', 'R': 'i-record', 'S': 'i-search' }, timerActions = epgd.tr.pages.timerList.timerActions, searchTimerIcon = '$title$'; - $.each(data.timers, function (id, t) { + $.each(data.timers, function (id, t) { t.action = t.action ? t.action.toUpperCase() : 'A'; t.state = t.state ? t.state.toUpperCase() : 'U'; var vdr = epgd.vdrs.list[t.vdruuid] || { name: '--' }, @@ -245,12 +246,12 @@ epgd.timerListBase.prototype.update = function () { + new String(100 + parseInt(t.starttime / 100, 10)).slice(1) + ':' + new String(100 + parseInt(t.starttime % 100, 10)).slice(1) + '' + new String(100 + parseInt(t.endtime / 100, 10)).slice(1) + ':' + new String(100 + parseInt(t.endtime % 100, 10)).slice(1) - + '' + (t.title || '') + '
' + (t.shorttext || '') : '>') + '' + + '' + (t.title || '') + '
' + (t.shorttext || '') : '>') + '' + vdr.name + '
' + (t.directory ? t.directory + '~' : '') + (t.file || '') + '' + (t.autotimerid ? searchTimerIcon.replace('$id$', t.autotimerid).replace('$title$', t.autotimername || t.expression || epgd.tr.pages.timer.searchTimerList) : '') + (noEditStates.indexOf(t.state) == -1 ? editIcons : '') + '')[0]; tr.tData = t; - trs.push(tr); + trs.push(tr); }); timerList.trs = trs; timerList.showHead(); @@ -258,11 +259,11 @@ epgd.timerListBase.prototype.update = function () { items: "div", content: function () { return this.innerHTML; } - })*/ + })*/ } epgd.utils.loader.close(); - $(window).trigger('timerlist_updated', timerList); - }); + $(window).trigger('timerlist_updated', timerList); + }); },true); } epgd.timerListBase.prototype.action = function ($el, iconName,data) { @@ -294,107 +295,107 @@ epgd.timerListBase.prototype.action = function ($el, iconName,data) { } }; epgd.timerListBase.prototype.editIcons = ''; -epgd.timerListBase.prototype.getSelectedIds = function ($el) { - var ids = []; - if ($el[0].parentNode.nodeName == 'TH') { - $(this.trs).filter(".selected:visible").each(function () { - ids.push(this.tData.id); - }); - } else - ids.push($el.closest('tr')[0].tData.id); - return ids; +epgd.timerListBase.prototype.getSelectedIds = function ($el) { + var ids = []; + if ($el[0].parentNode.nodeName == 'TH') { + $(this.trs).filter(".selected:visible").each(function () { + ids.push(this.tData.id); + }); + } else + ids.push($el.closest('tr')[0].tData.id); + return ids; } -epgd.timerListBase.prototype.del = function (ids, succFunc, arrayName) { +epgd.timerListBase.prototype.del = function (ids, succFunc, arrayName) { var self = this, allIDs= $.isArray(ids) ? ids : [parseInt(ids,10)]; - ids && allIDs.length && epgd.utils.confirm(epgd.tr.confirmDelete + (allIDs.length > 1 ? '
' + allIDs.length + epgd.tr.entries : ''), function (ok) { - ok && self.saveArray(allIDs, arrayName || "delete", succFunc); - }); + ids && allIDs.length && epgd.utils.confirm(epgd.tr.confirmDelete + (allIDs.length > 1 ? '
' + allIDs.length + epgd.tr.entries : ''), function (ok) { + ok && self.saveArray(allIDs, arrayName || "delete", succFunc); + }); } epgd.timerListBase.prototype.saveArray = function (ids, arrayName, succFunc) { var self = this, allIDs= $.isArray(ids) ? ids : [parseInt(ids,10)], data= {}; data[arrayName] = allIDs; - ids && allIDs.length && this.save(data, null, function (jqxhr) { - try { + ids && allIDs.length && this.save(data, null, function (jqxhr) { + try { var ids = ','; - $(jqxhr.responseJSON.result.failed).each(function () { - ids += allIDs[this] + ','; + $(jqxhr.responseJSON.result.failed).each(function () { + ids += allIDs[this] + ','; }); - if (ids.length > 1) { - $(self.trs).each(function () { + if (ids.length > 1) { + $(self.trs).each(function () { if (ids.indexOf(',' + this.tData.id + ',') >= 0) - this.style.backgroundColor = 'red'; - }); - } + this.style.backgroundColor = 'red'; + }); + } } catch (e) { } - return false; + return false; }, succFunc); }; epgd.timerListBase.prototype.save = function (data, url, failFunc, succFunc) { if (!data) return false; var timerList = this; - epgd.utils.loader.process(function () { - epgd.ajax({ + epgd.utils.loader.process(function () { + epgd.ajax({ url: epgd.login.url + (url || timerList.o.saveUrl), type: 'post', - data: JSON.stringify(data) - }, function (data) { + data: JSON.stringify(data) + }, function (data) { data = data.result; if (data.state == 200) epgd.utils.topInfo(epgd.tr.dataSaved); else epgd.utils.topInfo(data.message, { isError: 1 }); epgd.utils.loader.close(); - timerList.$con && timerList.$con.parent().length && timerList.update(); - succFunc && succFunc.call(timerList); - }, failFunc); + timerList.$con && timerList.$con.parent().length && timerList.update(); + succFunc && succFunc.call(timerList); + }, failFunc); },true); return true; } // searchResult List - Klasse -epgd.searchResultList = epgd.utils.inherits(function (options, dialog) { - epgd.timerListBase.call(this, $.extend({ - saveUrl: 'data/save-searchtimer' - }, options),dialog); +epgd.searchResultList = epgd.utils.inherits(function (options, dialog) { + epgd.timerListBase.call(this, $.extend({ + saveUrl: 'data/save-searchtimer' + }, options),dialog); }, epgd.timerListBase); -epgd.searchResultList.prototype.getTable = function () { +epgd.searchResultList.prototype.getTable = function () { var tr = epgd.tr.pages.timerList; return '
' + epgd.tr.channel + this.sortIcons + '' + tr.startTime + this.sortIcons + '' - + tr.endTime + '' + epgd.tr.pages.eventDetail.title + this.sortIcons + '
'; + + tr.endTime + '' + epgd.tr.pages.eventDetail.title + this.sortIcons + ''; } -epgd.searchResultList.prototype.update = function (d) { +epgd.searchResultList.prototype.update = function (d) { if (!d) return false; var timerList = this; - d.id && delete d.id; - d.name && delete d.name; + d.id && delete d.id; + d.name && delete d.name; d.max = epgd.profile.maxListEntries; - epgd.utils.loader.process(function () { - timerList.$con.find('tbody').empty(); - epgd.ajax({ + epgd.utils.loader.process(function () { + timerList.$con.find('tbody').empty(); + epgd.ajax({ url: epgd.login.url + "data/search", type: 'post', - data: JSON.stringify(d) - }, function (data) { + data: JSON.stringify(d) + }, function (data) { var trs = [], i; - if (!data.events || !data.events.length) { - timerList.hideHead(); - } else { - data.count > d.max && epgd.utils.popup('Achtung! Es wurden ' + data.count + ' Ergebnisse gefunden. Angezeigt werden aber nur ' + d.max + '.
Das Nachladen ist noch nicht implementiert! Der Wert kann in den Einstellungen angepasst werden'); - $.each(data.events, function (id, e) { + if (!data.events || !data.events.length) { + timerList.hideHead(); + } else { + data.count > d.max && epgd.utils.popup('Achtung! Es wurden ' + data.count + ' Ergebnisse gefunden. Angezeigt werden aber nur ' + d.max + '.
Das Nachladen ist noch nicht implementiert! Der Wert kann in den Einstellungen angepasst werden'); + $.each(data.events, function (id, e) { var trClass = '', icons = '', d; - if (e.dones) { - for (i in e.dones) { + if (e.dones) { + for (i in e.dones) { d = e.dones[i]; icons += '' + d.state + ''; if (d.state == 'R') - trClass = ' class="ui-state-disabled"'; - } + trClass = ' class="ui-state-disabled"'; + } } trs.push($('' + epgd.channels.getHtml(e.channelid) + '' @@ -402,42 +403,42 @@ epgd.searchResultList.prototype.update = function (d) { + epgd.utils.formatTime(e.starttime) + '' + epgd.utils.formatTime(e.starttime + e.duration) + '' + e.title + '
' + (e.shorttext || '') - + '' + icons + '').tooltip()[0]); + + '' + icons + '').tooltip()[0]); }); timerList.trs = trs; - timerList.showHead(); + timerList.showHead(); } epgd.utils.loader.close(); timerList.dialog && timerList.dialog.resize && window.setTimeout(function(){timerList.dialog.resize();},100); - }); - },true); + }); + },true); }; // Timerliste eines Suchtimers - Klasse -epgd.searchTimerTimerList = epgd.utils.inherits(function (options, dialog) { - epgd.timerListBase.call(this, $.extend({ +epgd.searchTimerTimerList = epgd.utils.inherits(function (options, dialog) { + epgd.timerListBase.call(this, $.extend({ saveUrl: 'data/save-timer', - updateUrl: 'data/timers?state=P,R' - }, options), dialog); + updateUrl: 'data/timers?state=P,R' + }, options), dialog); }, epgd.timerListBase); -epgd.searchTimerTimerList.prototype.getTable = function () { +epgd.searchTimerTimerList.prototype.getTable = function () { var tr = epgd.tr.pages.timerList; return '
' + epgd.tr.channel + this.sortIcons + '' + tr.startTime + this.sortIcons + '' + tr.endTime + '' + epgd.tr.pages.eventDetail.title + this.sortIcons + 'VDR' + this.sortIcons + '' - + '
'; + + ''; } -epgd.searchTimerTimerList.prototype.update = function (d) { +epgd.searchTimerTimerList.prototype.update = function (d) { if (!d) - return false; + return false; var timerList = this; - epgd.utils.loader.process(function () { - timerList.$con.find('tbody').empty(); - epgd.ajax({ url: epgd.login.url + timerList.o.updateUrl + '&autotimerid=' + d.id, async: true, cache: false }, function (data) { + epgd.utils.loader.process(function () { + timerList.$con.find('tbody').empty(); + epgd.ajax({ url: epgd.login.url + timerList.o.updateUrl + '&autotimerid=' + d.id, async: true, cache: false }, function (data) { var trs = [], editIcons = ''; - if (!data.timers.length) { - timerList.hideHead(); - } else { - $.each(data.timers, function (id, t) { + if (!data.timers.length) { + timerList.hideHead(); + } else { + $.each(data.timers, function (id, t) { var vdr = epgd.vdrs.list[t.vdruuid] || { name: '--' }, tr = $('' + epgd.channels.getHtml(t.channelid) + '' @@ -450,38 +451,38 @@ epgd.searchTimerTimerList.prototype.update = function (d) { + vdr.name + '
' + t.file + '' + editIcons + '')[0]; tr.tData = t; - trs.push(tr); + trs.push(tr); }); timerList.trs = trs; - timerList.showHead(); + timerList.showHead(); } timerList.dialog && timerList.dialog.resize && window.setTimeout(function () { timerList.dialog.resize(); }, 100); - epgd.utils.loader.close(); - }); - }); + epgd.utils.loader.close(); + }); + }); } // anstehende Timer -epgd.pages.timerList = new epgd.timerListBase({ - updateUrl: 'data/timers?state=P,R', - saveUrl: 'data/save-timer', - selectable: true, - addNew: true, - right: epgd.rights.umTimer +epgd.pages.timerList = new epgd.timerListBase({ + updateUrl: 'data/timers?state=P,R', + saveUrl: 'data/save-timer', + selectable: true, + addNew: true, + right: epgd.rights.umTimer }, new epgd.timerDialog()); // Küzlich erledigte Timer -epgd.pages.timersDone = new epgd.timerListBase({ - updateUrl: 'data/timers?state=D,F,E&action=A', - right: epgd.rights.umTimer +epgd.pages.timersDone = new epgd.timerListBase({ + updateUrl: 'data/timers?state=D,F,E&action=A', + right: epgd.rights.umTimer }); -epgd.pages.timersDone.getTable = function () { - return epgd.timerListBase.prototype.getTable.call(this).replace('data-defaultSort="1"', 'data-defaultSort="-1"') +epgd.pages.timersDone.getTable = function () { + return epgd.timerListBase.prototype.getTable.call(this).replace('data-defaultSort="1"', 'data-defaultSort="-1"') } // Timerhistorie -epgd.pages.timerListDone = new epgd.timerListBase({ - updateUrl: 'data/donetimers', saveUrl: 'data/store-donetimers', - selectable: true, - right: epgd.rights.umTimer +epgd.pages.timerListDone = new epgd.timerListBase({ + updateUrl: 'data/donetimers', saveUrl: 'data/store-donetimers', + selectable: true, + right: epgd.rights.umTimer }); epgd.pages.timerListDone.getTable = function () { return '
' @@ -494,12 +495,12 @@ epgd.pages.timerListDone.getTable = function () { + '" data-t="0">' + '
'; } -epgd.pages.timerListDone.action = function ($el, iconName,data) { - if (iconName == 'detail' && !$el[0].eventDetail) - $el[0].eventDetail = new epgd.doneTimerDetail($el.parent()[0]); - epgd.timerListBase.prototype.action.call(this, $el, iconName, data); +epgd.pages.timerListDone.action = function ($el, iconName,data) { + if (iconName == 'detail' && !$el[0].eventDetail) + $el[0].eventDetail = new epgd.doneTimerDetail($el.parent()[0]); + epgd.timerListBase.prototype.action.call(this, $el, iconName, data); } -epgd.pages.timerListDone.stateIcons = { +epgd.pages.timerListDone.stateIcons = { 'D': '
' + epgd.tr.pages.timerList.doneStates.D + '
', // gelöscht 'F': '
' + epgd.tr.pages.timerList.doneStates.F + '
', // Aufnahme fehlgeschlagen 'f': '
' + epgd.tr.pages.timerList.doneStates.f + '
', // Timer konnte nicht erstellt werden @@ -509,16 +510,16 @@ epgd.pages.timerListDone.stateIcons = { } epgd.pages.timerListDone.update = function () { var timerList = this; - epgd.utils.loader.process(function () { - epgd.ajax({ url: epgd.login.url + timerList.o.updateUrl, async: false, cache: false }, function (data) { + epgd.utils.loader.process(function () { + epgd.ajax({ url: epgd.login.url + timerList.o.updateUrl, async: false, cache: false }, function (data) { timerList.$con.find('tbody').empty(); - if (!data.donetimers.length) { - timerList.hideHead(); - } else { + if (!data.donetimers.length) { + timerList.hideHead(); + } else { var trs = [], tr, i, t, searchTimerIcon = '$title$'; - for (i in data.donetimers) { + for (i in data.donetimers) { t = data.donetimers[i]; tr = $('' + (t.state && timerList.stateIcons[t.state] || '') + '' @@ -530,28 +531,28 @@ epgd.pages.timerListDone.update = function () { + (t.autotimerid ? searchTimerIcon.replace('$id$', t.autotimerid).replace('$title$', t.autotimername || t.expression || epgd.tr.pages.timer.searchTimerList) : '') + '')[0]; tr.tData = t; - trs.push(tr); + trs.push(tr); }; timerList.trs = trs; - timerList.showHead(); + timerList.showHead(); } epgd.utils.loader.close(); - $(window).trigger('timerlist_updated', timerList); - }); + $(window).trigger('timerlist_updated', timerList); + }); },true); } // ungesyncte Aufträge -epgd.pages.timerJobList = new epgd.timerListBase({ - updateUrl: "data/timers?notaction=A", - saveUrl: 'data/delete-timerjobs', - selectable: true, - right: epgd.rights.umTimer +epgd.pages.timerJobList = new epgd.timerListBase({ + updateUrl: "data/timers?notaction=A", + saveUrl: 'data/delete-timerjobs', + selectable: true, + right: epgd.rights.umTimer }, new epgd.timerDialog()); // Suchtimer -epgd.pages.searchTimerList = new epgd.timerListBase({ - saveUrl: 'data/save-searchtimer', - right: epgd.rights.umSearchTimer +epgd.pages.searchTimerList = new epgd.timerListBase({ + saveUrl: 'data/save-searchtimer', + right: epgd.rights.umSearchTimer }, new epgd.searchTimerDialog()); epgd.pages.searchTimerList.getTable = function () { var tr = epgd.tr.pages.timerList; @@ -571,26 +572,26 @@ epgd.pages.searchTimerList.action = function ($el, iconName, data) { break; case 'down-dir': if (!$el[0].tList) { - var dialog={ - $td: $el.parent().css("position", "relative"), - tdHeight: $el.parent().outerHeight() + 10, - data: $el.parent().parent()[0].tData, - resize: function () { + var dialog={ + $td: $el.parent().css("position", "relative"), + tdHeight: $el.parent().outerHeight() + 10, + data: $el.parent().parent()[0].tData, + resize: function () { var $table = this.list.$con.find('>table').addClass("sub"); $table.width(this.$td.parent().outerWidth()); this.$td.height(this.tdHeight + $table.outerHeight(true) + 10); //this.$td.append(this.list.$con); - }, - toggle : function (doShow) { + }, + toggle : function (doShow) { this.list.$con.toggle(doShow); - if (doShow) { - this.$td.css("height", "100px"); - this.list.update(this.data); + if (doShow) { + this.$td.css("height", "100px"); + this.list.update(this.data); } else - this.$td.css("height", "auto"); + this.$td.css("height", "auto"); } }, - options= { + options= { conSel: $('
').appendTo(document.body) }; $el[0].tList = dialog.data.type == 'S' ? new epgd.searchResultList(options, dialog) : new epgd.searchTimerTimerList(options, dialog); @@ -610,15 +611,15 @@ epgd.pages.searchTimerList.action = function ($el, iconName, data) { epgd.pages.searchTimerList.update = function () { var timerList = this; this.$con.find('tbody').empty(); - epgd.utils.loader.process(function () { - epgd.ajax({ url: epgd.login.url + "data/searchtimers", async: false, cache: false }, function (data) { + epgd.utils.loader.process(function () { + epgd.ajax({ url: epgd.login.url + "data/searchtimers", async: false, cache: false }, function (data) { var trs = [], editIcons = timerList.editIcons, typeIcons = { 'V': 'i-tv', 'R': 'i-record', 'S': 'i-search' }; - if (!data.searchtimers.length) { - timerList.hideHead(); - } else { - $.each(data.searchtimers, function (id, t) { + if (!data.searchtimers.length) { + timerList.hideHead(); + } else { + $.each(data.searchtimers, function (id, t) { var vdr = epgd.vdrs.list[t.vdruuid] || { name: '--' }, tr = $('' + '' @@ -626,14 +627,14 @@ epgd.pages.searchTimerList.update = function () { + (t.type == 'S' ? '>--' : ' data-sort="' + new String('00000' + t.hits).slice(-5) + '">' + t.hits) + '' + vdr.name + '' + editIcons + '')[0]; tr.tData = t; - trs.push(tr); + trs.push(tr); }); timerList.trs = trs; - timerList.showHead(); + timerList.showHead(); } epgd.utils.loader.close(); - $(window).trigger('searchTimerList_updated', timerList); - }); + $(window).trigger('searchTimerList_updated', timerList); + }); }); } epgd.pages.searchTimerList.triggerUpdate = function () { @@ -650,11 +651,11 @@ epgd.pages.searchTimerList.triggerUpdate = function () { epgd.pages.search = new epgd.searchDialog(); //message List -epgd.pages.messageList = new epgd.timerListBase({ - saveUrl: 'data/markmessages', - selectable: true +epgd.pages.messageList = new epgd.timerListBase({ + saveUrl: 'data/markmessages', + selectable: true }) -epgd.pages.messageList.getTable = function () { +epgd.pages.messageList.getTable = function () { return '' + '' + '' @@ -667,29 +668,29 @@ epgd.pages.messageList.getTable = function () { + '' + '' + '' - + '
id' + this.sortIcons + '' + 'Typ' + ' ' + this.sortIcons + '' + 'Zeit' + this.sortIcons + '
'; + + ''; } -epgd.pages.messageList.update = function (d) { +epgd.pages.messageList.update = function (d) { var messList = this; - epgd.utils.loader.process(function () { - epgd.ajax({ url: epgd.login.url + "data/messages", async: false, cache: false }, function (data) { + epgd.utils.loader.process(function () { + epgd.ajax({ url: epgd.login.url + "data/messages", async: false, cache: false }, function (data) { messList.$con.find('tbody').empty(); - if (!data.messages.length) { - messList.hideHead(); - } else { + if (!data.messages.length) { + messList.hideHead(); + } else { var trs = [], tr, i, t, - icons = { + icons = { 'N': '' + epgd.tr.pages.timerList.messageStates.N + '', - 'R': '' + epgd.tr.pages.timerList.messageStates.R + '' + 'R': '' + epgd.tr.pages.timerList.messageStates.R + '' }, - types = { + types = { 'E': '
' + epgd.tr.pages.timerList.timerStates.E + '
', 'F': '
' + epgd.tr.pages.timerList.timerStates.F + '
', - 'I': '
' + epgd.tr.pages.timerList.messageTypes.I + '
', - 'W': '
' + epgd.tr.pages.timerList.messageTypes.W + '
' + 'I': '
' + epgd.tr.pages.timerList.messageTypes.I + '
', + 'W': '
' + epgd.tr.pages.timerList.messageTypes.W + '
' }; - for (i in data.messages) { + for (i in data.messages) { t = data.messages[i]; tr = $('' + t.id + '' + '' + (types[t.type] ||'') +'' @@ -700,44 +701,44 @@ epgd.pages.messageList.update = function (d) { + '' + (icons[t.state] || '') + '' + '')[0]; tr.tData = t; - trs.push(tr); + trs.push(tr); }; messList.trs = trs; messList.$con.find('>table>tbody').append(trs.sort(function (a,b) { return a.tData.state == b.tData.state ? a.tData.state.updsp > b.tData.state.updsp ? -1 : 1 - : a.tData.state > b.tData.state + : a.tData.state > b.tData.state }).slice()); - messList.showHead(); + messList.showHead(); } epgd.utils.loader.close(); - $(window).trigger('messagelist_updated', messList); - }); - }, true); -}; -epgd.pages.messageList.action = function ($el, iconName, data) { + $(window).trigger('messagelist_updated', messList); + }); + }, true); +}; +epgd.pages.messageList.action = function ($el, iconName, data) { var ids = this.getSelectedIds($el), state= null, i; - if (ids) { - switch (iconName) { + if (ids) { + switch (iconName) { case 'check': state = $el[0].parentNode.nodeName == 'TH' ? 'R' : 'N'; break; case 'check-empty': state = $el[0].parentNode.nodeName == 'TH' ? 'N' : 'R'; - break; + break; case 'trash': state = 'D' - break; - } - if (state) { - for (i in ids) - ids[i]= {"id":ids[i], "state":state} - state == 'D' ? this.del(ids, null,"messages") : this.saveArray(ids, "messages"); - return true; - } - } - return epgd.timerListBase.prototype.action.call(this, $el, iconName, data); -} - + break; + } + if (state) { + for (i in ids) + ids[i]= {"id":ids[i], "state":state} + state == 'D' ? this.del(ids, null,"messages") : this.saveArray(ids, "messages"); + return true; + } + } + return epgd.timerListBase.prototype.action.call(this, $el, iconName, data); +} + diff --git a/http/src/lang/de.js b/http/src/lang/de.js index 2ecb9b0..4d8a631 100644 --- a/http/src/lang/de.js +++ b/http/src/lang/de.js @@ -98,7 +98,7 @@ epgd.tr = { 'D': 'gelöscht', 'E': 'Fehler', 'F': 'Aufnahme erfolgreich', - 'P': 'wartet auf Aufnahmebeginn', + 'P': 'wartet auf Start', 'R': 'nimmt gerade auf...', 'U': 'unbekannt' }, @@ -117,15 +117,15 @@ epgd.tr = { 'Q': 'Timer in Vorbereitung', 'R': 'Aufnahme fertig' }, - messageStates: { + messageStates: { 'N': 'Neu', 'R': 'gelesen' }, - messageTypes: { + messageTypes: { 'I': 'Information', - 'W': 'Warnung', + 'W': 'Warnung', 'E': 'Fehler', - 'F': 'Fataler Fehler' + 'F': 'Fataler Fehler' }, chFormat: "bevorzugtes Sendeformat" //channelModes: ["SD", "HD", "3D", "HD,SD", "SD,HD", "3D,HD,SD", "SD,HD,3D"] }, @@ -261,8 +261,8 @@ epgd.tr = { vdr: { startWithSched:'EPG Menü startet mit Schedule' }, - record: { - subFolderSort: 'Sortierung der Unterordner' + record: { + subFolderSort: 'Sortierung der Unterordner' } } }, diff --git a/http/www/epgd.js b/http/www/epgd.js index 4e47140..4d2c66f 100644 --- a/http/www/epgd.js +++ b/http/www/epgd.js @@ -1 +1 @@ -var epgd={};epgd.tr={oClock:"Uhr",minutes:"min",save:"speichern",copy:"kopieren",apply:"übernehmen",close:"schließen",clear:"löschen",yes:"ja",no:"nein",edit:"bearbeiten",cancel:"abbrechen",del:"löschen",test:"testen",reload:"neu laden",advanced:"erweitert",markAll:"alle markieren",markNone:"keinen markieren",markToggle:"Markierung umdrehen",confirmDelete:"Willst du wirklich löschen?",dataSaved:"Daten wurden gespeichert",dataDeleted:"Daten wurden gelöscht",dataSend:"Daten wurden gesendet",channel:"Kanal",date:"Datum",entries:" Einträge",error:{error:"Fehler",common:"Es ist ein allgemeiner Fehler aufgetreten",serverNotResponse:"Der Server konnte nicht erreicht werden!",notImplemented:"Dieses Feature ist zur Zeit noch nicht implementiert",forbidden:"Zugriff verweigert!",noData:"Für diese Anfrage konnten keine Daten ermittelt werden!",emptyField:"Bitte fülle das Feld $field$ aus!",invalid:"Der eingegebene Wert ist ungültig!"},menu:{now:"Programm",magazine:"Magazin",timer:"Timer",records:"Aufnahmen",search:"Suche",options:"Einstellungen",help:"Hilfe"},pages:{now:{at:"am"},timer:{timerList:"Timer",searchTimerList:"Suchtimer",timersDone:"kürzliche Aufträge",timerListDone:"Auftragshistorie",timerJobList:"asynchrone Aufträge",messageList:"Systemmeldungen"},timerList:{empty:"Keine Timer vorhanden!",startTime:"Anfang",endTime:"Ende",folder:"Verzeichnis",file:"Dateiname",recordTime:"Aufnahmezeit",lifetime:"Lebenszeit",prio:"Priorität",inactive:"Inaktiv",newTimer:"Neuen Timer anlegen",namingMode:"Ermittlung des Dateinamens",namingModes:["VDR","Auto","Constable","Serie","Kategorisiert","Usermode","Template"],template:"Template",templateFields:{"%title%":": Titel (EPG)","%shorttext%":": Untertitel (EPG)","%starttime%":": Startzeit (EPG)","%year%":": Jahr (EPG)","%category%":": Kategorie (EPG)","%episodname%":": Titel der Serie (constabel)","%shortname%":": Kurz-Titel der Serie (constabel, optional)","%partname%":": Name der Folge (constabel)","%season%":": Staffel (constabel)","%part%":": Teil der Staffel (constabel)","%number%":": Nummer über alle Staffeln (constabel)","%extracol1%":": Zusätzliche Angaben z.B. bei Tatort die Ermittler (constabel, optional)","%extracol2%":": ... z.B. bei Tatort der Ort (constabel, optional)","%extracol3%":": ... z.B. bei Tatort der Sender (constabel, optional)"},episode:"Serientitel",noEpgMatch:"Ignoriere fehlende EPG Info",noRepeat:"Wiederholungen vermeiden",searchTimerReload:"Suchtimer updaten",chInclude:"Auf Kanäle einschränken",chExclude:"Kanäle ausschließen",nextDays:"innerhalb der nächsten $field$ Tage",confirmSaveBigResult:"Die Suche ergibt $cnt$ Treffer, trotzdem speichern?",timerStates:{D:"gelöscht",E:"Fehler",F:"Aufnahme erfolgreich",P:"wartet auf Aufnahmebeginn",R:"nimmt gerade auf...",U:"unbekannt"},timerActions:{C:"Timer wurde erstellt und muss noch von einem VDR übernommen werden",D:"Timer wurde gelöscht und muss noch im VDR gelöscht werden",F:"Zuweisung Timer an VDR fehlgeschlagen",M:"Timer wurde verändert und muss noch vom VDR verarbeitet werden"},doneStates:{f:"Timer konnte nicht erstellt werden",C:"Timer bereits erstellt",D:"Timer gelöscht",F:"Aufnahme fehlgeschlagen",Q:"Timer in Vorbereitung",R:"Aufnahme fertig"},messageStates:{N:"Neu",R:"gelesen"},messageTypes:{I:"Information",W:"Warnung",E:"Fehler",F:"Fataler Fehler"},chFormat:"bevorzugtes Sendeformat"},eventDetail:{record:"Aufnehmen",repeat:"Wiederholungen",ch_switch:"umschalten",eventNext:"nachfolgend",eventPrev:"vorher",parentalrating:"ab ",mergeSrc:"Quelle ",genre:"Genre",category:"Kategorie",country:"Land",year:"Jahr",season:"Staffel",part:"Folge",number:"Folge Insgesamt",extentedInfo:"weitere Informationen",scrapperMovieInfo:"Filminformation",scrapperSerieInfo:"Serieninformation",constabelInfo:"Constabel Episodenliste",addConstableLink:"Link erzeugen",loginConstable:"Login",title:"Titel",original_title:"Originaltitel",runtime:"Laufzeit",lang:"Sprache",release_date:"Erscheinungsdatum",actors:"Schauspieler",network:"Netzwerk",seriesstatus:"Status",gueststars:"Gäste",homepage:"Webseite",popularity:"Beliebtheit",vote_average:"ø Bewertung",extInfo:{director:"Regie",camera:"Kamera",screenplay:"Drehbuch",producer:"Produktion",music:"Musik",moderator:"Moderator",commentator:"Kommentator",guest:"Gäste",info:"Info",other:"Sonstige"}},options:{profile:"allgemein",editChannels:"Kanäle bearbeiten",editUser:"Benutzer bearbeiten"},editChannels:{menu:{channelList:"Kanalliste",referenceList:"Referenzliste",insertAsText:"als Text einfügen",extentEmptyChannelNames:"leere Kanalnamen ergänzen",applyAllChannelNames:"Alle Kanalnamen übernehmen",applyChannelSort:"Kanalsortierung übernehmen"},headline:"Sortierung der Kanäle durch drag und drop, Blockmarkierung durch zus. gedrückter shift-Taste",checkWeb:"Kanal in Webansicht anzeigen",checkVDR:"Kanal zum VDR übertragen",desc_insertList:"Kopiere den Inhalt einer channels.conf in das Textfeld unten. Eine vollständige Liste gibt es beispielsweise hier:"},editUser:{user:"Benutzer",sel:"auswählen",add:"neu anlegen",active:"Aktiv",inActive:"Inaktiv",rights:{label:"Rechte",umConfig:"Konfiguration lesen",umConfigEdit:"Konfiguration ändern",umConfigUsers:"Benutzer konfigurieren",umTimer:"Timer lesen",umTimerEdit:"Timer bearbeiten",umSearchTimer:"Suchtimer lesen",umSearchTimerEdit:"Suchtimer bearbeiten",umFsk:"FSK",umRecordings:"Aufnahmen lesen",umRecordingsEdit:"Aufnahmen editieren"}},help:{url:"lang/hilfe.html",noHelp:"Hierzu konnte kein Hilfstext gefunden werden"},search:{search:"suchen",searchName:"Name",searchExpression:"Suchausdruck",caseSensitive:"Klein-/Großschreibung",searchModes:["exakte Übereinstimmung","regulärer Ausdruck","Muster","enthalten in"],searchFields:["Titel","Kurztext","Beschreibung"],empty:"Leider nichts gefunden.",matchdensity:"Treffergenauigkeit"},login:{label:"Login",userName:"Benutzername",password:"Passwort",loggedAlwaysIn:"angemeldet bleiben",logout:"Abmelden",error:"Fehler beim Anmelden!",logoutMessage:"Du wurdest abgemeldet!",needLogin:"Login erforderlich"},records:{ddLabel:"Drag und Drop",refreshMessage:"Aufnahmelisten werden neu geladen, Seite lädt in $sec$ Sekunden neu",moveMessage:"Aufnahme verschieben von \n$src$\nnach",notFoundMessage:"Aufnahme nicht gefunden, ggf einmal aktualisieren",deleteMessage:"Soll die Aufnahme $src$ wirklich gelöscht werden?",available:"Verfügbar",commonRecFolder:"gemeinsame Aufnahmen",similarTimer:"ähnliche Sendung aufnehmen"},profile:{mailReceiver:"eMail",sendTCC:"sende Mail bei Timerkonflikten",sendMessages:"sende Mail bei Systemmeldungen",magazinePan:"Scrollgeschwindigkeit in Minuten
(0 = aus)",magazinePanDelay:"Auslöseverzögerung",maxListEntries:"maximal Anzahl Einträge, die auf einmal vom Server geladen werden sollen, z.B. bei Suchen, Suchtimern usw.",system:{label:"epgd Backend"},vdr:{startWithSched:"EPG Menü startet mit Schedule"},record:{subFolderSort:"Sortierung der Unterordner"}}},dateTimePicker:{monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",timeOnlyTitle:"Zeit wählen",timeText:"Sendungsbeginn",timeTextBetween:"zwischen",prevText:"<Zurück",nextText:"Vor>",currentText:"Jetzt",closeText:"Fertig",hourText:"Stunde",minuteText:"Minute",secondText:"Sekunde",millisecText:"Millisekunde",microsecText:"Mikrosekunde",timezoneText:"Zeitzone",timeFormat:"HH:mm",dateFormat:"D, dd.mm.yy",amNames:["vorm.","AM","A"],pmNames:["nachm.","PM","P"],isRTL:false,showMonthAfterYear:false,yearSuffix:""}};epgd.profile={needLogin:-1,channelLogoPath:"data/channellogo",eventImgPath:"data/eventimg",movieMediaPath:"data/moviemedia",serieImgPath:"data/seriesmedia",movieActorPath:"http://www.themoviedb.org/person/",serieSeasonPath:"http://www.thetvdb.com/?tab=seasonall&id=",constabelEditPath:"https://www.eplists.de/eplist.cgi?action=edit&back=&file=",constabelLinkPath:"https://www.eplists.de/eplist.cgi?action=show_form_redir&linkname=",minEventTime:0,maxEventTime:0,logoShowName:0};epgd.userProfile_defaults={defaultVDRuuid:"",constabelLoginPath:false,pickerFirstDay:"6",quickTimes:"",startWithSched:0,startPage:"menu_options",namingModeSerie:"0",namingModeSearchSerie:"0",namingModeMovie:"0",namingModeSearchMovie:"0",namingModeSerieTemplate:"",namingModeSearchSerieTemplate:"",namingModeMovieTemplate:"",namingModeSearchMovieTemplate:"",chFormat:"",timerDefaultVDRuuid:"",searchAdv:"0",mailReceiver:"",messageMailTypes:"",magazinePan:10,magazinePanDelay:400,maxListEntries:100,ratings:"",recordSubFolderSort:1};epgd.profile_load=function(b){var a=$.extend(epgd.profile,epgd.userProfile_defaults);epgd.ajax({url:epgd.login.url+"data/parameters",async:false,cache:false,dataType:"json"},function(l){var m,g,d,c,e,h={};for(g in l.parameters){m=l.parameters[g];c=a[m.name];if(c!=undefined&&c!=m.value){a[m.name]=m.type===0?parseInt(m.value,10):m.value;h[m.name]=c;if(m.name.indexOf("logo")==0){epgd.channels.isDirty=true}}}if(epgd.utils.timeOffset==null){epgd.utils.timeOffset=(l.timezone-new Date().getTimezoneOffset()*60)*1000;e=epgd.utils.now();epgd.$dtPicker.datetimepicker("setDate",new Date(e.setMinutes(parseInt(e.getMinutes()/15,10)*15)))}if(!a.minEventTime){e=epgd.utils.now();a.minEventTime=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0).getTime()/1000;h.minEventTime=0}if(!a.maxEventTime){a.maxEventTime=a.minEventTime+8*24*60*60-60;h.maxEventTime=0}for(d in h){$(window).trigger("profile_updated",h);break}epgd.channels.isDirty&&epgd.channels.load()})};epgd.pages={};epgd.login={user:"",session:"",rights:-1,url:""};epgd.rights={umConfig:2,umConfigEdit:4+2,umConfigUsers:8,umTimer:64,umTimerEdit:128+64,umSearchTimer:256+64,umSearchTimerEdit:512+256+128+64,umFsk:4096,umRecordings:32768,umRecordingsEdit:65536+32768};epgd.utils={timeOffset:null,now:function(){return new Date(new Date().getTime()-this.timeOffset)},date:function(a){return new Date(a*1000-this.timeOffset)},unixTime:function(a){return a?parseInt((a.getTime()+this.timeOffset)/1000,10):0},formatTime:function(a){var b=new Date(a*1000-this.timeOffset);return new String(100+b.getHours()).slice(1)+":"+new String(100+b.getMinutes()).slice(1)},formatDateTime:function(b,a){var c=new Date(b*1000-this.timeOffset);return $.datepicker.formatDate((a||epgd.tr.dateTimePicker.dateFormat),c)+" "+new String(100+c.getHours()).slice(1)+":"+new String(100+c.getMinutes()).slice(1)},formatDate:function(b,a){var c=new Date(b*1000-this.timeOffset);return $.datepicker.formatDate((a||epgd.tr.dateTimePicker.dateFormat),c)},popup:function(b,c){var d=$(window),a;c=$.extend({autoOpen:true,dialogClass:"popup",show:{effect:"blind",duration:1000},hide:{effect:"explode",duration:1000},width:400,height:200,maxWidth:d.width()*0.8,maxHeight:d.height()*0.7},c);a=$('

'+b+"

").dialog(c);c.autoClose&&window.setTimeout(function(){a.dialog("close").dialog("destroy")},c.autoClose);return a},confirm:function(a,c){var b={modal:true,buttons:{}};b.buttons[epgd.tr.yes]=function(){$(this).dialog("close");c(true)};b.buttons[epgd.tr.no]=function(){$(this).dialog("close");c(false)};this.popup(a,b)},topInfo:function(b,c){var e=c&&c.isError,d,a;c=$.extend({autoClose:e?0:3000,className:"ui-state-"+(e?"error":"highlight")},c);a=(c.autoClose||3000)/2;d=$('
'+b+'
').appendTo(epgd.$menu).animate({opacity:0.4},a,function(){d.animate({opacity:1},a)});c.autoClose&&window.setTimeout(function(){d.remove()},c.autoClose)},sendMail:function(c,a,b,d){epgd.ajax({url:epgd.login.url+"data/sendmail",type:"post",data:JSON.stringify({receiver:(d||epgd.profile.mailReceiver),subject:c,body:a,mimetype:b})},function(e){e=e.result;if(e&&e.state==200){epgd.utils.topInfo(epgd.tr.dataSend)}else{epgd.utils.topInfo(e.message,{isError:1})}epgd.profile_load()})},loader:{$win:$('
'),cnt:0,process:function(b,c){var a=this;this.cnt++;this.$win.appendTo(document.body).stop().animate({opacity:0.7},{always:function(){try{b()}catch(d){epgd.utils.log((d.message||"common error")+"\n"+(d.stack||""),0);a.close()}!c&&a.close()}},200)},close:function(){if(this.cnt>0){this.cnt--;this.cnt==0&&this.$win.remove()}}},addAutoComplete:function(d,b){var c=$(d),e=c[0].className,a=c[0].style.width||"";$(d).autocomplete($.extend({minLength:0,multiselect:false,create:function(i,m){var l=$(this).autocomplete("instance"),n=l.options,k,h;l.selectedItems={};if(n.multiselect){l.multiselect=$("
").addClass("ui-autocomplete-multiselect ui-state-default ui-widget "+e).css("width",a).insertBefore(l.element).append(l.element).bind("click.autocomplete",function(){l.element.focus()});l.menu.element.css({height:"300px","overflow-y":"auto"});k=parseInt(l.element.css("fontSize")||10,10);function g(p){var o=$(this);o.width(1).width(this.scrollWidth+k-1)}h=$.ui.keyCode;l.element.bind({"keydown.autocomplete":function(p){if((this.value==="")&&(p.keyCode==h.BACKSPACE)){var o=l.element.prev();delete l.selectedItems[o.text()];o.remove()}},"focus.autocomplete blur.autocomplete":function(){l.multiselect.toggleClass("ui-state-active")},"keypress.autocomplete change.autocomplete focus.autocomplete blur.autocomplete":g}).trigger("change");n.select=n.select||function(p,o){if(!l.selectedItems[o.item.label]){$("
").addClass("ui-autocomplete-multiselect-item").text(o.item.label).append($("").addClass("ui-icon ui-icon-close").click(function(){var q=$(this).parent();delete l.selectedItems[q.text()];q.remove()})).insertBefore(l.element);l.selectedItems[o.item.label]=o.item}l._value("");return false}}else{n.select=n.select||function(p,o){l.selectedItems[0]=o.item;l._value(o.item.label);return false}}}},b)).focus(function(){$(this).autocomplete("search","")})},getAutoCompleteValues:function(i,c){c=c||"";var b="",a=","+c,g,d;try{g=$(i).autocomplete("instance").selectedItems;for(d in g){b+=a+g[d].value+c}}catch(h){}return b.slice(1)},setAutoCompleteValues:function(g,a){var d=$(g).autocomplete("instance"),c,b,e;d.multiselect&&d.multiselect.find(">div").remove();d.selectedItems={};if(a){for(b=0;b',e;for(e in a){c+='
  • '+e+""+a[e]+"
  • "}b.$placeholders=$(c+"").hide().insertAfter(b).click(function(i){var k=i.target.nodeName=="B"?$(i.target).text():i.target.nodeName=="LI"?$(i.target.firstChild).text():null,l=$(b).prop("selectionStart"),h=$(b).val();if(k){$(b).val(h.substring(0,l)+k+h.substring(l,h.length)).focus();l+=k.length;if(b.setSelectionRange){b.setSelectionRange(l,l)}else{if(b.createTextRange){h=b.createTextRange();h.collapse(true);h.moveEnd("character",l);h.moveStart("character",l);h.select()}}}$(this).hide()});$(b).keydown(function(h){if(h.key==d){$(document).one("click",function(){b.$placeholders.hide()});b.blur();return !b.$placeholders.show().position({my:"left top",at:"left bottom",of:b})}})},inherits:function(a,c){var b=function(){};b.prototype=c.prototype;a.prototype=new b();a.prototype.constructor=a;a.base=c.prototype;return a},log:function(a,c){console.log("error:"+a);try{$.ajax({url:"data/log",type:"get",async:true,cache:false,data:"level="+(c||0)+"&message="+escape(a)})}catch(b){}}};epgd.init=function(){epgd.$con=$('
    ').appendTo(document.body);$.datepicker.setDefaults(epgd.tr.dateTimePicker);$.datepicker.setDefaults({showOtherMonths:true,selectOtherMonths:true});$.timepicker.setDefaults(epgd.tr.dateTimePicker);$.timepicker.setDefaults({timeInput:true,controlType:{create:function(b,g,e,h,c,a,d){if(e=="hour"){if(!b.inst.settings.timeOnly){$("#ui-datepicker-div").width(($(window).width()>500?430:230)+"px")}$("0246810
    121416182022").appendTo(g).bind("click",{tp_inst:b,obj:g,unit:e},$.timepicker.quicklink)}else{if(e=="minute"){$("0153045").appendTo(g).bind("click",{tp_inst:b,obj:g,unit:e},$.timepicker.quicklink)}else{if(e=="second"&&epgd.profile.quickTimes){g.closest("dl").find(".ui_tpicker_time").removeClass().bind("click",{tp_inst:b,obj:g,unit:"time"},$.timepicker.quicklink).html('').replace(/~/g,'");if(b.inst.settings.alwaysSetTime){epgd.pages.help.initButtons(b.inst.dpDiv.find(".ui-datepicker-buttonpane").append(epgd.pages.help.getButton("datepicker")))}else{$('").appendTo(b.inst.dpDiv.find(".ui-datepicker-buttonpane")).click(function(){b.$input.val("");$.datepicker._hideDatepicker()})}return g}else{return g}}}$('').prependTo(g).spinner({min:c,max:a,step:d,change:function(k,i){if(k.originalEvent!==undefined){b._onTimeChange()}b._onSelectHandler()},spin:function(k,i){b.control.value(b,g,e,i.value);b._onTimeChange();b._onSelectHandler()}});return g},options:function(a,d,c,b,e){if(typeof(b)=="string"&&e!==undefined){return d.find(".ui-timepicker-input").spinner(b,e)}return d.find(".ui-timepicker-input").spinner(b)},value:function(a,d,b,g){try{if(g!==undefined){return d.find(".ui-timepicker-input").spinner("value",g)}return d.find(".ui-timepicker-input").spinner("value")}catch(c){return false}}}});epgd.$menu=$('").appendTo(document.body).find("ul").hide();epgd.$menu.$maxBut=$('').insertBefore(epgd.$menu).click(function(){epgd.$menu.parent().toggleClass("open")});epgd.$menu.checkMenuSize=function(a,b){if(window.wrm_i){if(window.wrm_w==$(window).width()){window.clearInterval(window.wrm_i);delete window.wrm_i;epgd.$menu.parent().removeClass("mini").width(window.wrm_w).offset({left:$(window).scrollLeft()});epgd.$menu.checkMenuSize(null,b)}else{window.wrm_w=$(window).width()}return}if(a){window.wrm_w=$(window).width();if(!window.wrm_i){window.wrm_i=window.setInterval(epgd.$menu.checkMenuSize,200,null,b)}}else{if(epgd.$menu.height()>40){epgd.$menu.parent().addClass("mini")}window.setTimeout(function(){document.body.style.paddingTop=(epgd.$menu.parent().height()+10)+"px";b&&window.setTimeout(b,200)},200)}};$(window).bind("resize",epgd.$menu.checkMenuSize);epgd.$dtPicker=$('').appendTo(document.body).hide().bind("click",function(){$(this).datepicker("show");return false});epgd.$dtPicker.datetimepicker({beforeShow:function(){this.$overlay=$("
    ").addClass("ui-widget-overlay ui-front").appendTo(document.body)},onClose:function(){this.$overlay.remove();$(window).trigger("datepicker")},calendarStart:function(){var a=new Date(epgd.profile.minEventTime*1000);leadDays=(a.getDay()-parseInt(epgd.profile.pickerFirstDay,10)+7)%7;a.setHours(12,0);a.setDate(a.getDate()-leadDays);return a}});epgd.$menu.menu({position:{at:"left bottom"},select:function(a,b){var c=b.item.attr("id");if(!c||c.indexOf("menu_")!=0||(a.originalEvent&&a.originalEvent.target.nodeName!="A"&&a.originalEvent.target.nodeName!="LI")){return false}$(window).trigger("epgd_close");epgd.$menu.parent().removeClass("open");$(".menu-active",this).removeClass("menu-active");$(document.body).append(epgd.$dtPicker.hide());epgd.$menu.checkMenuSize(null,function(){try{b.item.addClass("menu-active").parent().parent(".ui-menu-item").addClass("menu-active");epgd.pages[c.slice(5)].render()}catch(d){epgd.utils.popup(epgd.tr.error.common,{title:epgd.tr.error.error});epgd.utils.log((d.message||"common error")+"\n"+(d.stack||""),2)}})}});$(window).bind("epgd_close",function(){$(".epgPopUp").dialog("destroy")}).bind("profile_updated",function(b,a){if(a.minEventTime!=undefined){epgd.$dtPicker.datetimepicker("option",{minDateTime:new Date((epgd.profile.minEventTime=parseInt(epgd.profile.minEventTime,10))*1000),minDate:new Date(epgd.profile.minEventTime*1000)})}if(a.maxEventTime!=undefined){epgd.$dtPicker.datetimepicker("option",{maxDateTime:new Date((epgd.profile.maxEventTime=parseInt(epgd.profile.maxEventTime,10))*1000),maxDate:new Date(epgd.profile.maxEventTime*1000)})}if(a.pickerFirstDay!=undefined){epgd.$dtPicker.datetimepicker("option",{firstDay:epgd.profile.pickerFirstDay})}if(a.defaultVDRuuid!=undefined){$("#menu_vdrs > select").val(epgd.profile.defaultVDRuuid)}if(a.quickTimes!=undefined){epgd.pages.magazine.initQT()}if(a.needLogin!=undefined){epgd.pages.login.doLogin()}}).bind("login_changed",function(a,b){epgd.$menu.html("").hide();epgd.$con.html("");if(epgd.login.rights){epgd.$menu.append('");epgd.$menu.append('");(epgd.login.rights&epgd.rights.umTimer)==epgd.rights.umTimer&&epgd.$menu.append("
  • "+epgd.tr.menu.timer+'
  • ");(epgd.login.rights&epgd.rights.umRecordings)==epgd.rights.umRecordings&&epgd.$menu.append('");epgd.$menu.append('");epgd.$menu.append("
  • "+epgd.tr.menu.options+'
  • ");epgd.$menu.append('");epgd.$menu.append('')}epgd.profile.needLogin=="1"&&epgd.$menu.append('");if(epgd.login.user!=b.user){epgd.profile_load();epgd.channels.isDirty=true;epgd.vdrs.list=null}epgd.channels.load();epgd.vdrs.load();epgd.$menu.show().menu("refresh");epgd.$menu.menu("select",{target:$(epgd.login.rights?(location.hash||"#"+epgd.profile.startPage||"#menu_profile"):"#menu_login")})}).bind("vdrs_load",function(){html="";for(var a in epgd.vdrs.list){html+='"}$("").replaceAll("#menu_vdrs > select").show().change(function(){var b=epgd.vdrs.current=this.selectedIndex>=0?epgd.vdrs.get(this[this.selectedIndex].value):{};if(b&&b.osd2webp){$("#osd2web").prop("target","osd2web_"+b.name).prop("href","http://"+b.ip+":"+b.osd2webp).click(function(c){c.stopPropagation();return true}).show()}else{$("#osd2web").hide()}}).mousedown(function(b){b.stopPropagation();return true}).click(function(b){return false}).change()}).bind("unload",function(){if(epgd.login.session){epgd.pages.login.doLogin("logout")}});epgd.pages.now.init();epgd.pages.magazine.init();epgd.profile_load();if(epgd.profile.needLogin==-1){epgd.profile.needLogin=0;epgd.pages.login.doLogin()}window.setInterval(epgd.profile_load,3600000)};window.onerror=function(i,g,b,d,c){var a=!d?"":"\ncolumn: "+d;a+=!c?"":"\nerror: "+c.stack;try{epgd.utils.log(i+"\nline: "+b+a,2)}catch(h){}return true};$.widget("custom.catcomplete",$.ui.autocomplete,{_create:function(){this._super();this.widget().menu("option","items","> :not(.ui-autocomplete-category)")},_renderMenu:function(c,b){var d=this,a="";$.each(b,function(g,h){var e;if(h.category!=a){c.append("
  • "+h.category+"
  • ");a=h.category}e=d._renderItemData(c,h);if(h.category){e.attr("aria-label",h.category+" : "+h.label)}})}});$.datepicker._gotoToday=function(c){var b=this._getInst($(c)[0]),a=epgd.utils.now();this._base_gotoToday(c);this._setTime(b,a);this._setDate(b,a);this._hideDatepicker()};$.timepicker.quicklink=function(b){var g=b.target.nodeName=="I"?b.target.firstChild:b.target,a,i=null,h=false;try{a=b.data.tp_inst||$.datepicker._getInst(epgd.$dtPicker[0]).settings.timepicker}catch(c){epgd.utils.log((c.message||"common error")+"\n"+(c.stack||""),2);return false}if(g.nodeName=="U"){if(b.data.unit=="time"){i=$.datepicker.parseTime(a._defaults.timeFormat,g.innerHTML,a._defaults)}else{if(b.data.unit=="hour"){i={hour:parseInt(g.innerHTML,10),minute:a.minute}}}if(i){if(i.hour"+$('label[for="'+a.id+'"]').text()+"":"")+"
    "+b+"
    ",{autoClose:3000});a&&a.focus();return false},loadFolder:function(){var a=this;epgd.ajax({url:epgd.login.url+"data/recordingdirs"},function(d){if(d.recordingdirs.length){var b=[],c=epgd.vdrs.list,e;$.each(d.recordingdirs,function(h,g){e=c[g.vdruuid];b.push({value:g.directory,category:e?e.name:"-"})});$(a.form.tFolder).catcomplete("option","source",b)}})},close:function(){if(this.$win){this.$win.dialog("close")}},create:function(){var d=this.options,c=epgd.tr.pages.timerList,b="",a;for(a=1;a'+epgd.tr.dateTimePicker.dayNamesShort[a]}b+=''+epgd.tr.dateTimePicker.dayNamesShort[0];this.$win=$('
    '+b+'


    ');!d.embed&&this.$win.appendTo(document.body).dialog(d);this.$win[0].list=this.list;this.form=this.$win.find("form")[0];$(this.form.tFolder).catcomplete({minLength:0,maxHeight:300}).focus(function(){$(this).catcomplete("search","")});$(this.form.tType).change(function(){if(this.selectedIndex<0){this.selectedIndex=0}this.form.className=this.form.className.replace(/ ?type./,"")+" type"+this[this.selectedIndex].value});$(this.form.tNameMode).change(function(){this.form.tTemplate.parentNode.style.display=(this.selectedIndex==6)?"block":"none"});epgd.utils.addPlaceholders(this.form.tTemplate,"%",c.templateFields);this.loadFolder()},render:function(b){b=b||{};if(!this.$win){this.create()}!this.options.embed&&this.$win.dialog("open").dialog("moveToTop");var c=this.form,e,a;c.tSName.focus();if(b.id){c.tID.value=b.id;this.$win.parent().find("#tBDel").show();this.$win.parent().find("#tBToggle").hide()}else{c.tID.value="";this.$win.parent().find("#tBDel").hide();this.$win.parent().find("#tBToggle").show()}$(c.tType).val(b.type||"R").change();$(c.tVdr).val(b.vdruuid||epgd.profile.timerDefaultVDRuuid);e=b.weekdays||0;for(a=0,f=1;a
    ');$(a.tWeek[0]).parent().before('

      -
    ');$(a.tNameMode).after(' ');$(a.tFolder).parent().after('
    ');$(this.form.tStart).datetimepicker({minDateTime:epgd.utils.now()});$(this.form.tEnd).timepicker({});epgd.utils.addAutoComplete(a.tChannel,{source:epgd.channels.autoCompleteData});a.tFile=$(a).find("#tFile")[0];a.tEvTime=$(a).find("#tEvTime")[0];a.tTitle=$(a).find("#tTitle").click(function(){if(a.tEvID.value){epgd.utils.loader.process(function(){new epgd.eventDetail(a.tEvID.value).render()})}})[0]};epgd.timerDialog.prototype.render=function(a){a=a||{};epgd.timerDialog.base.render.call(this,a);var b=this.form,c;b.tFile.innerHTML=a.file||"...";b.tEvID.value=a.eventid||"";epgd.utils.setAutoCompleteValues(b.tChannel,a.channelid?[a.channelid]:null);b.tTitle.innerHTML=a.title||"";b.tEvTime.innerHTML=a.evStartTime?epgd.utils.formatDateTime(a.evStartTime)+" - "+epgd.utils.formatTime(a.evStartTime+a.evDuration):"";$([b.tStart,b.tEnd]).datetimepicker("option","disabled",!!a.eventid);if(a.day||!a.evStartTime){if(a.starttime){c=epgd.utils.date((a.day+parseInt(a.starttime/100,10)*60*60+(a.starttime%100)*60))}else{if(a.day){c=epgd.utils.date(a.day)}else{c=epgd.utils.now()}}$(b.tStart).datetimepicker("setDate",c);$(b.tStart).datetimepicker("setTime",c);if(a.endtime){c=epgd.utils.date((a.day+parseInt(a.endtime/100,10)*60*60+(a.endtime%100)*60))}else{c=new Date(c.getTime()+2*60*60000)}$(b.tEnd).datetimepicker("setTime",c)}else{$([b.tStart,b.tEnd]).val("...")}b.tNameMode.selectedIndex=typeof a.namingmode=="undefined"?parseInt(a.category=="Serie"?epgd.profile.namingModeSerie:epgd.profile.namingModeMovie,10):a.namingmode;b.tTemplate.value=a.template||(a.category=="Serie"?epgd.profile.namingModeSerieTemplate:epgd.profile.namingModeMovieTemplate);$(b.tNameMode).change()};epgd.timerDialog.prototype.getData=function(g){var b=this.form,e,a,c={};if(b.tEvID.value){c.eventid=parseInt(b.tEvID.value,10)}c.active=b.tInactive.checked?0:1;if(b.tID.value){c.id=parseInt(b.tID.value,10)}if(b.tStart.value&&b.tStart.value!="..."){e=$(b.tStart).datepicker("getDate");c.starttime=e.getHours()*100+e.getMinutes();e.setHours(0);e.setMinutes(0);c.day=parseInt(e.getTime()/1000,10);c.endtime=parseInt(b.tEnd.value.replace(":",""),10)}else{if(!c.eventid&&!g){return this.showError(epgd.tr.error.emptyField.replace("$field$",epgd.tr.pages.timerList.recordTime),b.tStart)}}c.weekdays=0;for(a=0,f=1;a
    ').insertAfter(this.form)))}else{this.searchResultList.$con.find("tbody").empty()}if(!this.searchResultList.$con.parent().length){this.searchResultList.$con.insertAfter(this.form);this.searchResultList.init()}this.searchResultList.update(b||this.getData());this.searchResultList.$con[0].scrollIntoView(true)};epgd.searchTimerDialog.prototype.create=function(){epgd.searchTimerDialog.base.create.call(this);var c=epgd.tr.pages.timerList,e=epgd.tr.pages.search,d="",b=this.form,a;for(a in e.searchModes){d+='"}if(!epgd.categories){epgd.categories=[];epgd.ajax({url:"data/categories",async:false},function(g){epgd.categories=g.categories})}if(!epgd.genres){epgd.genres=[];epgd.ajax({url:"data/genres",async:false},function(g){epgd.genres=g.genres})}$(b.tSName).parent().parent().after('
       
    '+[""].concat(e.searchFields).join('')+'
    '+c.episode+' '+epgd.tr.pages.eventDetail.season+' '+epgd.tr.pages.eventDetail.part+'
    '+epgd.tr.pages.eventDetail.category+'
    '+epgd.tr.pages.eventDetail.genre+'
    GoldTippTagesTippTopTipp
    '+epgd.tr.pages.eventDetail.year+'
    '+c.noEpgMatch+'
    '+[""].concat(e.searchFields).join('')+'
    "+epgd.pages.help.getIcon("sTChannels")+'
    ");$(b.tWeek[0]).before(""+epgd.tr.dateTimePicker.timeTextBetween+' - ').parent().append('
    '+c.nextDays.replace("$field$",'')+"").insertAfter(b.tTime.parentNode);$([b.tStart,b.tEnd]).timepicker({alwaysSetTime:false});$([b.tTime,b.tRepeat,b.tAdv]).change(function(){$(this).parent().next().toggle(this.checked)});$([b.tSFSeason,b.tSFSPart,b.tSFYear]).change(function(){this.value=this.value.replace(/[^0-9-]/g,"");if(this.value.length==1&&this.value=="-"){this.value=""}});$(b.tType).append('");epgd.utils.addAutoComplete(b.tChannels,{source:epgd.channels.autoCompleteData,multiselect:true});epgd.utils.addAutoComplete(b.tSFCat,{source:epgd.categories,multiselect:true});epgd.utils.addAutoComplete(b.tSFGenre,{source:epgd.genres,multiselect:true})};epgd.searchTimerDialog.prototype.render=function(b){b=b||{searchfields:1};epgd.searchTimerDialog.base.render.call(this,b);var c=this.form,e,a;c.tExpr.value=b.expression||"";$(c.tSMode).val(b.searchmode||4);c.tCaseSens.checked=b.casesensitiv==1;e=b.searchfields||0;for(a=0,f=1;a0;$(c.tRepeat).change();c.tSFEpisode.value=b.episodename||"";c.tSFSeason.value=b.season||"";c.tSFSPart.value=b.seasonpart||"";c.tSFYear.value=b.year||"";epgd.utils.setAutoCompleteValues(c.tSFCat,new String(b.category).replace(/'/g,"").split(","));epgd.utils.setAutoCompleteValues(c.tSFGenre,new String(b.genre).replace(/'/g,"").split(","));e=b.tipp||"";for(a=0;a=0}c.tSFNoEpgMatch.checked=b.noepgmatch==1;c.tAdv.checked=b.episodename||b.season||b.seasonpart||b.year||b.category||b.genre||b.tipp||b.noepgmatch;$(c.tAdv).change();epgd.utils.setAutoCompleteValues(c.tChannels,new String(b.channelids).split(","));if(b.chexclude){c.tChExclude1.checked=1}else{c.tChExclude0.checked=1}c.tChFormat.value=b.chformat||(b.id?"":epgd.profile.chFormat);c.tNameMode.defaultIndex=parseInt(b.category=="Serie"?epgd.profile.namingModeSearchSerie:epgd.profile.namingModeSearchMovie,10);c.tNameMode.selectedIndex=typeof b.namingmode=="undefined"?c.tNameMode.defaultIndex:b.namingmode;c.tTemplate.value=typeof b.template=="undefined"?(b.category=="Serie"?epgd.profile.namingModeSearchSerieTemplate:epgd.profile.namingModeSearchMovieTemplate):b.template;$(c.tNameMode).change();this.$win.parent().find("#tBCopy").toggle(!!b.id)};epgd.searchTimerDialog.prototype.getData=function(g){var b=this.form,e,a,c={expression:b.tExpr.value};if(b.tSFSeason.value){c.season=b.tSFSeason.value}if(b.tSFSPart.value){c.seasonpart=b.tSFSPart.value}if(b.tSFYear.value){c.year=b.tSFYear.value}if(!g){if(!c.expression){return this.showError(epgd.tr.error.emptyField.replace("$field$",epgd.tr.pages.search.searchExpression),b.tExpr)}if(c.season&&!/^[0-9]{0,3}-?[0-9]{0,3}$/.test(c.season)){return this.showError(epgd.tr.error.invalid,b.tSFSeason)}if(c.seasonpart&&!/^[0-9]{0,3}-?[0-9]{0,3}$/.test(c.seasonpart)){return this.showError(epgd.tr.error.invalid,b.tSFSPart)}if(c.year&&!/^((19|20)[0-9]{2})?(-|-(19|20)[0-9]{2})?$/.test(c.year)){return this.showError(epgd.tr.error.invalid,b.tSFYear)}}if(b.tID.value){c.id=parseInt(b.tID.value,10)}if(b.tSFEpisode.value){c.episodename=b.tSFEpisode.value}c.category=epgd.utils.getAutoCompleteValues(b.tSFCat,"'");c.genre=epgd.utils.getAutoCompleteValues(b.tSFGenre,"'");e="";for(a=0;a50){epgd.utils.confirm(epgd.tr.pages.timerList.confirmSaveBigResult.replace("$cnt$",d.count),function(k){k&&epgd.searchTimerDialog.base.save.call(a,h)})}else{epgd.searchTimerDialog.base.save.call(a,h,e,c,g)}epgd.utils.loader.close()})},true)};epgd.searchDialog=epgd.utils.inherits(function(){epgd.searchTimerDialog.call(this,{id:"search",embed:true,buttons:null});this.searchResultList=new epgd.searchResultList({empty:epgd.tr.pages.search.empty},this)},epgd.searchTimerDialog);epgd.searchDialog.prototype.create=function(){epgd.searchDialog.base.create.call(this);var c=this.form,b=this,a=$('
    ').appendTo(this.$win);$('").insertAfter(c.tExpr).after('  ");$(c.tType).parent().hide().parent().css("border-top","1px solid #ccc").insertAfter($(c.tVdr.parentNode.parentNode).hide());$('').insertAfter(c.tSName).click(function(){b.form.tID.value="";b.form.tSName.value+=" copy";b.form.tSName.select()}).prop("disabled",true);$('').insertAfter(c.tSName).click(function(){b.list.del(this.form.tID.value,function(){b.form.tID.value="";b.loadSavedSearch()})}).prop("disabled",true);$('').insertAfter(c.tSName).click(function(){var e=b.getData();if(!e.name){return this.showError(epgd.tr.error.invalid,c.tSName)}b.save(e,null,null,function(){b.loadSavedSearch()})});$(c).submit(function(){b.search(a);return false});this.$win.find("#sExpr").keyup(function(d){if(d.keyCode==13){this.form.sSearch.click();$(this).blur()}}).focus();this.$win.find("#sAdv").change(function(){$(c).toggleClass("noAdv",!this.checked);b.resize()}).prop("checked",epgd.profile.searchAdv=="1").change();$(c.tSName).autocomplete({minLength:0,maxHeight:300,source:function(){return false},select:function(e,g){var h=g.item.data||{id:""};if(h.id){b.render(h);b.form.sSearch.click();$([c.tDel,c.tCopy,c.tInactive]).prop("disabled",false);return false}else{c.tID.value="";$([c.tDel,c.tCopy,c.tInactive]).prop("disabled",true)}}}).focus(function(){$(this).autocomplete("search","")});this.loadSavedSearch()};epgd.searchDialog.prototype.loadSavedSearch=function(){var a=this.form;epgd.ajax({url:epgd.login.url+"data/searchtimers?type=S"},function(c){var b=[];$.each(c.searchtimers,function(e,d){b.push({value:d.name||d.expression,label:d.name||d.expression,data:d})});$(a.tSName).autocomplete("option","source",b)})};epgd.searchDialog.prototype.resize=function(){var a=this.$win.find("#searchResult"),b=$(window).height()-a.offset().top-20;if(b<100){a.css({height:"auto","overflow-y":"visible"})}else{a.css({height:b+"px","overflow-y":"auto"})}};epgd.searchDialog.prototype.render=function(a){if(!epgd.$con.find("#search").length){$("#menu_search").addClass("menu-active");this.create();epgd.$con.html("");this.$win.appendTo(epgd.$con)}a=a||{searchfields:1};a.type="S";epgd.searchDialog.base.render.call(this,a)};epgd.searchDialog.prototype.close=function(){};epgd.channels={list:null,autoCompleteData:null,isDirty:false,selBox:$('')[0],load:function(){if(!this.list||this.isDirty){epgd.ajax({url:epgd.login.url+"data/channels",async:false,cache:false},function(d){var b=(epgd.profile.channelLogoPath?epgd.profile.channelLogoPath+"?maxW=70&maxH=50&id=":false),e="",c={},a=[];d.channels&&$.each(d.channels,function(g,h){var k=h.channelid||g;if(h.name){h.html='
    '+(b?''+h.name+''+(epgd.profile.logoShowName=="1"?h.name:""):h.name)+"
    ";h.visible&1&&(e+='")}else{h.html='
    '+k+"
    ";h.visible&1&&(e+='")}c[k]=h;a.push({label:h.name,value:k})});epgd.channels.list=c;epgd.channels.autoCompleteData=a;$(epgd.channels.selBox).html(e);$(window).trigger("channels_load");this.dirty=false})}},getHtml:function(b){var a=this.list[b];return a?a.html:'
    '+b+"
    "},getName:function(b){var a=this.list[b];return a?a.name:b}};epgd.eventDetail=function(a){this.id=a;this.data=null;this.expire=0};epgd.eventDetail.prototype.imgPath=false;epgd.eventDetail.prototype.load=function(b,c){var a=this;epgd.ajax({url:epgd.login.url+"data/event?"+(b&&c?"channelid="+b+"&time="+c:"id="+this.id),async:false,cache:false},function(d){a.data=d.event;a.id=d.id;a.expire=epgd.utils.now().getTime()+900000});return this};epgd.eventDetail.prototype.render=function(){if(this.expire'+epgd.tr.pages.eventDetail.repeat+"").appendTo(d.$con);b={searchfields:1,expression:this.data.title,searchmode:1,casesensitiv:1,fromEventDetail:true};if(this.data.shorttext){b.searchfields1=2;b.expression1=this.data.shorttext}epgd.pages.search.search.call(this,$('
    ').appendTo(d.$con),b)}else{a.click()}};epgd.eventDetail.prototype.doPlay=function(b){var a=parseInt(epgd.utils.now().getTime()/1000,10)-this.data.starttime;if(a<0||a>this.data.duration){return false}if(b){return true}epgd.vdrs.current.switchChannel(this.data.channelid)};epgd.eventDetail.prototype.doPrev=function(c){var b=this.data.starttime-500,a=this;if(bepgd.profile.maxEventTime){return false}if(c){return true}epgd.utils.loader.process(function(){new epgd.eventDetail().load(a.data.channelid,b).render()})};epgd.eventDetail.win=function(){this._create();this.closed=true;this.detail=null;var a=this;$(window).bind("epgd_close.eventDetail",function(){if(!a.closed){a.$win.css("z-Index","");a.$win.hide();$(document).unbind("keyup.eventDetail");a.closed=true;a.$openDialogs&&a.$openDialogs.removeClass("ui-state-disabled")}});$(window).bind("resize.eventDetail",function(b){if(!a.closed){try{a.$win.css("max-width",$(window).width());a.$win.show().position({of:window});a.$con.accordion("refresh")}catch(c){}if(parseInt(a.$win.css("top"),10)<69){a.$win.css("top","69px")}}})};epgd.eventDetail.win.prototype._create=function(){this.imgPath=epgd.profile.eventImgPath?epgd.profile.eventImgPath+"?no=0&maxW=270&maxH=146&id=":false;this.movieImgPath=epgd.profile.movieMediaPath?epgd.profile.movieMediaPath+"?actor_id=0&movie_id=":false;this.movieActorImgPath=epgd.profile.movieMediaPath?epgd.profile.movieMediaPath+"?maxW=60&maxH=90&media_type=4&actor_id=":false;this.serieImgPath=epgd.profile.serieImgPath?epgd.profile.serieImgPath+"?actor_id=0&series_id=":false;this.serieActorImgPath=epgd.profile.serieImgPath?epgd.profile.serieImgPath+"?maxW=60&maxH=90&season_number=0&episode_id=0&media_type=11&actor_id=":false;this.$win=$('
    ').appendTo(document.body);this.$con=this.$win.find(":first :last");var c=this,b=epgd.tr.pages.eventDetail,a=this.$win.find(".toolbar")[0];this.$rec=$('
    '}}u="";for(q in b.extInfo){if(t[q]){u+=""+b.extInfo[q]+""+t[q]+""}}if(t.scraper&&(a=t.scraper.movie||t.scraper.serie)){a.media=a.media||[];if(a.actors){w="";for(q in a.actors){c=a.actors[q];w+="
    "+(this.movieActorImgPath&&c.actorid?'':"")+''+c.actorname+""+(c.actorrole||"")+"
    "}}if(t.scraper.movie){a.isMovie=true;if(a.media&&this.movieImgPath){if(!p&&a.media["1"]){p=this.movieImgPath+a.movieid+"&media_type=1&maxW=270&maxH=146"}if(a.media["3"]){o=this.movieImgPath+a.movieid+"&media_type=3&maxW=400&maxH=999"}else{if(a.media["1"]){o=this.movieImgPath+a.movieid+"&media_type=1&maxW=400&maxH=999"}}}if(a.actors){w="";for(q in a.actors){c=a.actors[q];w+="
    "+(this.movieActorImgPath?'':"")+''+c.actorname+""+(c.actorrole||"")+"
    "}}if(a.overview){s='
    '+a.overview+"

    "+s}u="

    "+b.scrapperMovieInfo+'

    '+(a.media["1"]&&this.movieImgPath?'':"")+(a.title?"":"")+(a.originaltitle?"":"")+(a.runtime?"":"")+(a.movie_release_date?"":"")+(a.genres?"":"")+(a.voteaverage?"":"")+(a.popularity?"":"")+u+(a.budget?"":"")+(a.revenue?"":"")+(a.homepage?"":"")+"
    "+b.title+""+a.title+"
    "+b.original_title+""+a.originaltitle+"
    "+b.runtime+""+a.runtime+" "+epgd.tr.minutes+"
    "+b.release_date+""+a.movie_release_date+"
    "+b.genre+""+a.genres.replace(/^\||\|$/g,"").replace(/ ?\| ?/g,", ")+"
    "+b.vote_average+'
    ('+a.voteaverage.toFixed(1)+" / 10)
    "+b.popularity+""+a.popularity.toFixed(1)+"
    Budget$"+a.budget+"
    Einnahmen$"+a.revenue+"
    "+b.homepage+''+a.homepage+"
    "+(a.media["0"]&&this.movieImgPath?'':"")}else{a.isSerie=true;if(a.actors){w="";for(q in a.actors){c=a.actors[q];w+="
    "+(this.serieActorImgPath?'':"")+""+c.actorname+""+(c.actorrole?c.actorrole.replace(/\|/g,"
    "):"")+"
    "}}l=a.episode;if(l){if(l.episodeoverview){if(t.longdescription&&l.episodeoverview.length>t.longdescription.length){s=s.replace(/^/i,"")}s='
    '+l.episodeoverview+"
    "+s}s="
    "+l.episodename+"
    "+s;if(l.episodegueststars){w+='
    '+b.gueststars+"

    "+l.episodegueststars.replace(/^\||\|$/g,"").replace(/\|/g,"
    ")}}if(!p&&a.media["10"]&&this.serieImgPath){p=this.serieImgPath+a.seriesid+"&season_number="+l.seasonnumber+"&episode_id="+l.episodeid+"&media_type=10&maxW=270&maxH=146"}if(a.media["7"]){o=this.serieImgPath+a.seriesid+"&season_number=0&episode_id=0&media_type=7&maxW=400&maxh=999"}if(a.seriesoverview){s+=s?'
    Serienbeschreibung
    '+a.seriesoverview+"
    ":"
    "+a.seriesoverview+"
    "}u="

    "+b.scrapperSerieInfo+'

    '+(a.media["1"]&&this.serieImgPath?'':"")+(a.media["10"]&&this.serieImgPath?'':"")+(a.seriesname?"":"")+(a.seriesnetwork?"":"")+(a.seriesstatus?"":"")+(a.seriesfirstaired?"":"")+(a.seriesgenre?"":"")+(a.seriesrating?"":"")+u+(epgd.profile.serieSeasonPath?'":"")+"
    "+b.title+""+a.seriesname+"
    "+b.network+""+a.seriesnetwork+"
    "+b.seriesstatus+""+a.seriesstatus+"
    "+b.release_date+""+a.seriesfirstaired+"
    "+b.genre+""+a.seriesgenre.replace(/^\||\|$/g,"").replace(/ ?\| ?/g,", ")+"
    "+b.vote_average+'
    ('+a.seriesrating.toFixed(1)+" / 10)
    '+b.homepage+"
    "+(a.media["6"]&&this.serieImgPath?'':"")+(a.media["3"]&&this.serieImgPath?'':"")}}else{a={};u="

    "+b.extentedInfo+'

    "+(x.partname?"":"")+(t.year?"":"")+(x.lang?"":"")+u+"
    '+b.title+""+t.title+"
    "+b.part+""+x.partname+"
    "+b.release_date+""+t.year+"
    "+b.lang+""+x.lang+"
    "}if(!w&&t.actor){w=t.actor.replace(/, /g,"
    ")}w&&(u+='
    '+b.actors+"
    "+w+"
    ");u&&(u+="
    ");k=(t.path?epgd.tr.pages.timerList.folder+"
    "+t.path.replace(/\//g," / ")+"
    ":"")+(t.genre?(b.genre+""+t.genre+"
    "):"")+(t.category?b.category+""+t.category+"
    ":"")+(t.country?b.country+""+t.country+"
    ":"")+(t.year?b.year+""+t.year+"
    ":"");h=(x.part?b.part+""+x.part+(x.parts?" / "+x.parts+"":"")+"
    ":"")+(x.season?b.season+""+x.season+"
    ":"")+(x.number?b.number+""+x.number+"
    ":"")+(x.extracol1?x.extracol1+"
    ":"")+(x.extracol2?x.extracol2+"
    ":"")+(x.extracol3?x.extracol3+"
    ":"");if(t.recordings){for(q in t.recordings){l=t.recordings[q];r+='
    '+epgd.utils.formatDateTime(l.starttime)+""+parseInt(l.duration/60,10)+" "+epgd.tr.minutes+'
    '+l.title+(l.shorttext?'
    '+l.shorttext+"
    ":"")+"
    "}}this.$con=$('

    '+$.datepicker.formatDate(n?"d. M y":"d. MM yy",epgd.utils.date(t.starttime))+"
    "+(n?"":t.title)+'
    '+epgd.utils.formatTime(t.starttime)+" – "+epgd.utils.formatTime(t.starttime+t.duration)+" "+epgd.tr.oClock+" | "+parseInt(t.duration/60,10)+" "+epgd.tr.minutes+'

    '+(p?'':"")+'
    '+epgd.channels.getHtml(t.channelid)+(g>0&&g<=100?'
    ':"")+'
    '+(t.flags&&t.flags.indexOf("16:9")>0?'':"")+(t.audio&&t.audio.indexOf("DolbyDigital")>=0?'':"")+(t.flags&&t.flags.indexOf("Live")>0?"Live":"")+(t.parentalrating?'
    '+b.parentalrating+t.parentalrating+"
    ":"")+"
    "+(t.merge?"
    "+b.mergeSrc+t.merge+"
    ":"")+"
    "+(d?'
    '+d+"
    ":"")+'
    '+t.title+(x.partname?"
    "+x.partname+"":(t.shorttext?"
    "+t.shorttext+"":""))+'
    '+(t.tipp?''+t.tipp+"":"")+(t.txtrating?""+t.txtrating+"":"")+(t.shortreview||"")+"
    "+(k?'
    '+k+"
    ":"")+(h?'
    '+h+"
    ":"")+(o?'':"")+'
    '+(s?s.replace(/\n/g,"
    "):"")+"
    "+u+(t.category=="Serie"||a.isSerie||x.episodename?'

    '+b.constabelInfo+'

    '+epgd.tr.edit+''+epgd.tr.pages.eventDetail.addConstableLink+""+epgd.pages.help.getButton("constabel",true)+(epgd.profile.constabelLoginPath?'":"")+'
    ':"")+(r?"

    "+epgd.tr.menu.records+'

    '+r+"
    ":"")+"
    ").replaceAll(this.$con);this.$con.accordion({heightStyle:"fill",header:"h3",active:0,beforeActivate:function(e,i){if(i.newHeader.attr("data-conti")){epgd.utils.loader.process(function(){epgd.ajax({url:epgd.login.url+"data/proxy?id=constabel&title="+encodeURIComponent(encodeURIComponent(i.newHeader.attr("data-conti")))+"&_"+new Date().getTime(),dataType:"html",contentType:"text/plain; charset=utf-8"},function(E){if(E.indexOf("Error:")==-1){var F=i.newPanel.find("#cRaw"),D=""+b.season+""+b.part+""+b.number+""+b.title+"",B="",A=E.split(/\r?\n/),z,y,C;for(C=0;C"}}else{y=z.split(/\t/);if(y.length>3){B+=""+y.join("")+""}}}F.html(E).hide().before('Raw');F.before(""+D+""+B+"
    ")}else{i.newPanel.find("#cRaw").html(epgd.tr.error.noData)}epgd.utils.loader.close()});i.newHeader.removeAttr("data-conti")},true)}}});this.$rec.toggleClass("hasTimer",!!t.timerid).prop("title",this.detail.doRecord(true));this.$play.toggle(this.detail.doPlay(true));this.$prev.toggle(this.detail.doPrev(true));this.$next.toggle(this.detail.doNext(true));this.$con.find(".channel .i-tv").click(function(){epgd.vdrs.current.switchChannel(this.parentNode.id)});this.closed=false;q=Math.max.apply(null,this.$win.siblings(".ui-front:visible").map(function(){return +$(this).css("z-index")}).get());if(q>=+this.$win.css("z-index")){this.$win.css("z-index",q+1)}$(window).trigger("resize.eventDetail");this.$openDialogs=$(".ui-dialog:visible:not(.ui-state-disabled)").addClass("ui-state-disabled");$(document).bind("keyup.eventDetail",function(i){if(i.keyCode==27){$(window).trigger("epgd_close.eventDetail")}});epgd.pages.help.initButtons(this.$con)};epgd.recordDetail=epgd.utils.inherits(function(a){this.elem=a;return epgd.eventDetail.call(this)},epgd.eventDetail);epgd.recordDetail.prototype.load=function(){var a=this;epgd.ajax({url:epgd.login.url+"data/recording?starttime="+this.elem.getAttribute("data-start")+"&md5path="+this.elem.getAttribute("data-md5")+"&owner="+this.elem.getAttribute("data-owner"),async:false},function(b){a.data=b.recording});return this};epgd.recordDetail.prototype.doRecord=function(a){if(a===true){return epgd.tr.pages.records.similarTimer}epgd.eventDetail.prototype.doRecord.call(this,a)};epgd.recordDetail.prototype.doPlay=function(a){if(a){return true}epgd.ajax({url:epgd.login.url+"data/replayrecording?vdruuid="+(!epgd.vdrs.list[this.data.vdruuid].usecommonrecfolder?this.data.vdruuid:epgd.vdrs.current.uuid)+"&starttime="+this.data.starttime+"&md5path="+this.data.md5path+"&owner="+(this.data.owner||""),cache:false},function(b){epgd.utils.popup(b.result.message,{title:"VDR",autoClose:5000})})};epgd.recordDetail.prototype.doPrev=function(b){var a=$(this.elem).prev(".rec");if(!a.length){return false}if(b){return true}a.find("B").click()};epgd.recordDetail.prototype.doNext=function(b){var a=$(this.elem).next(".rec");if(!a.length){return false}if(b){return true}a.find("B").click()};epgd.doneTimerDetail=epgd.utils.inherits(function(a){this.tr=a;return epgd.eventDetail.call(this)},epgd.eventDetail);epgd.doneTimerDetail.prototype.load=function(){var a=this;epgd.ajax({url:epgd.login.url+"data/donetimer?id="+this.tr.tData.id,async:false,cache:false},function(c){var b=c.donetimer;if(b.state){b.cntlongdescription=epgd.pages.timerListDone.stateIcons[b.state]}b.episode={lang:b.episodelang,season:b.episodeseason,part:b.episodepart};a.id=c.id;a.expire=epgd.utils.now().getTime()+900000;delete b.timerid;delete b.id;a.data=b});return this};epgd.doneTimerDetail.prototype.doRecord=function(a){if(a===true){return epgd.tr.pages.records.similarTimer}epgd.eventDetail.prototype.doRecord.call(this,a)};epgd.doneTimerDetail.prototype.doPlay=function(a){return false};epgd.doneTimerDetail.prototype.doPrev=function(b){var a=$(this.tr).prev("tr");if(!a.length){return false}if(b){return true}a.find("td").click()};epgd.doneTimerDetail.prototype.doNext=function(b){var a=$(this.tr).next("tr");if(!a.length){return false}if(b){return true}a.find("td").click()};$(document).ready(function(){epgd.eventDetail.prototype.win=new epgd.eventDetail.win()});epgd.pages.editChannels={render:function(){if(!(epgd.login.rights&epgd.rights.umConfigEdit)==epgd.rights.umConfigEdit){return epgd.utils.popup(epgd.tr.error.forbidden,{title:epgd.tr.error.error})}var i=epgd.tr.pages.editChannels,m=epgd.$con,e,l="",h="",k,c,d,g,b,a;for(d in epgd.channels.list){a=epgd.channels.list[d];k=[];for(g in a.sources){c=a.sources[g];k[c.merge]="
  • "+g+'
  • '}l+='
  • '+d+'
  • '}for(b in epgd.vdrs.list){h+='
  • '+epgd.vdrs.list[b].name+"
  • "}e=m.html('
    '+epgd.tr.pages.editChannels.headline+'
    Web
    channel-idchannel-name
    ').find("button");e.click(function(){var n=this.$menu.show();$(document).bind("click.ui_menu",function(o){if(!$(o.target).closest(".ui-menu").length){n.hide();$(this).unbind("click.ui_menu")}});return false})[0].$menu=$('").hide().insertAfter(e).menu({select:function(p,q){var s=q.item,n,r,o="";if(!s.attr("data-id")){s=s.parents("li[data-id]:first")}switch(s.attr("data-id")){case"getChannelNames":o='[value=""]';case"getAllChannelNames":epgd.utils.loader.process(function(){var t=[];$("#pageEditChannelsSource li").each(function(){t[this.lastChild.innerHTML]=this.firstChild.innerHTML});$("#pageEditChannels > li > input"+o).each(function(){this.value=t[this.previousSibling.innerHTML]||this.value})});break;case"getOrder":epgd.utils.loader.process(function(){var u=$("#pageEditChannels"),t;$($("#pageEditChannelsSource span").get().reverse()).each(function(){t=u.find("> li > span:contains("+this.innerHTML+")");if(t.length){t.parent().prependTo(u)}})});break;case"insertList":$('

    '+i.desc_insertList+' channelpedia.yavdr.com

    ').dialog({modal:true,width:500,height:400}).find("textarea").change(function(){epgd.pages.editChannels.insertReferenceList(this.value);$(this).parent().dialog("destroy")});break;case"loadList":if(q.item.attr("data-url")){epgd.ajax({url:epgd.login.url+"data/proxy?id="+q.item.attr("data-url"),dataType:"html",contentType:"text/plain; charset=utf-8"},epgd.pages.editChannels.insertReferenceList);break}case"channelpedia":n=$('
    ");this.$trash=this.$bar.find(".i-trash");this.curSearch={pattern:"",searchValue:"",hits:$(),cur:0,$count:this.$bar.find("#rSCnt"),fromStart:this.$bar.find("#rSVal").prev("button")[0],toEnd:this.$bar.find("#rSVal").next("button")[0]}}this.$bar.insertAfter(epgd.$menu);this.$trash.droppable({accept:".rec",hoverClass:"ui-state-hover",tolerance:"pointer",drop:function(c,d){var b=d.helper.context;epgd.utils.confirm(epgd.tr.pages.records.deleteMessage.replace("$src$",b.getAttribute("data-path")),function(e){e&&epgd.pages.records.del(b)});return false}}).click(function(){var b=$("#records").find(".rec.selected");b.length&&epgd.utils.confirm(epgd.tr.confirmDelete+(b.length>1?"
    "+b.length+epgd.tr.entries:""),function(c){c&&b.each(function(){epgd.pages.records.del(this)})})});epgd.pages.help.initButtons(this.$bar);epgd.$menu.checkMenuSize();$(window).bind("epgd_close.records",function(){epgd.pages.records.$bar.remove();epgd.$menu.checkMenuSize();$(window).unbind(".records")});epgd.$con.html('
    ');epgd.utils.loader.process(function(){epgd.ajax({url:epgd.login.url+"data/recordings",cache:false},function(x){var b=x.recordings,g,y,o,l,n,r,m={f:{},r:[]},d={},s,k,h="",q=" "+epgd.tr.minutes,u,e=epgd.profile.recordSubFolderSort==6?function(p,i){return p.starttime>i.starttime?-1:1}:epgd.profile.recordSubFolderSort==5?function(p,i){return p.starttime>i.starttime?1:-1}:epgd.profile.recordSubFolderSort==4?function(p,i){return p.path>i.path?-1:1}:epgd.profile.recordSubFolderSort==3?function(p,i){return p.path>i.path?1:-1}:epgd.profile.recordSubFolderSort==2?function(p,i){return p.tit>i.tit?-1:1}:function(p,i){return p.tit>i.tit?1:-1};for(s in epgd.vdrs.list){k=epgd.vdrs.list[s];if(!k.usecommonrecfolder){d[s]={f:{},r:[]}}h+="
    VDR - "+k.name+": "+k.videodir+" - "+parseInt(k.videofree/1000,10)+" GB "+a.available+" / "+parseInt(k.videototal/1000,10)+" GB
    "}if(!$("#dragdrop").parent().length){return false}epgd.$con.find("#records").before(h);h="";for(r in b){g=b[r];l=d[g.vdruuid]||m;o=g.path.split("/");o.pop();for(n=0;n0}function c(i){Object.keys(i.f).sort().forEach(function(v){var t=i.f[v],p;h+=v?'

    ('+(t.cnt)+')'+v+"

    ":"
    ";t.f&&c(t);if(t.r.length){for(p in t.r){g=t.r[p];g.tit=((g.name!=v?g.name:"")+(v!=g.title&&(g.title!=g.name)?"
    "+g.title:"")+(g.shorttext&&(g.shorttext!=g.name)?""+g.shorttext+"":""))||v;g.html='
    '+epgd.utils.formatDateTime(g.starttime)+""+parseInt(g.duration/60,10)+q+""+g.tit+"
    "}t.r.sort(e);for(p in t.r){h+=t.r[p].html}}h+="
    "})}n={};if(w(m)){n[a.commonRecFolder]=m}for(s in d){l=d[s];if(w(l)){n["VDR - "+epgd.vdrs.list[s].name]=l}}c({f:n});u=epgd.$con.find("#records").html(h);if(!u.length){return false}u=u.click(epgd.pages.records.action).find(">div");if(u.length==1){u.first().toggleClass("open")}epgd.pages.records.$menu=$('
    •   '+epgd.tr.pages.eventDetail.title+'
    •   '+epgd.tr.pages.timerList.folder+'
    •   '+epgd.tr.pages.timerList.recordTime+"
    ").hide().appendTo(epgd.$con);$("#dragdrop").change();epgd.pages.records.curSearch.$recs=null;epgd.utils.loader.close()})},true)},search:function(e){var c=this.curSearch,h,b,d,a=c.fromStart.checked,g=c.toEnd.checked;if(!c.$recs){c.$recs=epgd.$con.find("#records .rec,h4")}if(typeof e=="string"){c.searchValue=e.replace(//g,">")}d=(a?">"+c.searchValue:c.searchValue).toLowerCase()+(g?"<":"");if(d==c.pattern){return}h=c.searchValue.length;b=c.$recs;if(c.hits.length){$(c.hits).each(function(){this.innerHTML=this.innerHTML.replace(/([^<]+)<\/mark>/gi,"$1")}).parents(".tmp-open").removeClass("tmp-open");if(d.indexOf(c.pattern)==0){b=$(c.hits)}else{c.cur=0}c.hits=[]}else{c.cur=0}c.pattern=d;if(h>2){b.each(function(){var i=this.innerHTML.toLowerCase().indexOf(d);if(i>0){c.hits.push(this);$(this).parents(".folder").addClass("tmp-open");do{if(a){i++}this.innerHTML=this.innerHTML.slice(0,i)+""+c.searchValue+""+this.innerHTML.slice(i+h)}while((i=this.innerHTML.toLowerCase().indexOf(d,i+13))>0)}});c.$count.text(c.hits.length).parent().show();this.searchMove(0)}else{c.$count.parent().hide()}},searchMove:function(a){this.curSearch.cur+=a;var b=this.curSearch.hits[this.curSearch.cur];if(!b){this.curSearch.cur=a<0?this.curSearch.hits.length-1:0;b=this.curSearch.hits[this.curSearch.cur]}if(b){b.scrollIntoView(false);$(b).css({"background-color":"green"});window.setTimeout(function(){$(b).css({"background-color":""})},1500)}},action:function(b){var a=b.target;if(a.nodeName=="MARK"){a=a.parentNode}if(a.nodeName=="M"){epgd.pages.records.$menu.show().position({my:"left top",at:"left bottom",of:a}).find("a").removeClass("ui-state-highlight");epgd.pages.records.$menu.find("a[data-sort="+(a.curSort||epgd.profile.recordSubFolderSort)+"]").addClass("ui-state-highlight");$(document).one("click.recmenu",function(d){if(d.target.nodeName=="A"){var c=d.target.parentNode.getAttribute("data-type");if(c){a.curSort=d.target.getAttribute("data-sort");epgd.pages.records.sort(a.parentNode.parentNode,a.curSort)}}epgd.pages.records.$menu.hide();$(document).unbind(".recmenu")}).bind("keyup.recmenu",function(c){if(c.keyCode==27){$(document).trigger("click.recmenu")}});return false}if(a.nodeName=="I"||a.nodeName=="SPAN"){a=a.parentNode}if(a.nodeName=="B"){a=a.parentNode;if(!a.recDetail){a.recDetail=new epgd.recordDetail(a)}epgd.utils.loader.process(function(){a.recDetail.render()})}else{if(a.nodeName=="H4"){a=a.parentNode;if(a.nodeName=="DIV"&&a.className.indexOf("folder")>=0){if(a.className.indexOf("open")==-1){if($(window).width()<500){$(a).siblings(".open").removeClass("open");document.body.scrollTop=$(a).offset().top-35}$(a).addClass("open")}else{$(a).removeClass("open")}}}else{$(a).closest(".rec").toggleClass("selected")}}},dd:function(b){var c=$("#records"),a=c.find(".rec").has(".ui-draggable");if(b&&a.length==0){c.find("h4").droppable(this.__dropSettings);a.end().draggable({cancle:"b",revert:"invalid",distance:15,helper:function(){return $(this).clone().css("display","block")},appendTo:"body",cursor:"pointer",cursorAt:{left:-15,top:5},start:function(d,e){$(document).trigger("click.recmenu");$(document.body).addClass("dd-open");document.body.style.paddingTop=epgd.pages.records.$bar.height()+"px";document.body.scrollTop-=d.pageY-$(d.delegateTarget).closest(".folder").offset().top},stop:function(d,e){$(document.body).removeClass("dd-open");epgd.$menu.checkMenuSize()}})}else{if(a.length){a.draggable(b?"enable":"disable")}}},__dropSettings:{accept:".rec",hoverClass:"ui-state-hover",tolerance:"pointer",drop:function(b,c){console.log("Dropped!",b,c);var a=$(b.target),d="";do{d=a.text().replace(/^\(.*\)/,"")+"/"+d;a=a.parent()}while((a=a.prevAll("h4")).length);epgd.pages.records.move(c.draggable.context,d.slice(d.indexOf("/",2)+1).replace(/ /g,"_"),b.target.parentNode);return false}},update:function(){epgd.ajax({url:epgd.login.url+"data/updaterecordings"},function(a){epgd.utils.topInfo(epgd.tr.pages.records.refreshMessage.replace("$sec$",5),{autoClose:5000});$(window).trigger("epgd_close.records");window.setTimeout(function(){epgd.pages.records.render()},5000)})},move:function(e,h,d){var g=e.getAttribute("data-path").split("/"),b=g.pop(),c,a=0;g=g.join("/")+"/";for(c=0;ch4>span").each(function(){this.innerHTML="("+(parseInt(this.innerHTML.slice(1,-1),10)-1)+")"});p=o.find("span");p.text("("+(parseInt(p.text().slice(1,-1),10)+1)+")");for(l=0;l.folder>h4").each(function(){if(this.lastChild.nodeValue==m[l]){o=$(this.parentNode);p=o.find("span");p.text("("+(parseInt(p.text().slice(1,-1),10)+1)+")");return true}else{return false}}).length==0){for(;l(1)'+m[l]+"
    ").droppable(epgd.pages.records.__dropSettings).wrap('
    ').parent().appendTo(o)}}}k.appendTo(o);epgd.pages.records.sort(d);epgd.utils.topInfo(epgd.tr.dataSaved);epgd.pages.records.__updateRec(e)}else{epgd.utils.topInfo(n.message,{isError:1});return false}})}return !!g},__updateRec:function(b,a){epgd.ajax({url:epgd.login.url+"data/recording?starttime="+b.getAttribute("data-start")+"&path="+b.getAttribute("data-path")+"&owner="+b.getAttribute("data-owner")+"&"+a,async:true},function(c){$(b).attr("data-md5",c.recording.md5path).draggable("enable").removeClass("ui-state-disabled")},function(d,c){if(!a){a=0}else{if(a>=5){return epgd.utils.popup(epgd.tr.pages.records.notFoundMessage,{title:epgd.tr.error.error})}}window.setTimeout(epgd.pages.records.__updateRec,3000,b,++a);return true})},del:function(a){epgd.ajax({url:epgd.login.url+"data/deleterecording?starttime="+a.getAttribute("data-start")+"&md5path="+a.getAttribute("data-md5")+"&owner="+a.getAttribute("data-owner"),async:true},function(b){b=b.result;if(b&&b.state==200){epgd.utils.topInfo(a.getAttribute("data-path")+"
    "+epgd.tr.dataSaved);$(a).parents(".folder:not(:last)").find(">h4>span").each(function(){this.innerHTML="("+(parseInt(this.innerHTML.slice(1,-1),10)-1)+")"});$(a).remove()}else{epgd.utils.topInfo(a.getAttribute("data-path")+"
    "+b.message,{isError:1})}})},sort:function(a,d){var e=$(a).find(">div.rec"),b=d%2?1:-1,c;if(!d){d=$(">h4>m",a)[0].curSort||epgd.profile.recordSubFolderSort}if(d<3){e.sort(function(h,g){return h.lastChild.innerHTML>g.lastChild.innerHTML?b:-b}).appendTo(a)}else{c=d<5?"data-path":"data-start";e.sort(function(h,g){return h.getAttribute(c)>g.getAttribute(c)?b:-b}).appendTo(a)}$(a).find(">div.folder").each(function(){epgd.pages.records.sort(this,d)})}};epgd.sortTable=function(a){this.o=$.extend({conSel:epgd.$con,empty:"",right:1},a)};epgd.sortTable.prototype={sortIcons:'',update:function(){},hideHead:function(){var a=this.$con.find("thead:first").hide().find(">tr>th");this.$con.find("tbody:first").html(''+this.o.empty+(a.last().find(".i-doc-new").wrapAll("
    ").parent().html()||"")+"")},showHead:function(){this.$con.find(">table>thead").show();this.filter();this.sort()},getTable:function(){},action:function(a,c,b){switch(c){case"refresh":this.update();break;case"detail":if(!a[0].eventDetail){a[0].eventDetail=new epgd.eventDetail(b)}epgd.utils.loader.process(function(){a[0].eventDetail.render()});break}},render:function(a,b){this.trs=[];this.$con=a||$(this.o.conSel);this.$con.empty();if(!(epgd.login.rights&this.o.right)==this.o.right){return epgd.utils.popup(epgd.tr.error.forbidden,{title:epgd.tr.error.error})}this.$con.html(this.getTable());this.init();this.update(b)},init:function(){var b=this,a=0;this.$con.find(">table").click(function(h){var e=$(h.target),g=e[0],i=g.getAttribute("data-evId"),k,c;if(i){b.action(e,"detail",i)}else{if(h.target.className=="i-tv"){epgd.vdrs.current.switchChannel(h.target.parentNode.id)}else{e=e.closest("span.sort");if(e.length){e.parent().parent().find(".ui-state-highlight").removeClass("ui-state-highlight");e.addClass("ui-state-highlight");b.sort(e)}else{e=$(g).closest("span.edit");if(e.length){b.action(e,e[0].className.match(/i-([a-z0-9-]+)/)[1])}if(b.o.selectable){if(g.nodeName=="TD"){e=$(g).parent().toggleClass("selected");if(h.shiftKey&&this.lastSel){c=$(this.lastSel);k=e.index()-c.index();if(k>0){c.nextAll(":lt("+k+"):visible").toggleClass("selected",c.hasClass("selected"))}else{c.prevAll(":lt("+-k+"):visible").toggleClass("selected",c.hasClass("selected"))}}else{this.lastSel=e[0]}}else{if(g.nodeName=="B"){k=g.getAttribute("data-t");$(b.trs).filter(":visible").toggleClass("selected",k==1?true:k==0?false:undefined);return false}}}}return false}}}).find(">thead>tr").find(">th").each(function(){this.cIndex=a;a+=this.colSpan}).end().find('[data-defaultSort="1"]>span.sort:last,[data-defaultSort="-1"]>span.sort:first').addClass("ui-state-highlight");this.$con.find(">table>thead input.filter").keyup(function(){b.filter()}).each(function(){if(!this.result){this.result=$('').insertAfter(this)[0]}})},sort:function(e){e=e||this.$con.find(">table>thead .ui-state-highlight");if(!e.length){return}var c=e.parent()[0],g=(e.hasClass("i-sort-name-down")?-1:1),a=this.trs,b,h;if(!c.sortInfo){c=c.cIndex;for(b=0;bk?1*g:l==k?0:-1*g)});this.$con.find(">table>tbody").append(a.slice())},filter:function(){var b={},a,d,e,c;this.$con.find(">table>thead input.filter").each(function(){if(this.value){b[this.parentNode.cIndex]=[this.value.toLowerCase(),0,this.result||{}]}else{if(this.result){this.result.innerHTML=""}}});for(a=0;a
      '+(b.length?"
    1. "+b.join("
    2. ")+"
    3. ":"")+'
      '+(a.length>1?"
    • "+a.slice(1).replace(/,/g,"
    • ")+"
    • ":"")+"
    ").dialog({modal:true,buttons:[{text:epgd.tr.apply,click:function(){var e="";$(this).find("ol > li").each(function(){e+=","+this.innerHTML});c.value=e.slice(1);$(this).dialog("close")}},{text:epgd.tr.cancel,click:function(){$(this).dialog("close")}}]}).find("ul,ol").sortable({connectWith:"ul,ol"}).disableSelection()};epgd.timerListBase=epgd.utils.inherits(function(a,b){this.dialog=b;if(this.dialog){this.dialog.list=this}if(!a.conSel){a.conSel="#content"}if(!a.empty){a.empty=epgd.tr.pages.timerList.empty}epgd.sortTable.call(this,a)},epgd.sortTable);epgd.timerListBase.prototype.getTable=function(){var a=epgd.tr.pages.timerList;return'
    '+epgd.tr.channel+this.sortIcons+''+a.startTime+this.sortIcons+' '+a.endTime+''+epgd.tr.pages.eventDetail.title+this.sortIcons+' VDR'+this.sortIcons+' '+this.sortIcons+(this.o.addNew?'':"")+(this.o.selectable?'
    ':"")+"
    "};epgd.timerListBase.prototype.update=function(){var a=this;epgd.utils.loader.process(function(){a.$con.find("tbody").empty();epgd.ajax({url:epgd.login.url+a.o.updateUrl,async:false,cache:false},function(g){if(!g.timers.length){a.hideHead()}else{var b=[],i=a.editIcons,h="DF",e={D:'
    '+epgd.tr.pages.timerList.timerStates.D+"
    ",E:'
    '+epgd.tr.pages.timerList.timerStates.E+"
    ",F:'
    '+epgd.tr.pages.timerList.timerStates.F+"
    ",R:'
    '+epgd.tr.pages.timerList.timerStates.R+"
    ",P:'
    '+epgd.tr.pages.timerList.timerStates.P+"
    ",U:'
    '+epgd.tr.pages.timerList.timerStates.U+"
    "},d=epgd.tr.pages.timerList.timerActions,c='$title$';$.each(g.timers,function(n,k){k.action=k.action?k.action.toUpperCase():"A";k.state=k.state?k.state.toUpperCase():"U";var m=epgd.vdrs.list[k.vdruuid]||{name:"--"},l=$(""+epgd.channels.getHtml(k.channelid)+""+(k.action!="A"?'
    '+d[k.action]+"
    ":e[k.state])+(k.info||"")+''+(k.day?epgd.utils.formatDate(k.day):"-")+""+new String(100+parseInt(k.starttime/100,10)).slice(1)+":"+new String(100+parseInt(k.starttime%100,10)).slice(1)+""+new String(100+parseInt(k.endtime/100,10)).slice(1)+":"+new String(100+parseInt(k.endtime%100,10)).slice(1)+"'+(k.title||"")+"
    "+(k.shorttext||""):">")+""+m.name+"
    "+(k.directory?k.directory+"~":"")+(k.file||"")+""+(k.autotimerid?c.replace("$id$",k.autotimerid).replace("$title$",k.autotimername||k.expression||epgd.tr.pages.timer.searchTimerList):"")+(h.indexOf(k.state)==-1?i:"")+"")[0];l.tData=k;b.push(l)});a.trs=b;a.showHead()}epgd.utils.loader.close();$(window).trigger("timerlist_updated",a)})},true)};epgd.timerListBase.prototype.action=function(a,d,b){var c;switch(d){case"edit":case"doc-new":this.dialog.render(a.closest("tr")[0].tData);break;case"trash":this.del(this.getSelectedIds(a));break;case"flashlight":c=a.attr("data-id"),list=this;$(window).one("searchTimerList_updated",function(){list.$con.find("tbody>tr").each(function(){if(this.tData.id==c){epgd.pages.searchTimerList.dialog.render(this.tData);return false}})});epgd.$menu.menu("select",{target:"#menu_searchTimerList"});break;default:epgd.sortTable.prototype.action.call(this,a,d,b)}};epgd.timerListBase.prototype.editIcons='';epgd.timerListBase.prototype.getSelectedIds=function(a){var b=[];if(a[0].parentNode.nodeName=="TH"){$(this.trs).filter(".selected:visible").each(function(){b.push(this.tData.id)})}else{b.push(a.closest("tr")[0].tData.id)}return b};epgd.timerListBase.prototype.del=function(c,d,e){var b=this,a=$.isArray(c)?c:[parseInt(c,10)];c&&a.length&&epgd.utils.confirm(epgd.tr.confirmDelete+(a.length>1?"
    "+a.length+epgd.tr.entries:""),function(g){g&&b.saveArray(a,e||"delete",d)})};epgd.timerListBase.prototype.saveArray=function(c,g,e){var b=this,a=$.isArray(c)?c:[parseInt(c,10)],d={};d[g]=a;c&&a.length&&this.save(d,null,function(k){try{var h=",";$(k.responseJSON.result.failed).each(function(){h+=a[this]+","});if(h.length>1){$(b.trs).each(function(){if(h.indexOf(","+this.tData.id+",")>=0){this.style.backgroundColor="red"}})}}catch(i){}return false},e)};epgd.timerListBase.prototype.save=function(d,b,a,c){if(!d){return false}var e=this;epgd.utils.loader.process(function(){epgd.ajax({url:epgd.login.url+(b||e.o.saveUrl),type:"post",data:JSON.stringify(d)},function(g){g=g.result;if(g.state==200){epgd.utils.topInfo(epgd.tr.dataSaved)}else{epgd.utils.topInfo(g.message,{isError:1})}epgd.utils.loader.close();e.$con&&e.$con.parent().length&&e.update();c&&c.call(e)},a)},true);return true};epgd.searchResultList=epgd.utils.inherits(function(a,b){epgd.timerListBase.call(this,$.extend({saveUrl:"data/save-searchtimer"},a),b)},epgd.timerListBase);epgd.searchResultList.prototype.getTable=function(){var a=epgd.tr.pages.timerList;return'
    '+epgd.tr.channel+this.sortIcons+''+a.startTime+this.sortIcons+""+a.endTime+""+epgd.tr.pages.eventDetail.title+this.sortIcons+"
    "};epgd.searchResultList.prototype.update=function(b){if(!b){return false}var a=this;b.id&&delete b.id;b.name&&delete b.name;b.max=epgd.profile.maxListEntries;epgd.utils.loader.process(function(){a.$con.find("tbody").empty();epgd.ajax({url:epgd.login.url+"data/search",type:"post",data:JSON.stringify(b)},function(e){var c=[],d;if(!e.events||!e.events.length){a.hideHead()}else{e.count>b.max&&epgd.utils.popup("Achtung! Es wurden "+e.count+" Ergebnisse gefunden. Angezeigt werden aber nur "+b.max+".
    Das Nachladen ist noch nicht implementiert! Der Wert kann in den Einstellungen angepasst werden");$.each(e.events,function(l,h){var k="",g="",i;if(h.dones){for(d in h.dones){i=h.dones[d];g+=''+i.state+"";if(i.state=="R"){k=' class="ui-state-disabled"'}}}c.push($(""+epgd.channels.getHtml(h.channelid)+''+epgd.utils.formatDate(h.starttime)+""+epgd.utils.formatTime(h.starttime)+""+epgd.utils.formatTime(h.starttime+h.duration)+''+h.title+"
    "+(h.shorttext||"")+""+g+"").tooltip()[0])});a.trs=c;a.showHead()}epgd.utils.loader.close();a.dialog&&a.dialog.resize&&window.setTimeout(function(){a.dialog.resize()},100)})},true)};epgd.searchTimerTimerList=epgd.utils.inherits(function(a,b){epgd.timerListBase.call(this,$.extend({saveUrl:"data/save-timer",updateUrl:"data/timers?state=P,R"},a),b)},epgd.timerListBase);epgd.searchTimerTimerList.prototype.getTable=function(){var a=epgd.tr.pages.timerList;return'
    '+epgd.tr.channel+this.sortIcons+''+a.startTime+this.sortIcons+""+a.endTime+""+epgd.tr.pages.eventDetail.title+this.sortIcons+"VDR"+this.sortIcons+"
    "};epgd.searchTimerTimerList.prototype.update=function(b){if(!b){return false}var a=this;epgd.utils.loader.process(function(){a.$con.find("tbody").empty();epgd.ajax({url:epgd.login.url+a.o.updateUrl+"&autotimerid="+b.id,async:true,cache:false},function(d){var c=[],e='';if(!d.timers.length){a.hideHead()}else{$.each(d.timers,function(k,g){var i=epgd.vdrs.list[g.vdruuid]||{name:"--"},h=$(""+epgd.channels.getHtml(g.channelid)+''+(g.day?$.datepicker.formatDate(epgd.tr.dateTimePicker.dateFormat,epgd.utils.date(g.day)):"-")+""+new String(100+parseInt(g.starttime/100,10)).slice(1)+":"+new String(100+parseInt(g.starttime%100,10)).slice(1)+""+new String(100+parseInt(g.endtime/100,10)).slice(1)+":"+new String(100+parseInt(g.endtime%100,10)).slice(1)+"'+g.title+"
    "+(g.shorttext||""):">")+""+i.name+"
    "+g.file+""+e+"")[0];h.tData=g;c.push(h)});a.trs=c;a.showHead()}a.dialog&&a.dialog.resize&&window.setTimeout(function(){a.dialog.resize()},100);epgd.utils.loader.close()})})};epgd.pages.timerList=new epgd.timerListBase({updateUrl:"data/timers?state=P,R",saveUrl:"data/save-timer",selectable:true,addNew:true,right:epgd.rights.umTimer},new epgd.timerDialog());epgd.pages.timersDone=new epgd.timerListBase({updateUrl:"data/timers?state=D,F,E&action=A",right:epgd.rights.umTimer});epgd.pages.timersDone.getTable=function(){return epgd.timerListBase.prototype.getTable.call(this).replace('data-defaultSort="1"','data-defaultSort="-1"')};epgd.pages.timerListDone=new epgd.timerListBase({updateUrl:"data/donetimers",saveUrl:"data/store-donetimers",selectable:true,right:epgd.rights.umTimer});epgd.pages.timerListDone.getTable=function(){return'
    '+this.sortIcons+''+epgd.tr.pages.timerList.recordTime+this.sortIcons+""+epgd.tr.pages.eventDetail.title+' '+this.sortIcons+''+epgd.tr.channel+this.sortIcons+''+this.sortIcons+'
    '};epgd.pages.timerListDone.action=function(a,c,b){if(c=="detail"&&!a[0].eventDetail){a[0].eventDetail=new epgd.doneTimerDetail(a.parent()[0])}epgd.timerListBase.prototype.action.call(this,a,c,b)};epgd.pages.timerListDone.stateIcons={D:'
    '+epgd.tr.pages.timerList.doneStates.D+"
    ",F:'
    '+epgd.tr.pages.timerList.doneStates.F+"
    ",f:'
    '+epgd.tr.pages.timerList.doneStates.f+"
    ",R:'
    '+epgd.tr.pages.timerList.doneStates.R+"
    ",C:'
    '+epgd.tr.pages.timerList.doneStates.C+"
    ",Q:'
    '+epgd.tr.pages.timerList.doneStates.Q+"
    "};epgd.pages.timerListDone.update=function(){var a=this;epgd.utils.loader.process(function(){epgd.ajax({url:epgd.login.url+a.o.updateUrl,async:false,cache:false},function(h){a.$con.find("tbody").empty();if(!h.donetimers.length){a.hideHead()}else{var b=[],g,e,d,c='$title$';for(e in h.donetimers){d=h.donetimers[e];g=$(""+(d.state&&a.stateIcons[d.state]||"")+''+epgd.utils.formatDateTime(d.starttime)+"
    "+parseInt(d.duration/60,10)+" "+epgd.tr.minutes+''+(d.title||"")+"
    "+(d.shorttext||"")+''+epgd.channels.getHtml(d.channelid)+''+(d.autotimerid?c.replace("$id$",d.autotimerid).replace("$title$",d.autotimername||d.expression||epgd.tr.pages.timer.searchTimerList):"")+"")[0];g.tData=d;b.push(g)}a.trs=b;a.showHead()}epgd.utils.loader.close();$(window).trigger("timerlist_updated",a)})},true)};epgd.pages.timerJobList=new epgd.timerListBase({updateUrl:"data/timers?notaction=A",saveUrl:"data/delete-timerjobs",selectable:true,right:epgd.rights.umTimer},new epgd.timerDialog());epgd.pages.searchTimerList=new epgd.timerListBase({saveUrl:"data/save-searchtimer",right:epgd.rights.umSearchTimer},new epgd.searchTimerDialog());epgd.pages.searchTimerList.getTable=function(){var a=epgd.tr.pages.timerList;return'
    '+epgd.tr.pages.search.searchName+"/"+epgd.tr.pages.search.searchExpression+' '+this.sortIcons+"hits"+this.sortIcons+'VDR'+this.sortIcons+'
    '};epgd.pages.searchTimerList.action=function(c,e,d){epgd.timerListBase.prototype.action.call(this,c,e,d);switch(e){case"link-ext":this.triggerUpdate();break;case"down-dir":if(!c[0].tList){var b={$td:c.parent().css("position","relative"),tdHeight:c.parent().outerHeight()+10,data:c.parent().parent()[0].tData,resize:function(){var g=this.list.$con.find(">table").addClass("sub");g.width(this.$td.parent().outerWidth());this.$td.height(this.tdHeight+g.outerHeight(true)+10)},toggle:function(g){this.list.$con.toggle(g);if(g){this.$td.css("height","100px");this.list.update(this.data)}else{this.$td.css("height","auto")}}},a={conSel:$('
    ').appendTo(document.body)};c[0].tList=b.data.type=="S"?new epgd.searchResultList(a,b):new epgd.searchTimerTimerList(a,b);c[0].tList.render();b.$td.append(b.list.$con)}c[0].tList.dialog.toggle(true);c.removeClass("i-down-dir").addClass("i-right-dir");break;case"right-dir":c.removeClass("i-right-dir").addClass("i-down-dir");if(c[0].tList){c[0].tList.dialog.toggle(false)}break}};epgd.pages.searchTimerList.update=function(){var a=this;this.$con.find("tbody").empty();epgd.utils.loader.process(function(){epgd.ajax({url:epgd.login.url+"data/searchtimers",async:false,cache:false},function(d){var b=[],e=a.editIcons,c={V:"i-tv",R:"i-record",S:"i-search"};if(!d.searchtimers.length){a.hideHead()}else{$.each(d.searchtimers,function(k,g){var i=epgd.vdrs.list[g.vdruuid]||{name:"--"},h=$("
    '+(g.name||g.expression)+"
    --":' data-sort="'+new String("00000"+g.hits).slice(-5)+'">'+g.hits)+""+i.name+""+e+"")[0];h.tData=g;b.push(h)});a.trs=b;a.showHead()}epgd.utils.loader.close();$(window).trigger("searchTimerList_updated",a)})})};epgd.pages.searchTimerList.triggerUpdate=function(){var a=this;epgd.ajax({url:epgd.login.url+"data/updatesearchtimer"},function(b){if(b.result.state==200){epgd.utils.topInfo(epgd.tr.dataSaved)}else{epgd.utils.topInfo(b.message,{isError:1})}a.update()})};epgd.pages.search=new epgd.searchDialog();epgd.pages.messageList=new epgd.timerListBase({saveUrl:"data/markmessages",selectable:true});epgd.pages.messageList.getTable=function(){return'
    id'+this.sortIcons+'Typ '+this.sortIcons+'Zeit'+this.sortIcons+'Titel '+this.sortIcons+'infotext '+this.sortIcons+'
    Status
    '+this.sortIcons+'
    '};epgd.pages.messageList.update=function(b){var a=this;epgd.utils.loader.process(function(){epgd.ajax({url:epgd.login.url+"data/messages",async:false,cache:false},function(l){a.$con.find("tbody").empty();if(!l.messages.length){a.hideHead()}else{var c=[],k,h,g,e={N:''+epgd.tr.pages.timerList.messageStates.N+"",R:''+epgd.tr.pages.timerList.messageStates.R+""},d={E:'
    '+epgd.tr.pages.timerList.timerStates.E+"
    ",F:'
    '+epgd.tr.pages.timerList.timerStates.F+"
    ",I:'
    '+epgd.tr.pages.timerList.messageTypes.I+"
    ",W:'
    '+epgd.tr.pages.timerList.messageTypes.W+"
    "};for(h in l.messages){g=l.messages[h];k=$(''+g.id+""+(d[g.type]||"")+''+epgd.utils.formatDateTime(g.updsp)+""+g.title+""+g.text+''+(e[g.state]||"")+"")[0];k.tData=g;c.push(k)}a.trs=c;a.$con.find(">table>tbody").append(c.sort(function(m,i){return m.tData.state==i.tData.state?m.tData.state.updsp>i.tData.state.updsp?-1:1:m.tData.state>i.tData.state}).slice());a.showHead()}epgd.utils.loader.close();$(window).trigger("messagelist_updated",a)})},true)};epgd.pages.messageList.action=function(b,g,e){var c=this.getSelectedIds(b),d=null,a;if(c){switch(g){case"check":d=b[0].parentNode.nodeName=="TH"?"R":"N";break;case"check-empty":d=b[0].parentNode.nodeName=="TH"?"N":"R";break;case"trash":d="D";break}if(d){for(a in c){c[a]={id:c[a],state:d}}d=="D"?this.del(c,null,"messages"):this.saveArray(c,"messages");return true}}return epgd.timerListBase.prototype.action.call(this,b,g,e)};epgd.vdr=function(a,b){this.uuid=a;$.extend(this,b)};epgd.vdr.prototype.switchChannel=function(a){epgd.ajax({url:epgd.login.url+"data/channelswitch?uuid="+this.uuid+"&channel="+a,cache:false},function(b){epgd.utils.popup(b.result.message,{title:"VDR",autoClose:5000})})};epgd.vdr.prototype.wol=function(){epgd.ajax({url:epgd.login.url+"data/wakeupvdr?uuid="+this.uuid,cache:false},function(a){epgd.utils.popup(a.result.message,{title:"VDR",autoClose:5000})})};epgd.vdrs={list:null,current:null,load:function(){if(!this.list){this.list={};epgd.ajax({url:epgd.login.url+"data/vdrs",async:false},function(b){var a;for(a in b.vdrs){epgd.vdrs.list[a]=new epgd.vdr(a,b.vdrs[a])}if(!epgd.vdrs.current){if(epgd.profile.defaultVDRuuid){epgd.vdrs.current=epgd.vdrs.list[epgd.profile.defaultVDRuuid];if(!epgd.vdrs.current){epgd.utils.log("the default VDR ("+epgd.profile.defaultVDRuuid+" is invalid! Please change this in Web Interface/options)")}}if(!epgd.vdrs.current){for(a in epgd.vdrs.list){epgd.vdrs.current=epgd.vdrs.list[a];break}}if(!epgd.vdrs.current){epgd.utils.log("no VDR found",2);epgd.vdrs.current=new epgd.vdr("000-missing-vdr-000",{name:"no VDR found"})}}$(window).trigger("vdrs_load")})}},get:function(a){return this.list[(a||this.current)]||{}}};epgd.pages.vdrs={render:function(){epgd.$con.html('
    ')}}; \ No newline at end of file +var epgd={};epgd.tr={oClock:"Uhr",minutes:"min",save:"speichern",copy:"kopieren",apply:"übernehmen",close:"schließen",clear:"löschen",yes:"ja",no:"nein",edit:"bearbeiten",cancel:"abbrechen",del:"löschen",test:"testen",reload:"neu laden",advanced:"erweitert",markAll:"alle markieren",markNone:"keinen markieren",markToggle:"Markierung umdrehen",confirmDelete:"Willst du wirklich löschen?",dataSaved:"Daten wurden gespeichert",dataDeleted:"Daten wurden gelöscht",dataSend:"Daten wurden gesendet",channel:"Kanal",date:"Datum",entries:" Einträge",error:{error:"Fehler",common:"Es ist ein allgemeiner Fehler aufgetreten",serverNotResponse:"Der Server konnte nicht erreicht werden!",notImplemented:"Dieses Feature ist zur Zeit noch nicht implementiert",forbidden:"Zugriff verweigert!",noData:"Für diese Anfrage konnten keine Daten ermittelt werden!",emptyField:"Bitte fülle das Feld $field$ aus!",invalid:"Der eingegebene Wert ist ungültig!"},menu:{now:"Programm",magazine:"Magazin",timer:"Timer",records:"Aufnahmen",search:"Suche",options:"Einstellungen",help:"Hilfe"},pages:{now:{at:"am"},timer:{timerList:"Timer",searchTimerList:"Suchtimer",timersDone:"kürzliche Aufträge",timerListDone:"Auftragshistorie",timerJobList:"asynchrone Aufträge",messageList:"Systemmeldungen"},timerList:{empty:"Keine Timer vorhanden!",startTime:"Anfang",endTime:"Ende",folder:"Verzeichnis",file:"Dateiname",recordTime:"Aufnahmezeit",lifetime:"Lebenszeit",prio:"Priorität",inactive:"Inaktiv",newTimer:"Neuen Timer anlegen",namingMode:"Ermittlung des Dateinamens",namingModes:["VDR","Auto","Constable","Serie","Kategorisiert","Usermode","Template"],template:"Template",templateFields:{"%title%":": Titel (EPG)","%shorttext%":": Untertitel (EPG)","%starttime%":": Startzeit (EPG)","%year%":": Jahr (EPG)","%category%":": Kategorie (EPG)","%episodname%":": Titel der Serie (constabel)","%shortname%":": Kurz-Titel der Serie (constabel, optional)","%partname%":": Name der Folge (constabel)","%season%":": Staffel (constabel)","%part%":": Teil der Staffel (constabel)","%number%":": Nummer über alle Staffeln (constabel)","%extracol1%":": Zusätzliche Angaben z.B. bei Tatort die Ermittler (constabel, optional)","%extracol2%":": ... z.B. bei Tatort der Ort (constabel, optional)","%extracol3%":": ... z.B. bei Tatort der Sender (constabel, optional)"},episode:"Serientitel",noEpgMatch:"Ignoriere fehlende EPG Info",noRepeat:"Wiederholungen vermeiden",searchTimerReload:"Suchtimer updaten",chInclude:"Auf Kanäle einschränken",chExclude:"Kanäle ausschließen",nextDays:"innerhalb der nächsten $field$ Tage",confirmSaveBigResult:"Die Suche ergibt $cnt$ Treffer, trotzdem speichern?",timerStates:{D:"gelöscht",E:"Fehler",F:"Aufnahme erfolgreich",P:"wartet auf Start",R:"nimmt gerade auf...",U:"unbekannt"},timerActions:{C:"Timer wurde erstellt und muss noch von einem VDR übernommen werden",D:"Timer wurde gelöscht und muss noch im VDR gelöscht werden",F:"Zuweisung Timer an VDR fehlgeschlagen",M:"Timer wurde verändert und muss noch vom VDR verarbeitet werden"},doneStates:{f:"Timer konnte nicht erstellt werden",C:"Timer bereits erstellt",D:"Timer gelöscht",F:"Aufnahme fehlgeschlagen",Q:"Timer in Vorbereitung",R:"Aufnahme fertig"},messageStates:{N:"Neu",R:"gelesen"},messageTypes:{I:"Information",W:"Warnung",E:"Fehler",F:"Fataler Fehler"},chFormat:"bevorzugtes Sendeformat"},eventDetail:{record:"Aufnehmen",repeat:"Wiederholungen",ch_switch:"umschalten",eventNext:"nachfolgend",eventPrev:"vorher",parentalrating:"ab ",mergeSrc:"Quelle ",genre:"Genre",category:"Kategorie",country:"Land",year:"Jahr",season:"Staffel",part:"Folge",number:"Folge Insgesamt",extentedInfo:"weitere Informationen",scrapperMovieInfo:"Filminformation",scrapperSerieInfo:"Serieninformation",constabelInfo:"Constabel Episodenliste",addConstableLink:"Link erzeugen",loginConstable:"Login",title:"Titel",original_title:"Originaltitel",runtime:"Laufzeit",lang:"Sprache",release_date:"Erscheinungsdatum",actors:"Schauspieler",network:"Netzwerk",seriesstatus:"Status",gueststars:"Gäste",homepage:"Webseite",popularity:"Beliebtheit",vote_average:"ø Bewertung",extInfo:{director:"Regie",camera:"Kamera",screenplay:"Drehbuch",producer:"Produktion",music:"Musik",moderator:"Moderator",commentator:"Kommentator",guest:"Gäste",info:"Info",other:"Sonstige"}},options:{profile:"allgemein",editChannels:"Kanäle bearbeiten",editUser:"Benutzer bearbeiten"},editChannels:{menu:{channelList:"Kanalliste",referenceList:"Referenzliste",insertAsText:"als Text einfügen",extentEmptyChannelNames:"leere Kanalnamen ergänzen",applyAllChannelNames:"Alle Kanalnamen übernehmen",applyChannelSort:"Kanalsortierung übernehmen"},headline:"Sortierung der Kanäle durch drag und drop, Blockmarkierung durch zus. gedrückter shift-Taste",checkWeb:"Kanal in Webansicht anzeigen",checkVDR:"Kanal zum VDR übertragen",desc_insertList:"Kopiere den Inhalt einer channels.conf in das Textfeld unten. Eine vollständige Liste gibt es beispielsweise hier:"},editUser:{user:"Benutzer",sel:"auswählen",add:"neu anlegen",active:"Aktiv",inActive:"Inaktiv",rights:{label:"Rechte",umConfig:"Konfiguration lesen",umConfigEdit:"Konfiguration ändern",umConfigUsers:"Benutzer konfigurieren",umTimer:"Timer lesen",umTimerEdit:"Timer bearbeiten",umSearchTimer:"Suchtimer lesen",umSearchTimerEdit:"Suchtimer bearbeiten",umFsk:"FSK",umRecordings:"Aufnahmen lesen",umRecordingsEdit:"Aufnahmen editieren"}},help:{url:"lang/hilfe.html",noHelp:"Hierzu konnte kein Hilfstext gefunden werden"},search:{search:"suchen",searchName:"Name",searchExpression:"Suchausdruck",caseSensitive:"Klein-/Großschreibung",searchModes:["exakte Übereinstimmung","regulärer Ausdruck","Muster","enthalten in"],searchFields:["Titel","Kurztext","Beschreibung"],empty:"Leider nichts gefunden.",matchdensity:"Treffergenauigkeit"},login:{label:"Login",userName:"Benutzername",password:"Passwort",loggedAlwaysIn:"angemeldet bleiben",logout:"Abmelden",error:"Fehler beim Anmelden!",logoutMessage:"Du wurdest abgemeldet!",needLogin:"Login erforderlich"},records:{ddLabel:"Drag und Drop",refreshMessage:"Aufnahmelisten werden neu geladen, Seite lädt in $sec$ Sekunden neu",moveMessage:"Aufnahme verschieben von \n$src$\nnach",notFoundMessage:"Aufnahme nicht gefunden, ggf einmal aktualisieren",deleteMessage:"Soll die Aufnahme $src$ wirklich gelöscht werden?",available:"Verfügbar",commonRecFolder:"gemeinsame Aufnahmen",similarTimer:"ähnliche Sendung aufnehmen"},profile:{mailReceiver:"eMail",sendTCC:"sende Mail bei Timerkonflikten",sendMessages:"sende Mail bei Systemmeldungen",magazinePan:"Scrollgeschwindigkeit in Minuten
    (0 = aus)",magazinePanDelay:"Auslöseverzögerung",maxListEntries:"maximal Anzahl Einträge, die auf einmal vom Server geladen werden sollen, z.B. bei Suchen, Suchtimern usw.",system:{label:"epgd Backend"},vdr:{startWithSched:"EPG Menü startet mit Schedule"},record:{subFolderSort:"Sortierung der Unterordner"}}},dateTimePicker:{monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",timeOnlyTitle:"Zeit wählen",timeText:"Sendungsbeginn",timeTextBetween:"zwischen",prevText:"<Zurück",nextText:"Vor>",currentText:"Jetzt",closeText:"Fertig",hourText:"Stunde",minuteText:"Minute",secondText:"Sekunde",millisecText:"Millisekunde",microsecText:"Mikrosekunde",timezoneText:"Zeitzone",timeFormat:"HH:mm",dateFormat:"D, dd.mm.yy",amNames:["vorm.","AM","A"],pmNames:["nachm.","PM","P"],isRTL:false,showMonthAfterYear:false,yearSuffix:""}};epgd.profile={needLogin:-1,channelLogoPath:"data/channellogo",eventImgPath:"data/eventimg",movieMediaPath:"data/moviemedia",serieImgPath:"data/seriesmedia",movieActorPath:"http://www.themoviedb.org/person/",serieSeasonPath:"http://www.thetvdb.com/?tab=seasonall&id=",constabelEditPath:"https://www.eplists.de/eplist.cgi?action=edit&back=&file=",constabelLinkPath:"https://www.eplists.de/eplist.cgi?action=show_form_redir&linkname=",minEventTime:0,maxEventTime:0,logoShowName:0};epgd.userProfile_defaults={defaultVDRuuid:"",constabelLoginPath:false,pickerFirstDay:"6",quickTimes:"",startWithSched:0,startPage:"menu_options",namingModeSerie:"0",namingModeSearchSerie:"0",namingModeMovie:"0",namingModeSearchMovie:"0",namingModeSerieTemplate:"",namingModeSearchSerieTemplate:"",namingModeMovieTemplate:"",namingModeSearchMovieTemplate:"",chFormat:"",timerDefaultVDRuuid:"",searchAdv:"0",mailReceiver:"",messageMailTypes:"",magazinePan:10,magazinePanDelay:400,maxListEntries:100,ratings:"",recordSubFolderSort:1};epgd.profile_load=function(b){var a=$.extend(epgd.profile,epgd.userProfile_defaults);epgd.ajax({url:epgd.login.url+"data/parameters",async:false,cache:false,dataType:"json"},function(l){var m,g,d,c,e,h={};for(g in l.parameters){m=l.parameters[g];c=a[m.name];if(c!=undefined&&c!=m.value){a[m.name]=m.type===0?parseInt(m.value,10):m.value;h[m.name]=c;if(m.name.indexOf("logo")==0){epgd.channels.isDirty=true}}}if(epgd.utils.timeOffset==null){epgd.utils.timeOffset=(l.timezone-new Date().getTimezoneOffset()*60)*1000;e=epgd.utils.now();epgd.$dtPicker.datetimepicker("setDate",new Date(e.setMinutes(parseInt(e.getMinutes()/15,10)*15)))}if(!a.minEventTime){e=epgd.utils.now();a.minEventTime=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0).getTime()/1000;h.minEventTime=0}if(!a.maxEventTime){a.maxEventTime=a.minEventTime+8*24*60*60-60;h.maxEventTime=0}for(d in h){$(window).trigger("profile_updated",h);break}epgd.channels.isDirty&&epgd.channels.load()})};epgd.pages={};epgd.login={user:"",session:"",rights:-1,url:""};epgd.rights={umConfig:2,umConfigEdit:4+2,umConfigUsers:8,umTimer:64,umTimerEdit:128+64,umSearchTimer:256+64,umSearchTimerEdit:512+256+128+64,umFsk:4096,umRecordings:32768,umRecordingsEdit:65536+32768};epgd.utils={timeOffset:null,now:function(){return new Date(new Date().getTime()-this.timeOffset)},date:function(a){return new Date(a*1000-this.timeOffset)},unixTime:function(a){return a?parseInt((a.getTime()+this.timeOffset)/1000,10):0},formatTime:function(a){var b=new Date(a*1000-this.timeOffset);return new String(100+b.getHours()).slice(1)+":"+new String(100+b.getMinutes()).slice(1)},formatDateTime:function(b,a){var c=new Date(b*1000-this.timeOffset);return $.datepicker.formatDate((a||epgd.tr.dateTimePicker.dateFormat),c)+" "+new String(100+c.getHours()).slice(1)+":"+new String(100+c.getMinutes()).slice(1)},formatDate:function(b,a){var c=new Date(b*1000-this.timeOffset);return $.datepicker.formatDate((a||epgd.tr.dateTimePicker.dateFormat),c)},popup:function(b,c){var d=$(window),a;c=$.extend({autoOpen:true,dialogClass:"popup",show:{effect:"blind",duration:1000},hide:{effect:"explode",duration:1000},width:400,height:200,maxWidth:d.width()*0.8,maxHeight:d.height()*0.7},c);a=$('

    '+b+"

    ").dialog(c);c.autoClose&&window.setTimeout(function(){a.dialog("close").dialog("destroy")},c.autoClose);return a},confirm:function(a,c){var b={modal:true,buttons:{}};b.buttons[epgd.tr.yes]=function(){$(this).dialog("close");c(true)};b.buttons[epgd.tr.no]=function(){$(this).dialog("close");c(false)};this.popup(a,b)},topInfo:function(b,c){var e=c&&c.isError,d,a;c=$.extend({autoClose:e?0:3000,className:"ui-state-"+(e?"error":"highlight")},c);a=(c.autoClose||3000)/2;d=$('
    '+b+'
    ').appendTo(epgd.$menu).animate({opacity:0.4},a,function(){d.animate({opacity:1},a)});c.autoClose&&window.setTimeout(function(){d.remove()},c.autoClose)},sendMail:function(c,a,b,d){epgd.ajax({url:epgd.login.url+"data/sendmail",type:"post",data:JSON.stringify({receiver:(d||epgd.profile.mailReceiver),subject:c,body:a,mimetype:b})},function(e){e=e.result;if(e&&e.state==200){epgd.utils.topInfo(epgd.tr.dataSend)}else{epgd.utils.topInfo(e.message,{isError:1})}epgd.profile_load()})},loader:{$win:$('
    '),cnt:0,process:function(b,c){var a=this;this.cnt++;this.$win.appendTo(document.body).stop().animate({opacity:0.7},{always:function(){try{b()}catch(d){epgd.utils.log((d.message||"common error")+"\n"+(d.stack||""),0);a.close()}!c&&a.close()}},200)},close:function(){if(this.cnt>0){this.cnt--;this.cnt==0&&this.$win.remove()}}},addAutoComplete:function(d,b){var c=$(d),e=c[0].className,a=c[0].style.width||"";$(d).autocomplete($.extend({minLength:0,multiselect:false,create:function(i,m){var l=$(this).autocomplete("instance"),n=l.options,k,h;l.selectedItems={};if(n.multiselect){l.multiselect=$("
    ").addClass("ui-autocomplete-multiselect ui-state-default ui-widget "+e).css("width",a).insertBefore(l.element).append(l.element).bind("click.autocomplete",function(){l.element.focus()});l.menu.element.css({height:"300px","overflow-y":"auto"});k=parseInt(l.element.css("fontSize")||10,10);function g(p){var o=$(this);o.width(1).width(this.scrollWidth+k-1)}h=$.ui.keyCode;l.element.bind({"keydown.autocomplete":function(p){if((this.value==="")&&(p.keyCode==h.BACKSPACE)){var o=l.element.prev();delete l.selectedItems[o.text()];o.remove()}},"focus.autocomplete blur.autocomplete":function(){l.multiselect.toggleClass("ui-state-active")},"keypress.autocomplete change.autocomplete focus.autocomplete blur.autocomplete":g}).trigger("change");n.select=n.select||function(p,o){if(!l.selectedItems[o.item.label]){$("
    ").addClass("ui-autocomplete-multiselect-item").text(o.item.label).append($("").addClass("ui-icon ui-icon-close").click(function(){var q=$(this).parent();delete l.selectedItems[q.text()];q.remove()})).insertBefore(l.element);l.selectedItems[o.item.label]=o.item}l._value("");return false}}else{n.select=n.select||function(p,o){l.selectedItems[0]=o.item;l._value(o.item.label);return false}}}},b)).focus(function(){$(this).autocomplete("search","")})},getAutoCompleteValues:function(i,c){c=c||"";var b="",a=","+c,g,d;try{g=$(i).autocomplete("instance").selectedItems;for(d in g){b+=a+g[d].value+c}}catch(h){}return b.slice(1)},setAutoCompleteValues:function(g,a){var d=$(g).autocomplete("instance"),c,b,e;d.multiselect&&d.multiselect.find(">div").remove();d.selectedItems={};if(a){for(b=0;b',e;for(e in a){c+='
  • '+e+""+a[e]+"
  • "}b.$placeholders=$(c+"").hide().insertAfter(b).click(function(i){var k=i.target.nodeName=="B"?$(i.target).text():i.target.nodeName=="LI"?$(i.target.firstChild).text():null,l=$(b).prop("selectionStart"),h=$(b).val();if(k){$(b).val(h.substring(0,l)+k+h.substring(l,h.length)).focus();l+=k.length;if(b.setSelectionRange){b.setSelectionRange(l,l)}else{if(b.createTextRange){h=b.createTextRange();h.collapse(true);h.moveEnd("character",l);h.moveStart("character",l);h.select()}}}$(this).hide()});$(b).keydown(function(h){if(h.key==d){$(document).one("click",function(){b.$placeholders.hide()});b.blur();return !b.$placeholders.show().position({my:"left top",at:"left bottom",of:b})}})},inherits:function(a,c){var b=function(){};b.prototype=c.prototype;a.prototype=new b();a.prototype.constructor=a;a.base=c.prototype;return a},log:function(a,c){console.log("error:"+a);try{$.ajax({url:"data/log",type:"get",async:true,cache:false,data:"level="+(c||0)+"&message="+escape(a)})}catch(b){}}};epgd.init=function(){epgd.$con=$('
    ').appendTo(document.body);$.datepicker.setDefaults(epgd.tr.dateTimePicker);$.datepicker.setDefaults({showOtherMonths:true,selectOtherMonths:true});$.timepicker.setDefaults(epgd.tr.dateTimePicker);$.timepicker.setDefaults({timeInput:true,controlType:{create:function(b,g,e,h,c,a,d){if(e=="hour"){if(!b.inst.settings.timeOnly){$("#ui-datepicker-div").width(($(window).width()>500?430:230)+"px")}$("0246810
    121416182022").appendTo(g).bind("click",{tp_inst:b,obj:g,unit:e},$.timepicker.quicklink)}else{if(e=="minute"){$("0153045").appendTo(g).bind("click",{tp_inst:b,obj:g,unit:e},$.timepicker.quicklink)}else{if(e=="second"&&epgd.profile.quickTimes){g.closest("dl").find(".ui_tpicker_time").removeClass().bind("click",{tp_inst:b,obj:g,unit:"time"},$.timepicker.quicklink).html('').replace(/~/g,'");if(b.inst.settings.alwaysSetTime){epgd.pages.help.initButtons(b.inst.dpDiv.find(".ui-datepicker-buttonpane").append(epgd.pages.help.getButton("datepicker")))}else{$('").appendTo(b.inst.dpDiv.find(".ui-datepicker-buttonpane")).click(function(){b.$input.val("");$.datepicker._hideDatepicker()})}return g}else{return g}}}$('').prependTo(g).spinner({min:c,max:a,step:d,change:function(k,i){if(k.originalEvent!==undefined){b._onTimeChange()}b._onSelectHandler()},spin:function(k,i){b.control.value(b,g,e,i.value);b._onTimeChange();b._onSelectHandler()}});return g},options:function(a,d,c,b,e){if(typeof(b)=="string"&&e!==undefined){return d.find(".ui-timepicker-input").spinner(b,e)}return d.find(".ui-timepicker-input").spinner(b)},value:function(a,d,b,g){try{if(g!==undefined){return d.find(".ui-timepicker-input").spinner("value",g)}return d.find(".ui-timepicker-input").spinner("value")}catch(c){return false}}}});epgd.$menu=$('").appendTo(document.body).find("ul").hide();epgd.$menu.$maxBut=$('').insertBefore(epgd.$menu).click(function(){epgd.$menu.parent().toggleClass("open")});epgd.$menu.checkMenuSize=function(a,b){if(window.wrm_i){if(window.wrm_w==$(window).width()){window.clearInterval(window.wrm_i);delete window.wrm_i;epgd.$menu.parent().removeClass("mini").width(window.wrm_w).offset({left:$(window).scrollLeft()});epgd.$menu.checkMenuSize(null,b)}else{window.wrm_w=$(window).width()}return}if(a){window.wrm_w=$(window).width();if(!window.wrm_i){window.wrm_i=window.setInterval(epgd.$menu.checkMenuSize,200,null,b)}}else{if(epgd.$menu.height()>40){epgd.$menu.parent().addClass("mini")}window.setTimeout(function(){document.body.style.paddingTop=(epgd.$menu.parent().height()+10)+"px";b&&window.setTimeout(b,200)},200)}};$(window).bind("resize",epgd.$menu.checkMenuSize);epgd.$dtPicker=$('').appendTo(document.body).hide().bind("click",function(){$(this).datepicker("show");return false});epgd.$dtPicker.datetimepicker({beforeShow:function(){this.$overlay=$("
    ").addClass("ui-widget-overlay ui-front").appendTo(document.body)},onClose:function(){this.$overlay.remove();$(window).trigger("datepicker")},calendarStart:function(){var a=new Date(epgd.profile.minEventTime*1000);leadDays=(a.getDay()-parseInt(epgd.profile.pickerFirstDay,10)+7)%7;a.setHours(12,0);a.setDate(a.getDate()-leadDays);return a}});epgd.$menu.menu({position:{at:"left bottom"},select:function(a,b){var c=b.item.attr("id");if(!c||c.indexOf("menu_")!=0||(a.originalEvent&&a.originalEvent.target.nodeName!="A"&&a.originalEvent.target.nodeName!="LI")){return false}$(window).trigger("epgd_close");epgd.$menu.parent().removeClass("open");$(".menu-active",this).removeClass("menu-active");$(document.body).append(epgd.$dtPicker.hide());epgd.$menu.checkMenuSize(null,function(){try{b.item.addClass("menu-active").parent().parent(".ui-menu-item").addClass("menu-active");epgd.pages[c.slice(5)].render()}catch(d){epgd.utils.popup(epgd.tr.error.common,{title:epgd.tr.error.error});epgd.utils.log((d.message||"common error")+"\n"+(d.stack||""),2)}})}});$(window).bind("epgd_close",function(){$(".epgPopUp").dialog("destroy")}).bind("profile_updated",function(b,a){if(a.minEventTime!=undefined){epgd.$dtPicker.datetimepicker("option",{minDateTime:new Date((epgd.profile.minEventTime=parseInt(epgd.profile.minEventTime,10))*1000),minDate:new Date(epgd.profile.minEventTime*1000)})}if(a.maxEventTime!=undefined){epgd.$dtPicker.datetimepicker("option",{maxDateTime:new Date((epgd.profile.maxEventTime=parseInt(epgd.profile.maxEventTime,10))*1000),maxDate:new Date(epgd.profile.maxEventTime*1000)})}if(a.pickerFirstDay!=undefined){epgd.$dtPicker.datetimepicker("option",{firstDay:epgd.profile.pickerFirstDay})}if(a.defaultVDRuuid!=undefined){$("#menu_vdrs > select").val(epgd.profile.defaultVDRuuid)}if(a.quickTimes!=undefined){epgd.pages.magazine.initQT()}if(a.needLogin!=undefined){epgd.pages.login.doLogin()}}).bind("login_changed",function(a,b){epgd.$menu.html("").hide();epgd.$con.html("");if(epgd.login.rights){epgd.$menu.append('");epgd.$menu.append('");(epgd.login.rights&epgd.rights.umTimer)==epgd.rights.umTimer&&epgd.$menu.append("
  • "+epgd.tr.menu.timer+'
  • ");(epgd.login.rights&epgd.rights.umRecordings)==epgd.rights.umRecordings&&epgd.$menu.append('");epgd.$menu.append('");epgd.$menu.append("
  • "+epgd.tr.menu.options+'
  • ");epgd.$menu.append('");epgd.$menu.append('')}epgd.profile.needLogin=="1"&&epgd.$menu.append('");if(epgd.login.user!=b.user){epgd.profile_load();epgd.channels.isDirty=true;epgd.vdrs.list=null}epgd.channels.load();epgd.vdrs.load();epgd.$menu.show().menu("refresh");epgd.$menu.menu("select",{target:$(epgd.login.rights?(location.hash||"#"+epgd.profile.startPage||"#menu_profile"):"#menu_login")})}).bind("vdrs_load",function(){html="";for(var a in epgd.vdrs.list){html+='"}$("").replaceAll("#menu_vdrs > select").show().change(function(){var b=epgd.vdrs.current=this.selectedIndex>=0?epgd.vdrs.get(this[this.selectedIndex].value):{};if(b&&b.osd2webp){$("#osd2web").prop("target","osd2web_"+b.name).prop("href","http://"+b.ip+":"+b.osd2webp).click(function(c){c.stopPropagation();return true}).show()}else{$("#osd2web").hide()}}).mousedown(function(b){b.stopPropagation();return true}).click(function(b){return false}).change()}).bind("unload",function(){if(epgd.login.session){epgd.pages.login.doLogin("logout")}});epgd.pages.now.init();epgd.pages.magazine.init();epgd.profile_load();if(epgd.profile.needLogin==-1){epgd.profile.needLogin=0;epgd.pages.login.doLogin()}window.setInterval(epgd.profile_load,3600000)};window.onerror=function(i,g,b,d,c){var a=!d?"":"\ncolumn: "+d;a+=!c?"":"\nerror: "+c.stack;try{epgd.utils.log(i+"\nline: "+b+a,2)}catch(h){}return true};$.widget("custom.catcomplete",$.ui.autocomplete,{_create:function(){this._super();this.widget().menu("option","items","> :not(.ui-autocomplete-category)")},_renderMenu:function(c,b){var d=this,a="";$.each(b,function(g,h){var e;if(h.category!=a){c.append("
  • "+h.category+"
  • ");a=h.category}e=d._renderItemData(c,h);if(h.category){e.attr("aria-label",h.category+" : "+h.label)}})}});$.datepicker._gotoToday=function(c){var b=this._getInst($(c)[0]),a=epgd.utils.now();this._base_gotoToday(c);this._setTime(b,a);this._setDate(b,a);this._hideDatepicker()};$.timepicker.quicklink=function(b){var g=b.target.nodeName=="I"?b.target.firstChild:b.target,a,i=null,h=false;try{a=b.data.tp_inst||$.datepicker._getInst(epgd.$dtPicker[0]).settings.timepicker}catch(c){epgd.utils.log((c.message||"common error")+"\n"+(c.stack||""),2);return false}if(g.nodeName=="U"){if(b.data.unit=="time"){i=$.datepicker.parseTime(a._defaults.timeFormat,g.innerHTML,a._defaults)}else{if(b.data.unit=="hour"){i={hour:parseInt(g.innerHTML,10),minute:a.minute}}}if(i){if(i.hour"+$('label[for="'+a.id+'"]').text()+"":"")+"
    "+b+"
    ",{autoClose:3000});a&&a.focus();return false},loadFolder:function(){var a=this;epgd.ajax({url:epgd.login.url+"data/recordingdirs"},function(d){if(d.recordingdirs.length){var b=[],c=epgd.vdrs.list,e;$.each(d.recordingdirs,function(h,g){e=c[g.vdruuid];b.push({value:g.directory,category:e?e.name:"-"})});$(a.form.tFolder).catcomplete("option","source",b)}})},close:function(){if(this.$win){this.$win.dialog("close")}},create:function(){var d=this.options,c=epgd.tr.pages.timerList,b="",a;for(a=1;a'+epgd.tr.dateTimePicker.dayNamesShort[a]}b+=''+epgd.tr.dateTimePicker.dayNamesShort[0];this.$win=$('
    '+b+'


    ');!d.embed&&this.$win.appendTo(document.body).dialog(d);this.$win[0].list=this.list;this.form=this.$win.find("form")[0];$(this.form.tFolder).catcomplete({minLength:0,maxHeight:300}).focus(function(){$(this).catcomplete("search","")});$(this.form.tType).change(function(){if(this.selectedIndex<0){this.selectedIndex=0}this.form.className=this.form.className.replace(/ ?type./,"")+" type"+this[this.selectedIndex].value});$(this.form.tNameMode).change(function(){this.form.tTemplate.parentNode.style.display=(this.selectedIndex==6)?"block":"none"});epgd.utils.addPlaceholders(this.form.tTemplate,"%",c.templateFields);this.loadFolder()},render:function(b){b=b||{};if(!this.$win){this.create()}!this.options.embed&&this.$win.dialog("open").dialog("moveToTop");var c=this.form,e,a;c.tSName.focus();if(b.id){c.tID.value=b.id;this.$win.parent().find("#tBDel").show();this.$win.parent().find("#tBToggle").hide()}else{c.tID.value="";this.$win.parent().find("#tBDel").hide();this.$win.parent().find("#tBToggle").show()}$(c.tType).val(b.type||"R").change();$(c.tVdr).val(b.vdruuid||epgd.profile.timerDefaultVDRuuid);e=b.weekdays||0;for(a=0,f=1;a
    ');$(a.tWeek[0]).parent().before('

      -
    ');$(a.tNameMode).after(' ');$(a.tFolder).parent().after('
    ');$(this.form.tStart).datetimepicker({minDateTime:epgd.utils.now()});$(this.form.tEnd).timepicker({});epgd.utils.addAutoComplete(a.tChannel,{source:epgd.channels.autoCompleteData});a.tFile=$(a).find("#tFile")[0];a.tEvTime=$(a).find("#tEvTime")[0];a.tTitle=$(a).find("#tTitle").click(function(){if(a.tEvID.value){epgd.utils.loader.process(function(){new epgd.eventDetail(a.tEvID.value).render()})}})[0]};epgd.timerDialog.prototype.render=function(a){a=a||{};epgd.timerDialog.base.render.call(this,a);var b=this.form,c;b.tFile.innerHTML=a.file||"...";b.tEvID.value=a.eventid||"";epgd.utils.setAutoCompleteValues(b.tChannel,a.channelid?[a.channelid]:null);b.tTitle.innerHTML=a.title||"";b.tEvTime.innerHTML=a.evStartTime?epgd.utils.formatDateTime(a.evStartTime)+" - "+epgd.utils.formatTime(a.evStartTime+a.evDuration):"";$([b.tStart,b.tEnd]).datetimepicker("option","disabled",!!a.eventid);if(a.day||!a.evStartTime){if(a.starttime){c=epgd.utils.date((a.day+parseInt(a.starttime/100,10)*60*60+(a.starttime%100)*60))}else{if(a.day){c=epgd.utils.date(a.day)}else{c=epgd.utils.now()}}$(b.tStart).datetimepicker("setDate",c);$(b.tStart).datetimepicker("setTime",c);if(a.endtime){c=epgd.utils.date((a.day+parseInt(a.endtime/100,10)*60*60+(a.endtime%100)*60))}else{c=new Date(c.getTime()+2*60*60000)}$(b.tEnd).datetimepicker("setTime",c)}else{$([b.tStart,b.tEnd]).val("...")}b.tNameMode.selectedIndex=typeof a.namingmode=="undefined"?parseInt(a.category=="Serie"?epgd.profile.namingModeSerie:epgd.profile.namingModeMovie,10):a.namingmode;b.tTemplate.value=a.template||(a.category=="Serie"?epgd.profile.namingModeSerieTemplate:epgd.profile.namingModeMovieTemplate);$(b.tNameMode).change()};epgd.timerDialog.prototype.getData=function(g){var b=this.form,e,a,c={};if(b.tEvID.value){c.eventid=parseInt(b.tEvID.value,10)}c.active=b.tInactive.checked?0:1;if(b.tID.value){c.id=parseInt(b.tID.value,10)}if(b.tStart.value&&b.tStart.value!="..."){e=$(b.tStart).datepicker("getDate");c.starttime=e.getHours()*100+e.getMinutes();e.setHours(0);e.setMinutes(0);c.day=parseInt(e.getTime()/1000,10);c.endtime=parseInt(b.tEnd.value.replace(":",""),10)}else{if(!c.eventid&&!g){return this.showError(epgd.tr.error.emptyField.replace("$field$",epgd.tr.pages.timerList.recordTime),b.tStart)}}c.weekdays=0;for(a=0,f=1;a
    ').insertAfter(this.form)))}else{this.searchResultList.$con.find("tbody").empty()}if(!this.searchResultList.$con.parent().length){this.searchResultList.$con.insertAfter(this.form);this.searchResultList.init()}this.searchResultList.update(b||this.getData());this.searchResultList.$con[0].scrollIntoView(true)};epgd.searchTimerDialog.prototype.create=function(){epgd.searchTimerDialog.base.create.call(this);var c=epgd.tr.pages.timerList,e=epgd.tr.pages.search,d="",b=this.form,a;for(a in e.searchModes){d+='"}if(!epgd.categories){epgd.categories=[];epgd.ajax({url:"data/categories",async:false},function(g){epgd.categories=g.categories})}if(!epgd.genres){epgd.genres=[];epgd.ajax({url:"data/genres",async:false},function(g){epgd.genres=g.genres})}$(b.tSName).parent().parent().after('
       
    '+[""].concat(e.searchFields).join('')+'
    '+c.episode+' '+epgd.tr.pages.eventDetail.season+' '+epgd.tr.pages.eventDetail.part+'
    '+epgd.tr.pages.eventDetail.category+'
    '+epgd.tr.pages.eventDetail.genre+'
    GoldTippTagesTippTopTipp
    '+epgd.tr.pages.eventDetail.year+'
    '+c.noEpgMatch+'
    '+[""].concat(e.searchFields).join('')+'
    "+epgd.pages.help.getIcon("sTChannels")+'
    ");$(b.tWeek[0]).before(""+epgd.tr.dateTimePicker.timeTextBetween+' - ').parent().append('
    '+c.nextDays.replace("$field$",'')+"").insertAfter(b.tTime.parentNode);$([b.tStart,b.tEnd]).timepicker({alwaysSetTime:false});$([b.tTime,b.tRepeat,b.tAdv]).change(function(){$(this).parent().next().toggle(this.checked)});$([b.tSFSeason,b.tSFSPart,b.tSFYear]).change(function(){this.value=this.value.replace(/[^0-9-]/g,"");if(this.value.length==1&&this.value=="-"){this.value=""}});$(b.tType).append('");epgd.utils.addAutoComplete(b.tChannels,{source:epgd.channels.autoCompleteData,multiselect:true});epgd.utils.addAutoComplete(b.tSFCat,{source:epgd.categories,multiselect:true});epgd.utils.addAutoComplete(b.tSFGenre,{source:epgd.genres,multiselect:true})};epgd.searchTimerDialog.prototype.render=function(b){b=b||{searchfields:1};epgd.searchTimerDialog.base.render.call(this,b);var c=this.form,e,a;c.tExpr.value=b.expression||"";$(c.tSMode).val(b.searchmode||4);c.tCaseSens.checked=b.casesensitiv==1;e=b.searchfields||0;for(a=0,f=1;a0;$(c.tRepeat).change();c.tSFEpisode.value=b.episodename||"";c.tSFSeason.value=b.season||"";c.tSFSPart.value=b.seasonpart||"";c.tSFYear.value=b.year||"";epgd.utils.setAutoCompleteValues(c.tSFCat,new String(b.category).replace(/'/g,"").split(","));epgd.utils.setAutoCompleteValues(c.tSFGenre,new String(b.genre).replace(/'/g,"").split(","));e=b.tipp||"";for(a=0;a=0}c.tSFNoEpgMatch.checked=b.noepgmatch==1;c.tAdv.checked=b.episodename||b.season||b.seasonpart||b.year||b.category||b.genre||b.tipp||b.noepgmatch;$(c.tAdv).change();epgd.utils.setAutoCompleteValues(c.tChannels,new String(b.channelids).split(","));if(b.chexclude){c.tChExclude1.checked=1}else{c.tChExclude0.checked=1}c.tChFormat.value=b.chformat||(b.id?"":epgd.profile.chFormat);c.tNameMode.defaultIndex=parseInt(b.category=="Serie"?epgd.profile.namingModeSearchSerie:epgd.profile.namingModeSearchMovie,10);c.tNameMode.selectedIndex=typeof b.namingmode=="undefined"?c.tNameMode.defaultIndex:b.namingmode;c.tTemplate.value=typeof b.template=="undefined"?(b.category=="Serie"?epgd.profile.namingModeSearchSerieTemplate:epgd.profile.namingModeSearchMovieTemplate):b.template;$(c.tNameMode).change();this.$win.parent().find("#tBCopy").toggle(!!b.id)};epgd.searchTimerDialog.prototype.getData=function(g){var b=this.form,e,a,c={expression:b.tExpr.value};if(b.tSFSeason.value){c.season=b.tSFSeason.value}if(b.tSFSPart.value){c.seasonpart=b.tSFSPart.value}if(b.tSFYear.value){c.year=b.tSFYear.value}if(!g){if(!c.expression){return this.showError(epgd.tr.error.emptyField.replace("$field$",epgd.tr.pages.search.searchExpression),b.tExpr)}if(c.season&&!/^[0-9]{0,3}-?[0-9]{0,3}$/.test(c.season)){return this.showError(epgd.tr.error.invalid,b.tSFSeason)}if(c.seasonpart&&!/^[0-9]{0,3}-?[0-9]{0,3}$/.test(c.seasonpart)){return this.showError(epgd.tr.error.invalid,b.tSFSPart)}if(c.year&&!/^((19|20)[0-9]{2})?(-|-(19|20)[0-9]{2})?$/.test(c.year)){return this.showError(epgd.tr.error.invalid,b.tSFYear)}}if(b.tID.value){c.id=parseInt(b.tID.value,10)}if(b.tSFEpisode.value){c.episodename=b.tSFEpisode.value}c.category=epgd.utils.getAutoCompleteValues(b.tSFCat,"'");c.genre=epgd.utils.getAutoCompleteValues(b.tSFGenre,"'");e="";for(a=0;a50){epgd.utils.confirm(epgd.tr.pages.timerList.confirmSaveBigResult.replace("$cnt$",d.count),function(k){k&&epgd.searchTimerDialog.base.save.call(a,h)})}else{epgd.searchTimerDialog.base.save.call(a,h,e,c,g)}epgd.utils.loader.close()})},true)};epgd.searchDialog=epgd.utils.inherits(function(){epgd.searchTimerDialog.call(this,{id:"search",embed:true,buttons:null});this.searchResultList=new epgd.searchResultList({empty:epgd.tr.pages.search.empty},this)},epgd.searchTimerDialog);epgd.searchDialog.prototype.create=function(){epgd.searchDialog.base.create.call(this);var c=this.form,b=this,a=$('
    ').appendTo(this.$win);$('").insertAfter(c.tExpr).after('  ");$(c.tType).parent().hide().parent().css("border-top","1px solid #ccc").insertAfter($(c.tVdr.parentNode.parentNode).hide());$('').insertAfter(c.tSName).click(function(){b.form.tID.value="";b.form.tSName.value+=" copy";b.form.tSName.select()}).prop("disabled",true);$('').insertAfter(c.tSName).click(function(){b.list.del(this.form.tID.value,function(){b.form.tID.value="";b.loadSavedSearch()})}).prop("disabled",true);$('').insertAfter(c.tSName).click(function(){var e=b.getData();if(!e.name){return this.showError(epgd.tr.error.invalid,c.tSName)}b.save(e,null,null,function(){b.loadSavedSearch()})});$(c).submit(function(){b.search(a);return false});this.$win.find("#sExpr").keyup(function(d){if(d.keyCode==13){this.form.sSearch.click();$(this).blur()}}).focus();this.$win.find("#sAdv").change(function(){$(c).toggleClass("noAdv",!this.checked);b.resize()}).prop("checked",epgd.profile.searchAdv=="1").change();$(c.tSName).autocomplete({minLength:0,maxHeight:300,source:function(){return false},select:function(e,g){var h=g.item.data||{id:""};if(h.id){b.render(h);b.form.sSearch.click();$([c.tDel,c.tCopy,c.tInactive]).prop("disabled",false);return false}else{c.tID.value="";$([c.tDel,c.tCopy,c.tInactive]).prop("disabled",true)}}}).focus(function(){$(this).autocomplete("search","")});this.loadSavedSearch()};epgd.searchDialog.prototype.loadSavedSearch=function(){var a=this.form;epgd.ajax({url:epgd.login.url+"data/searchtimers?type=S"},function(c){var b=[];$.each(c.searchtimers,function(e,d){b.push({value:d.name||d.expression,label:d.name||d.expression,data:d})});$(a.tSName).autocomplete("option","source",b)})};epgd.searchDialog.prototype.resize=function(){var a=this.$win.find("#searchResult"),b=$(window).height()-a.offset().top-20;if(b<100){a.css({height:"auto","overflow-y":"visible"})}else{a.css({height:b+"px","overflow-y":"auto"})}};epgd.searchDialog.prototype.render=function(a){if(!epgd.$con.find("#search").length){$("#menu_search").addClass("menu-active");this.create();epgd.$con.html("");this.$win.appendTo(epgd.$con)}a=a||{searchfields:1};a.type="S";epgd.searchDialog.base.render.call(this,a)};epgd.searchDialog.prototype.close=function(){};epgd.channels={list:null,autoCompleteData:null,isDirty:false,selBox:$('')[0],load:function(){if(!this.list||this.isDirty){epgd.ajax({url:epgd.login.url+"data/channels",async:false,cache:false},function(d){var b=(epgd.profile.channelLogoPath?epgd.profile.channelLogoPath+"?maxW=70&maxH=50&id=":false),e="",c={},a=[];d.channels&&$.each(d.channels,function(g,h){var k=h.channelid||g;if(h.name){h.html='
    '+(b?''+h.name+''+(epgd.profile.logoShowName=="1"?h.name:""):h.name)+"
    ";h.visible&1&&(e+='")}else{h.html='
    '+k+"
    ";h.visible&1&&(e+='")}c[k]=h;a.push({label:h.name,value:k})});epgd.channels.list=c;epgd.channels.autoCompleteData=a;$(epgd.channels.selBox).html(e);$(window).trigger("channels_load");this.dirty=false})}},getHtml:function(b){var a=this.list[b];return a?a.html:'
    '+b+"
    "},getName:function(b){var a=this.list[b];return a?a.name:b}};epgd.eventDetail=function(a){this.id=a;this.data=null;this.expire=0};epgd.eventDetail.prototype.imgPath=false;epgd.eventDetail.prototype.load=function(b,c){var a=this;epgd.ajax({url:epgd.login.url+"data/event?"+(b&&c?"channelid="+b+"&time="+c:"id="+this.id),async:false,cache:false},function(d){a.data=d.event;a.id=d.id;a.expire=epgd.utils.now().getTime()+900000});return this};epgd.eventDetail.prototype.render=function(){if(this.expire'+epgd.tr.pages.eventDetail.repeat+"").appendTo(d.$con);b={searchfields:1,expression:this.data.title,searchmode:1,casesensitiv:1,fromEventDetail:true};if(this.data.shorttext){b.searchfields1=2;b.expression1=this.data.shorttext}epgd.pages.search.search.call(this,$('
    ').appendTo(d.$con),b)}else{a.click()}};epgd.eventDetail.prototype.doPlay=function(b){var a=parseInt(epgd.utils.now().getTime()/1000,10)-this.data.starttime;if(a>this.data.duration){return false}if(b){return !!epgd.vdrs.current.uuid}if(a<0){epgd.pages.timerList.save({type:"V",active:1,vdruuid:epgd.vdrs.current.uuid,eventid:this.data.id,channelid:this.data.channelid,title:this.data.title})}else{epgd.vdrs.current.switchChannel(this.data.channelid)}};epgd.eventDetail.prototype.doPrev=function(c){var b=this.data.starttime-500,a=this;if(bepgd.profile.maxEventTime){return false}if(c){return true}epgd.utils.loader.process(function(){new epgd.eventDetail().load(a.data.channelid,b).render()})};epgd.eventDetail.win=function(){this._create();this.closed=true;this.detail=null;var a=this;$(window).bind("epgd_close.eventDetail",function(){if(!a.closed){a.$win.css("z-Index","");a.$win.hide();$(document).unbind("keyup.eventDetail");a.closed=true;a.$openDialogs&&a.$openDialogs.removeClass("ui-state-disabled")}});$(window).bind("resize.eventDetail",function(b){if(!a.closed){try{a.$win.css("max-width",$(window).width());a.$win.show().position({of:window});a.$con.accordion("refresh")}catch(c){}if(parseInt(a.$win.css("top"),10)<69){a.$win.css("top","69px")}}})};epgd.eventDetail.win.prototype._create=function(){this.imgPath=epgd.profile.eventImgPath?epgd.profile.eventImgPath+"?no=0&maxW=270&maxH=146&id=":false;this.movieImgPath=epgd.profile.movieMediaPath?epgd.profile.movieMediaPath+"?actor_id=0&movie_id=":false;this.movieActorImgPath=epgd.profile.movieMediaPath?epgd.profile.movieMediaPath+"?maxW=60&maxH=90&media_type=4&actor_id=":false;this.serieImgPath=epgd.profile.serieImgPath?epgd.profile.serieImgPath+"?actor_id=0&series_id=":false;this.serieActorImgPath=epgd.profile.serieImgPath?epgd.profile.serieImgPath+"?maxW=60&maxH=90&season_number=0&episode_id=0&media_type=11&actor_id=":false;this.$win=$('
    ').appendTo(document.body);this.$con=this.$win.find(":first :last");var c=this,b=epgd.tr.pages.eventDetail,a=this.$win.find(".toolbar")[0];this.$rec=$('
    '}}u="";for(q in b.extInfo){if(t[q]){u+=""+b.extInfo[q]+""+t[q]+""}}if(t.scraper&&(a=t.scraper.movie||t.scraper.serie)){a.media=a.media||[];if(a.actors){w="";for(q in a.actors){c=a.actors[q];w+="
    "+(this.movieActorImgPath&&c.actorid?'':"")+''+c.actorname+""+(c.actorrole||"")+"
    "}}if(t.scraper.movie){a.isMovie=true;if(a.media&&this.movieImgPath){if(!p&&a.media["1"]){p=this.movieImgPath+a.movieid+"&media_type=1&maxW=270&maxH=146"}if(a.media["3"]){o=this.movieImgPath+a.movieid+"&media_type=3&maxW=400&maxH=999"}else{if(a.media["1"]){o=this.movieImgPath+a.movieid+"&media_type=1&maxW=400&maxH=999"}}}if(a.actors){w="";for(q in a.actors){c=a.actors[q];w+="
    "+(this.movieActorImgPath?'':"")+''+c.actorname+""+(c.actorrole||"")+"
    "}}if(a.overview){s='
    '+a.overview+"

    "+s}u="

    "+b.scrapperMovieInfo+'

    '+(a.media["1"]&&this.movieImgPath?'':"")+(a.title?"":"")+(a.originaltitle?"":"")+(a.runtime?"":"")+(a.movie_release_date?"":"")+(a.genres?"":"")+(a.voteaverage?"":"")+(a.popularity?"":"")+u+(a.budget?"":"")+(a.revenue?"":"")+(a.homepage?"":"")+"
    "+b.title+""+a.title+"
    "+b.original_title+""+a.originaltitle+"
    "+b.runtime+""+a.runtime+" "+epgd.tr.minutes+"
    "+b.release_date+""+a.movie_release_date+"
    "+b.genre+""+a.genres.replace(/^\||\|$/g,"").replace(/ ?\| ?/g,", ")+"
    "+b.vote_average+'
    ('+a.voteaverage.toFixed(1)+" / 10)
    "+b.popularity+""+a.popularity.toFixed(1)+"
    Budget$"+a.budget+"
    Einnahmen$"+a.revenue+"
    "+b.homepage+''+a.homepage+"
    "+(a.media["0"]&&this.movieImgPath?'':"")}else{a.isSerie=true;if(a.actors){w="";for(q in a.actors){c=a.actors[q];w+="
    "+(this.serieActorImgPath?'':"")+""+c.actorname+""+(c.actorrole?c.actorrole.replace(/\|/g,"
    "):"")+"
    "}}l=a.episode;if(l){if(l.episodeoverview){if(t.longdescription&&l.episodeoverview.length>t.longdescription.length){s=s.replace(/^/i,"")}s='
    '+l.episodeoverview+"
    "+s}s="
    "+l.episodename+"
    "+s;if(l.episodegueststars){w+='
    '+b.gueststars+"

    "+l.episodegueststars.replace(/^\||\|$/g,"").replace(/\|/g,"
    ")}}if(!p&&a.media["10"]&&this.serieImgPath){p=this.serieImgPath+a.seriesid+"&season_number="+l.seasonnumber+"&episode_id="+l.episodeid+"&media_type=10&maxW=270&maxH=146"}if(a.media["7"]){o=this.serieImgPath+a.seriesid+"&season_number=0&episode_id=0&media_type=7&maxW=400&maxh=999"}if(a.seriesoverview){s+=s?'
    Serienbeschreibung
    '+a.seriesoverview+"
    ":"
    "+a.seriesoverview+"
    "}u="

    "+b.scrapperSerieInfo+'

    '+(a.media["1"]&&this.serieImgPath?'':"")+(a.media["10"]&&this.serieImgPath?'':"")+(a.seriesname?"":"")+(a.seriesnetwork?"":"")+(a.seriesstatus?"":"")+(a.seriesfirstaired?"":"")+(a.seriesgenre?"":"")+(a.seriesrating?"":"")+u+(epgd.profile.serieSeasonPath?'":"")+"
    "+b.title+""+a.seriesname+"
    "+b.network+""+a.seriesnetwork+"
    "+b.seriesstatus+""+a.seriesstatus+"
    "+b.release_date+""+a.seriesfirstaired+"
    "+b.genre+""+a.seriesgenre.replace(/^\||\|$/g,"").replace(/ ?\| ?/g,", ")+"
    "+b.vote_average+'
    ('+a.seriesrating.toFixed(1)+" / 10)
    '+b.homepage+"
    "+(a.media["6"]&&this.serieImgPath?'':"")+(a.media["3"]&&this.serieImgPath?'':"")}}else{a={};u="

    "+b.extentedInfo+'

    "+(x.partname?"":"")+(t.year?"":"")+(x.lang?"":"")+u+"
    '+b.title+""+t.title+"
    "+b.part+""+x.partname+"
    "+b.release_date+""+t.year+"
    "+b.lang+""+x.lang+"
    "}if(!w&&t.actor){w=t.actor.replace(/, /g,"
    ")}w&&(u+='
    '+b.actors+"
    "+w+"
    ");u&&(u+="
    ");k=(t.path?epgd.tr.pages.timerList.folder+"
    "+t.path.replace(/\//g," / ")+"
    ":"")+(t.genre?(b.genre+""+t.genre+"
    "):"")+(t.category?b.category+""+t.category+"
    ":"")+(t.country?b.country+""+t.country+"
    ":"")+(t.year?b.year+""+t.year+"
    ":"");h=(x.part?b.part+""+x.part+(x.parts?" / "+x.parts+"":"")+"
    ":"")+(x.season?b.season+""+x.season+"
    ":"")+(x.number?b.number+""+x.number+"
    ":"")+(x.extracol1?x.extracol1+"
    ":"")+(x.extracol2?x.extracol2+"
    ":"")+(x.extracol3?x.extracol3+"
    ":"");if(t.recordings){for(q in t.recordings){l=t.recordings[q];r+='
    '+epgd.utils.formatDateTime(l.starttime)+""+parseInt(l.duration/60,10)+" "+epgd.tr.minutes+'
    '+l.title+(l.shorttext?'
    '+l.shorttext+"
    ":"")+"
    "}}this.$con=$('

    '+$.datepicker.formatDate(n?"d. M y":"d. MM yy",epgd.utils.date(t.starttime))+"
    "+(n?"":t.title)+'
    '+epgd.utils.formatTime(t.starttime)+" – "+epgd.utils.formatTime(t.starttime+t.duration)+" "+epgd.tr.oClock+" | "+parseInt(t.duration/60,10)+" "+epgd.tr.minutes+'

    '+(p?'':"")+'
    '+epgd.channels.getHtml(t.channelid)+(g>0&&g<=100?'
    ':"")+'
    '+(t.flags&&t.flags.indexOf("16:9")>0?'':"")+(t.audio&&t.audio.indexOf("DolbyDigital")>=0?'':"")+(t.flags&&t.flags.indexOf("Live")>0?"Live":"")+(t.parentalrating?'
    '+b.parentalrating+t.parentalrating+"
    ":"")+"
    "+(t.merge?"
    "+b.mergeSrc+t.merge+"
    ":"")+"
    "+(d?'
    '+d+"
    ":"")+'
    '+t.title+(x.partname?"
    "+x.partname+"":(t.shorttext?"
    "+t.shorttext+"":""))+'
    '+(t.tipp?''+t.tipp+"":"")+(t.txtrating?""+t.txtrating+"":"")+(t.shortreview||"")+"
    "+(k?'
    '+k+"
    ":"")+(h?'
    '+h+"
    ":"")+(o?'':"")+'
    '+(s?s.replace(/\n/g,"
    "):"")+"
    "+u+(t.category=="Serie"||a.isSerie||x.episodename?'

    '+b.constabelInfo+'

    '+epgd.tr.edit+''+epgd.tr.pages.eventDetail.addConstableLink+""+epgd.pages.help.getButton("constabel",true)+(epgd.profile.constabelLoginPath?'":"")+'
    ':"")+(r?"

    "+epgd.tr.menu.records+'

    '+r+"
    ":"")+"
    ").replaceAll(this.$con);this.$con.accordion({heightStyle:"fill",header:"h3",active:0,beforeActivate:function(e,i){if(i.newHeader.attr("data-conti")){epgd.utils.loader.process(function(){epgd.ajax({url:epgd.login.url+"data/proxy?id=constabel&title="+encodeURIComponent(encodeURIComponent(i.newHeader.attr("data-conti")))+"&_"+new Date().getTime(),dataType:"html",contentType:"text/plain; charset=utf-8"},function(E){if(E.indexOf("Error:")==-1){var F=i.newPanel.find("#cRaw"),D=""+b.season+""+b.part+""+b.number+""+b.title+"",B="",A=E.split(/\r?\n/),z,y,C;for(C=0;C"}}else{y=z.split(/\t/);if(y.length>3){B+=""+y.join("")+""}}}F.html(E).hide().before('Raw');F.before(""+D+""+B+"
    ")}else{i.newPanel.find("#cRaw").html(epgd.tr.error.noData)}epgd.utils.loader.close()});i.newHeader.removeAttr("data-conti")},true)}}});this.$rec.toggleClass("hasTimer",!!t.timerid).prop("title",this.detail.doRecord(true));this.$play.toggle(this.detail.doPlay(true));this.$prev.toggle(this.detail.doPrev(true));this.$next.toggle(this.detail.doNext(true));this.$con.find(".channel .i-tv").click(function(){epgd.vdrs.current.switchChannel(this.parentNode.id)});this.closed=false;q=Math.max.apply(null,this.$win.siblings(".ui-front:visible").map(function(){return +$(this).css("z-index")}).get());if(q>=+this.$win.css("z-index")){this.$win.css("z-index",q+1)}$(window).trigger("resize.eventDetail");this.$openDialogs=$(".ui-dialog:visible:not(.ui-state-disabled)").addClass("ui-state-disabled");$(document).bind("keyup.eventDetail",function(i){if(i.keyCode==27){$(window).trigger("epgd_close.eventDetail")}});epgd.pages.help.initButtons(this.$con)};epgd.recordDetail=epgd.utils.inherits(function(a){this.elem=a;return epgd.eventDetail.call(this)},epgd.eventDetail);epgd.recordDetail.prototype.load=function(){var a=this;epgd.ajax({url:epgd.login.url+"data/recording?starttime="+this.elem.getAttribute("data-start")+"&md5path="+this.elem.getAttribute("data-md5")+"&owner="+this.elem.getAttribute("data-owner"),async:false},function(b){a.data=b.recording});return this};epgd.recordDetail.prototype.doRecord=function(a){if(a===true){return epgd.tr.pages.records.similarTimer}epgd.eventDetail.prototype.doRecord.call(this,a)};epgd.recordDetail.prototype.doPlay=function(a){if(a){return true}epgd.ajax({url:epgd.login.url+"data/replayrecording?vdruuid="+(!epgd.vdrs.list[this.data.vdruuid].usecommonrecfolder?this.data.vdruuid:epgd.vdrs.current.uuid)+"&starttime="+this.data.starttime+"&md5path="+this.data.md5path+"&owner="+(this.data.owner||""),cache:false},function(b){epgd.utils.popup(b.result.message,{title:"VDR",autoClose:5000})})};epgd.recordDetail.prototype.doPrev=function(b){var a=$(this.elem).prev(".rec");if(!a.length){return false}if(b){return true}a.find("B").click()};epgd.recordDetail.prototype.doNext=function(b){var a=$(this.elem).next(".rec");if(!a.length){return false}if(b){return true}a.find("B").click()};epgd.doneTimerDetail=epgd.utils.inherits(function(a){this.tr=a;return epgd.eventDetail.call(this)},epgd.eventDetail);epgd.doneTimerDetail.prototype.load=function(){var a=this;epgd.ajax({url:epgd.login.url+"data/donetimer?id="+this.tr.tData.id,async:false,cache:false},function(c){var b=c.donetimer;if(b.state){b.cntlongdescription=epgd.pages.timerListDone.stateIcons[b.state]}b.episode={lang:b.episodelang,season:b.episodeseason,part:b.episodepart};a.id=c.id;a.expire=epgd.utils.now().getTime()+900000;delete b.timerid;delete b.id;a.data=b});return this};epgd.doneTimerDetail.prototype.doRecord=function(a){if(a===true){return epgd.tr.pages.records.similarTimer}epgd.eventDetail.prototype.doRecord.call(this,a)};epgd.doneTimerDetail.prototype.doPlay=function(a){return false};epgd.doneTimerDetail.prototype.doPrev=function(b){var a=$(this.tr).prev("tr");if(!a.length){return false}if(b){return true}a.find("td").click()};epgd.doneTimerDetail.prototype.doNext=function(b){var a=$(this.tr).next("tr");if(!a.length){return false}if(b){return true}a.find("td").click()};$(document).ready(function(){epgd.eventDetail.prototype.win=new epgd.eventDetail.win()});epgd.pages.editChannels={render:function(){if(!(epgd.login.rights&epgd.rights.umConfigEdit)==epgd.rights.umConfigEdit){return epgd.utils.popup(epgd.tr.error.forbidden,{title:epgd.tr.error.error})}var i=epgd.tr.pages.editChannels,m=epgd.$con,e,l="",h="",k,c,d,g,b,a;for(d in epgd.channels.list){a=epgd.channels.list[d];k=[];for(g in a.sources){c=a.sources[g];k[c.merge]="
  • "+g+'
  • '}l+='
  • '+d+'
  • '}for(b in epgd.vdrs.list){h+='
  • '+epgd.vdrs.list[b].name+"
  • "}e=m.html('
    '+epgd.tr.pages.editChannels.headline+'
    Web
    channel-idchannel-name
    ').find("button");e.click(function(){var n=this.$menu.show();$(document).bind("click.ui_menu",function(o){if(!$(o.target).closest(".ui-menu").length){n.hide();$(this).unbind("click.ui_menu")}});return false})[0].$menu=$('").hide().insertAfter(e).menu({select:function(p,q){var s=q.item,n,r,o="";if(!s.attr("data-id")){s=s.parents("li[data-id]:first")}switch(s.attr("data-id")){case"getChannelNames":o='[value=""]';case"getAllChannelNames":epgd.utils.loader.process(function(){var t=[];$("#pageEditChannelsSource li").each(function(){t[this.lastChild.innerHTML]=this.firstChild.innerHTML});$("#pageEditChannels > li > input"+o).each(function(){this.value=t[this.previousSibling.innerHTML]||this.value})});break;case"getOrder":epgd.utils.loader.process(function(){var u=$("#pageEditChannels"),t;$($("#pageEditChannelsSource span").get().reverse()).each(function(){t=u.find("> li > span:contains("+this.innerHTML+")");if(t.length){t.parent().prependTo(u)}})});break;case"insertList":$('

    '+i.desc_insertList+' channelpedia.yavdr.com

    ').dialog({modal:true,width:500,height:400}).find("textarea").change(function(){epgd.pages.editChannels.insertReferenceList(this.value);$(this).parent().dialog("destroy")});break;case"loadList":if(q.item.attr("data-url")){epgd.ajax({url:epgd.login.url+"data/proxy?id="+q.item.attr("data-url"),dataType:"html",contentType:"text/plain; charset=utf-8"},epgd.pages.editChannels.insertReferenceList);break}case"channelpedia":n=$('
    ");this.$trash=this.$bar.find(".i-trash");this.curSearch={pattern:"",searchValue:"",hits:$(),cur:0,$count:this.$bar.find("#rSCnt"),fromStart:this.$bar.find("#rSVal").prev("button")[0],toEnd:this.$bar.find("#rSVal").next("button")[0]}}this.$bar.insertAfter(epgd.$menu);this.$trash.droppable({accept:".rec",hoverClass:"ui-state-hover",tolerance:"pointer",drop:function(c,d){var b=d.helper.context;epgd.utils.confirm(epgd.tr.pages.records.deleteMessage.replace("$src$",b.getAttribute("data-path")),function(e){e&&epgd.pages.records.del(b)});return false}}).click(function(){var b=$("#records").find(".rec.selected");b.length&&epgd.utils.confirm(epgd.tr.confirmDelete+(b.length>1?"
    "+b.length+epgd.tr.entries:""),function(c){c&&b.each(function(){epgd.pages.records.del(this)})})});epgd.pages.help.initButtons(this.$bar);epgd.$menu.checkMenuSize();$(window).bind("epgd_close.records",function(){epgd.pages.records.$bar.remove();epgd.$menu.checkMenuSize();$(window).unbind(".records")});epgd.$con.html('
    ');epgd.utils.loader.process(function(){epgd.ajax({url:epgd.login.url+"data/recordings",cache:false},function(x){var b=x.recordings,g,y,o,l,n,r,m={f:{},r:[]},d={},s,k,h="",q=" "+epgd.tr.minutes,u,e=epgd.profile.recordSubFolderSort==6?function(p,i){return p.starttime>i.starttime?-1:1}:epgd.profile.recordSubFolderSort==5?function(p,i){return p.starttime>i.starttime?1:-1}:epgd.profile.recordSubFolderSort==4?function(p,i){return p.path>i.path?-1:1}:epgd.profile.recordSubFolderSort==3?function(p,i){return p.path>i.path?1:-1}:epgd.profile.recordSubFolderSort==2?function(p,i){return p.tit>i.tit?-1:1}:function(p,i){return p.tit>i.tit?1:-1};for(s in epgd.vdrs.list){k=epgd.vdrs.list[s];if(!k.usecommonrecfolder){d[s]={f:{},r:[]}}h+="
    VDR - "+k.name+": "+k.videodir+" - "+parseInt(k.videofree/1000,10)+" GB "+a.available+" / "+parseInt(k.videototal/1000,10)+" GB
    "}if(!$("#dragdrop").parent().length){return false}epgd.$con.find("#records").before(h);h="";for(r in b){g=b[r];l=d[g.vdruuid]||m;o=g.path.split("/");o.pop();for(n=0;n0}function c(i){Object.keys(i.f).sort().forEach(function(v){var t=i.f[v],p;h+=v?'

    ('+(t.cnt)+')'+v+"

    ":"
    ";t.f&&c(t);if(t.r.length){for(p in t.r){g=t.r[p];g.tit=((g.name!=v?g.name:"")+(v!=g.title&&(g.title!=g.name)?"
    "+g.title:"")+(g.shorttext&&(g.shorttext!=g.name)?""+g.shorttext+"":""))||v;g.html='
    '+epgd.utils.formatDateTime(g.starttime)+""+parseInt(g.duration/60,10)+q+""+g.tit+"
    "}t.r.sort(e);for(p in t.r){h+=t.r[p].html}}h+="
    "})}n={};if(w(m)){n[a.commonRecFolder]=m}for(s in d){l=d[s];if(w(l)){n["VDR - "+epgd.vdrs.list[s].name]=l}}c({f:n});u=epgd.$con.find("#records").html(h);if(!u.length){return false}u=u.click(epgd.pages.records.action).find(">div");if(u.length==1){u.first().toggleClass("open")}epgd.pages.records.$menu=$('
    •   '+epgd.tr.pages.eventDetail.title+'
    •   '+epgd.tr.pages.timerList.folder+'
    •   '+epgd.tr.pages.timerList.recordTime+"
    ").hide().appendTo(epgd.$con);$("#dragdrop").change();epgd.pages.records.curSearch.$recs=null;epgd.utils.loader.close()})},true)},search:function(e){var c=this.curSearch,h,b,d,a=c.fromStart.checked,g=c.toEnd.checked;if(!c.$recs){c.$recs=epgd.$con.find("#records .rec,h4")}if(typeof e=="string"){c.searchValue=e.replace(//g,">")}d=(a?">"+c.searchValue:c.searchValue).toLowerCase()+(g?"<":"");if(d==c.pattern){return}h=c.searchValue.length;b=c.$recs;if(c.hits.length){$(c.hits).each(function(){this.innerHTML=this.innerHTML.replace(/([^<]+)<\/mark>/gi,"$1")}).parents(".tmp-open").removeClass("tmp-open");if(d.indexOf(c.pattern)==0){b=$(c.hits)}else{c.cur=0}c.hits=[]}else{c.cur=0}c.pattern=d;if(h>2){b.each(function(){var i=this.innerHTML.toLowerCase().indexOf(d);if(i>0){c.hits.push(this);$(this).parents(".folder").addClass("tmp-open");do{if(a){i++}this.innerHTML=this.innerHTML.slice(0,i)+""+c.searchValue+""+this.innerHTML.slice(i+h)}while((i=this.innerHTML.toLowerCase().indexOf(d,i+13))>0)}});c.$count.text(c.hits.length).parent().show();this.searchMove(0)}else{c.$count.parent().hide()}},searchMove:function(a){this.curSearch.cur+=a;var b=this.curSearch.hits[this.curSearch.cur];if(!b){this.curSearch.cur=a<0?this.curSearch.hits.length-1:0;b=this.curSearch.hits[this.curSearch.cur]}if(b){b.scrollIntoView(false);$(b).css({"background-color":"green"});window.setTimeout(function(){$(b).css({"background-color":""})},1500)}},action:function(b){var a=b.target;if(a.nodeName=="MARK"){a=a.parentNode}if(a.nodeName=="M"){epgd.pages.records.$menu.show().position({my:"left top",at:"left bottom",of:a}).find("a").removeClass("ui-state-highlight");epgd.pages.records.$menu.find("a[data-sort="+(a.curSort||epgd.profile.recordSubFolderSort)+"]").addClass("ui-state-highlight");$(document).one("click.recmenu",function(d){if(d.target.nodeName=="A"){var c=d.target.parentNode.getAttribute("data-type");if(c){a.curSort=d.target.getAttribute("data-sort");epgd.pages.records.sort(a.parentNode.parentNode,a.curSort)}}epgd.pages.records.$menu.hide();$(document).unbind(".recmenu")}).bind("keyup.recmenu",function(c){if(c.keyCode==27){$(document).trigger("click.recmenu")}});return false}if(a.nodeName=="I"||a.nodeName=="SPAN"){a=a.parentNode}if(a.nodeName=="B"){a=a.parentNode;if(!a.recDetail){a.recDetail=new epgd.recordDetail(a)}epgd.utils.loader.process(function(){a.recDetail.render()})}else{if(a.nodeName=="H4"){a=a.parentNode;if(a.nodeName=="DIV"&&a.className.indexOf("folder")>=0){if(a.className.indexOf("open")==-1){if($(window).width()<500){$(a).siblings(".open").removeClass("open");document.body.scrollTop=$(a).offset().top-35}$(a).addClass("open")}else{$(a).removeClass("open")}}}else{$(a).closest(".rec").toggleClass("selected")}}},dd:function(b){var c=$("#records"),a=c.find(".rec").has(".ui-draggable");if(b&&a.length==0){c.find("h4").droppable(this.__dropSettings);a.end().draggable({cancle:"b",revert:"invalid",distance:15,helper:function(){return $(this).clone().css("display","block")},appendTo:"body",cursor:"pointer",cursorAt:{left:-15,top:5},start:function(d,e){$(document).trigger("click.recmenu");$(document.body).addClass("dd-open");document.body.style.paddingTop=epgd.pages.records.$bar.height()+"px";document.body.scrollTop-=d.pageY-$(d.delegateTarget).closest(".folder").offset().top},stop:function(d,e){$(document.body).removeClass("dd-open");epgd.$menu.checkMenuSize()}})}else{if(a.length){a.draggable(b?"enable":"disable")}}},__dropSettings:{accept:".rec",hoverClass:"ui-state-hover",tolerance:"pointer",drop:function(b,c){console.log("Dropped!",b,c);var a=$(b.target),d="";do{d=a.text().replace(/^\(.*\)/,"")+"/"+d;a=a.parent()}while((a=a.prevAll("h4")).length);epgd.pages.records.move(c.draggable.context,d.slice(d.indexOf("/",2)+1).replace(/ /g,"_"),b.target.parentNode);return false}},update:function(){epgd.ajax({url:epgd.login.url+"data/updaterecordings"},function(a){epgd.utils.topInfo(epgd.tr.pages.records.refreshMessage.replace("$sec$",5),{autoClose:5000});$(window).trigger("epgd_close.records");window.setTimeout(function(){epgd.pages.records.render()},5000)})},move:function(e,h,d){var g=e.getAttribute("data-path").split("/"),b=g.pop(),c,a=0;g=g.join("/")+"/";for(c=0;ch4>span").each(function(){this.innerHTML="("+(parseInt(this.innerHTML.slice(1,-1),10)-1)+")"});p=o.find("span");p.text("("+(parseInt(p.text().slice(1,-1),10)+1)+")");for(l=0;l.folder>h4").each(function(){if(this.lastChild.nodeValue==m[l]){o=$(this.parentNode);p=o.find("span");p.text("("+(parseInt(p.text().slice(1,-1),10)+1)+")");return true}else{return false}}).length==0){for(;l(1)'+m[l]+"
    ").droppable(epgd.pages.records.__dropSettings).wrap('
    ').parent().appendTo(o)}}}k.appendTo(o);epgd.pages.records.sort(d);epgd.utils.topInfo(epgd.tr.dataSaved);epgd.pages.records.__updateRec(e)}else{epgd.utils.topInfo(n.message,{isError:1});return false}})}return !!g},__updateRec:function(b,a){epgd.ajax({url:epgd.login.url+"data/recording?starttime="+b.getAttribute("data-start")+"&path="+b.getAttribute("data-path")+"&owner="+b.getAttribute("data-owner")+"&"+a,async:true},function(c){$(b).attr("data-md5",c.recording.md5path).draggable("enable").removeClass("ui-state-disabled")},function(d,c){if(!a){a=0}else{if(a>=5){return epgd.utils.popup(epgd.tr.pages.records.notFoundMessage,{title:epgd.tr.error.error})}}window.setTimeout(epgd.pages.records.__updateRec,3000,b,++a);return true})},del:function(a){epgd.ajax({url:epgd.login.url+"data/deleterecording?starttime="+a.getAttribute("data-start")+"&md5path="+a.getAttribute("data-md5")+"&owner="+a.getAttribute("data-owner"),async:true},function(b){b=b.result;if(b&&b.state==200){epgd.utils.topInfo(a.getAttribute("data-path")+"
    "+epgd.tr.dataSaved);$(a).parents(".folder:not(:last)").find(">h4>span").each(function(){this.innerHTML="("+(parseInt(this.innerHTML.slice(1,-1),10)-1)+")"});$(a).remove()}else{epgd.utils.topInfo(a.getAttribute("data-path")+"
    "+b.message,{isError:1})}})},sort:function(a,d){var e=$(a).find(">div.rec"),b=d%2?1:-1,c;if(!d){d=$(">h4>m",a)[0].curSort||epgd.profile.recordSubFolderSort}if(d<3){e.sort(function(h,g){return h.lastChild.innerHTML>g.lastChild.innerHTML?b:-b}).appendTo(a)}else{c=d<5?"data-path":"data-start";e.sort(function(h,g){return h.getAttribute(c)>g.getAttribute(c)?b:-b}).appendTo(a)}$(a).find(">div.folder").each(function(){epgd.pages.records.sort(this,d)})}};epgd.sortTable=function(a){this.o=$.extend({conSel:epgd.$con,empty:"",right:1},a)};epgd.sortTable.prototype={sortIcons:'',update:function(){},hideHead:function(){var a=this.$con.find("thead:first").hide().find(">tr>th");this.$con.find("tbody:first").html(''+this.o.empty+(a.last().find(".i-doc-new").wrapAll("
    ").parent().html()||"")+"")},showHead:function(){this.$con.find(">table>thead").show();this.filter();this.sort()},getTable:function(){},action:function(a,c,b){switch(c){case"refresh":this.update();break;case"detail":if(!a[0].eventDetail){a[0].eventDetail=new epgd.eventDetail(b)}epgd.utils.loader.process(function(){a[0].eventDetail.render()});break}},render:function(a,b){this.trs=[];this.$con=a||$(this.o.conSel);this.$con.empty();if(!(epgd.login.rights&this.o.right)==this.o.right){return epgd.utils.popup(epgd.tr.error.forbidden,{title:epgd.tr.error.error})}this.$con.html(this.getTable());this.init();this.update(b)},init:function(){var b=this,a=0;this.$con.find(">table").click(function(h){var e=$(h.target),g=e[0],i=g.getAttribute("data-evId"),k,c;if(i){b.action(e,"detail",i)}else{if(h.target.className=="i-tv"){epgd.vdrs.current.switchChannel(h.target.parentNode.id)}else{e=e.closest("span.sort");if(e.length){e.parent().parent().find(".ui-state-highlight").removeClass("ui-state-highlight");e.addClass("ui-state-highlight");b.sort(e)}else{e=$(g).closest("span.edit");if(e.length){b.action(e,e[0].className.match(/i-([a-z0-9-]+)/)[1])}if(b.o.selectable){if(g.nodeName=="TD"){e=$(g).parent().toggleClass("selected");if(h.shiftKey&&this.lastSel){c=$(this.lastSel);k=e.index()-c.index();if(k>0){c.nextAll(":lt("+k+"):visible").toggleClass("selected",c.hasClass("selected"))}else{c.prevAll(":lt("+-k+"):visible").toggleClass("selected",c.hasClass("selected"))}}else{this.lastSel=e[0]}}else{if(g.nodeName=="B"){k=g.getAttribute("data-t");$(b.trs).filter(":visible").toggleClass("selected",k==1?true:k==0?false:undefined);return false}}}}return false}}}).find(">thead>tr").find(">th").each(function(){this.cIndex=a;a+=this.colSpan}).end().find('[data-defaultSort="1"]>span.sort:last,[data-defaultSort="-1"]>span.sort:first').addClass("ui-state-highlight");this.$con.find(">table>thead input.filter").keyup(function(){b.filter()}).each(function(){if(!this.result){this.result=$('').insertAfter(this)[0]}})},sort:function(e){e=e||this.$con.find(">table>thead .ui-state-highlight");if(!e.length){return}var c=e.parent()[0],g=(e.hasClass("i-sort-name-down")?-1:1),a=this.trs,b,h;if(!c.sortInfo){c=c.cIndex;for(b=0;bk?1*g:l==k?0:-1*g)});this.$con.find(">table>tbody").append(a.slice())},filter:function(){var b={},a,d,e,c;this.$con.find(">table>thead input.filter").each(function(){if(this.value){b[this.parentNode.cIndex]=[this.value.toLowerCase(),0,this.result||{}]}else{if(this.result){this.result.innerHTML=""}}});for(a=0;a
      '+(b.length?"
    1. "+b.join("
    2. ")+"
    3. ":"")+'
      '+(a.length>1?"
    • "+a.slice(1).replace(/,/g,"
    • ")+"
    • ":"")+"
    ").dialog({modal:true,buttons:[{text:epgd.tr.apply,click:function(){var e="";$(this).find("ol > li").each(function(){e+=","+this.innerHTML});c.value=e.slice(1);$(this).dialog("close")}},{text:epgd.tr.cancel,click:function(){$(this).dialog("close")}}]}).find("ul,ol").sortable({connectWith:"ul,ol"}).disableSelection()};epgd.timerListBase=epgd.utils.inherits(function(a,b){this.dialog=b;if(this.dialog){this.dialog.list=this}if(!a.conSel){a.conSel="#content"}if(!a.empty){a.empty=epgd.tr.pages.timerList.empty}epgd.sortTable.call(this,a)},epgd.sortTable);epgd.timerListBase.prototype.getTable=function(){var a=epgd.tr.pages.timerList;return'
    '+epgd.tr.channel+this.sortIcons+''+a.startTime+this.sortIcons+' '+a.endTime+''+epgd.tr.pages.eventDetail.title+this.sortIcons+' VDR'+this.sortIcons+' '+this.sortIcons+(this.o.addNew?'':"")+(this.o.selectable?'
    ':"")+"
    "};epgd.timerListBase.prototype.update=function(){var a=this;epgd.utils.loader.process(function(){a.$con.find("tbody").empty();epgd.ajax({url:epgd.login.url+a.o.updateUrl,async:false,cache:false},function(h){if(!h.timers.length){a.hideHead()}else{var b=[],k=a.editIcons,i="DF",g={D:'
    '+epgd.tr.pages.timerList.timerStates.D+"
    ",E:'
    '+epgd.tr.pages.timerList.timerStates.E+"
    ",F:'
    '+epgd.tr.pages.timerList.timerStates.F+"
    ",R:'
    '+epgd.tr.pages.timerList.timerStates.R+"
    ",P:'
    '+epgd.tr.pages.timerList.timerStates.P+"
    ",U:'
    '+epgd.tr.pages.timerList.timerStates.U+"
    "},d={V:"i-tv",R:"i-record",S:"i-search"},e=epgd.tr.pages.timerList.timerActions,c='$title$';$.each(h.timers,function(o,l){l.action=l.action?l.action.toUpperCase():"A";l.state=l.state?l.state.toUpperCase():"U";var n=epgd.vdrs.list[l.vdruuid]||{name:"--"},m=$(""+epgd.channels.getHtml(l.channelid)+""+(l.action!="A"?'
    '+e[l.action]+"
    ":g[l.state])+(l.info||"")+''+(l.day?epgd.utils.formatDate(l.day):"-")+""+new String(100+parseInt(l.starttime/100,10)).slice(1)+":"+new String(100+parseInt(l.starttime%100,10)).slice(1)+""+new String(100+parseInt(l.endtime/100,10)).slice(1)+":"+new String(100+parseInt(l.endtime%100,10)).slice(1)+"'+(l.title||"")+"
    "+(l.shorttext||""):">")+""+n.name+"
    "+(l.directory?l.directory+"~":"")+(l.file||"")+""+(l.autotimerid?c.replace("$id$",l.autotimerid).replace("$title$",l.autotimername||l.expression||epgd.tr.pages.timer.searchTimerList):"")+(i.indexOf(l.state)==-1?k:"")+"")[0];m.tData=l;b.push(m)});a.trs=b;a.showHead()}epgd.utils.loader.close();$(window).trigger("timerlist_updated",a)})},true)};epgd.timerListBase.prototype.action=function(a,d,b){var c;switch(d){case"edit":case"doc-new":this.dialog.render(a.closest("tr")[0].tData);break;case"trash":this.del(this.getSelectedIds(a));break;case"flashlight":c=a.attr("data-id"),list=this;$(window).one("searchTimerList_updated",function(){list.$con.find("tbody>tr").each(function(){if(this.tData.id==c){epgd.pages.searchTimerList.dialog.render(this.tData);return false}})});epgd.$menu.menu("select",{target:"#menu_searchTimerList"});break;default:epgd.sortTable.prototype.action.call(this,a,d,b)}};epgd.timerListBase.prototype.editIcons='';epgd.timerListBase.prototype.getSelectedIds=function(a){var b=[];if(a[0].parentNode.nodeName=="TH"){$(this.trs).filter(".selected:visible").each(function(){b.push(this.tData.id)})}else{b.push(a.closest("tr")[0].tData.id)}return b};epgd.timerListBase.prototype.del=function(c,d,e){var b=this,a=$.isArray(c)?c:[parseInt(c,10)];c&&a.length&&epgd.utils.confirm(epgd.tr.confirmDelete+(a.length>1?"
    "+a.length+epgd.tr.entries:""),function(g){g&&b.saveArray(a,e||"delete",d)})};epgd.timerListBase.prototype.saveArray=function(c,g,e){var b=this,a=$.isArray(c)?c:[parseInt(c,10)],d={};d[g]=a;c&&a.length&&this.save(d,null,function(k){try{var h=",";$(k.responseJSON.result.failed).each(function(){h+=a[this]+","});if(h.length>1){$(b.trs).each(function(){if(h.indexOf(","+this.tData.id+",")>=0){this.style.backgroundColor="red"}})}}catch(i){}return false},e)};epgd.timerListBase.prototype.save=function(d,b,a,c){if(!d){return false}var e=this;epgd.utils.loader.process(function(){epgd.ajax({url:epgd.login.url+(b||e.o.saveUrl),type:"post",data:JSON.stringify(d)},function(g){g=g.result;if(g.state==200){epgd.utils.topInfo(epgd.tr.dataSaved)}else{epgd.utils.topInfo(g.message,{isError:1})}epgd.utils.loader.close();e.$con&&e.$con.parent().length&&e.update();c&&c.call(e)},a)},true);return true};epgd.searchResultList=epgd.utils.inherits(function(a,b){epgd.timerListBase.call(this,$.extend({saveUrl:"data/save-searchtimer"},a),b)},epgd.timerListBase);epgd.searchResultList.prototype.getTable=function(){var a=epgd.tr.pages.timerList;return'
    '+epgd.tr.channel+this.sortIcons+''+a.startTime+this.sortIcons+""+a.endTime+""+epgd.tr.pages.eventDetail.title+this.sortIcons+"
    "};epgd.searchResultList.prototype.update=function(b){if(!b){return false}var a=this;b.id&&delete b.id;b.name&&delete b.name;b.max=epgd.profile.maxListEntries;epgd.utils.loader.process(function(){a.$con.find("tbody").empty();epgd.ajax({url:epgd.login.url+"data/search",type:"post",data:JSON.stringify(b)},function(e){var c=[],d;if(!e.events||!e.events.length){a.hideHead()}else{e.count>b.max&&epgd.utils.popup("Achtung! Es wurden "+e.count+" Ergebnisse gefunden. Angezeigt werden aber nur "+b.max+".
    Das Nachladen ist noch nicht implementiert! Der Wert kann in den Einstellungen angepasst werden");$.each(e.events,function(l,h){var k="",g="",i;if(h.dones){for(d in h.dones){i=h.dones[d];g+=''+i.state+"";if(i.state=="R"){k=' class="ui-state-disabled"'}}}c.push($(""+epgd.channels.getHtml(h.channelid)+''+epgd.utils.formatDate(h.starttime)+""+epgd.utils.formatTime(h.starttime)+""+epgd.utils.formatTime(h.starttime+h.duration)+''+h.title+"
    "+(h.shorttext||"")+""+g+"").tooltip()[0])});a.trs=c;a.showHead()}epgd.utils.loader.close();a.dialog&&a.dialog.resize&&window.setTimeout(function(){a.dialog.resize()},100)})},true)};epgd.searchTimerTimerList=epgd.utils.inherits(function(a,b){epgd.timerListBase.call(this,$.extend({saveUrl:"data/save-timer",updateUrl:"data/timers?state=P,R"},a),b)},epgd.timerListBase);epgd.searchTimerTimerList.prototype.getTable=function(){var a=epgd.tr.pages.timerList;return'
    '+epgd.tr.channel+this.sortIcons+''+a.startTime+this.sortIcons+""+a.endTime+""+epgd.tr.pages.eventDetail.title+this.sortIcons+"VDR"+this.sortIcons+"
    "};epgd.searchTimerTimerList.prototype.update=function(b){if(!b){return false}var a=this;epgd.utils.loader.process(function(){a.$con.find("tbody").empty();epgd.ajax({url:epgd.login.url+a.o.updateUrl+"&autotimerid="+b.id,async:true,cache:false},function(d){var c=[],e='';if(!d.timers.length){a.hideHead()}else{$.each(d.timers,function(k,g){var i=epgd.vdrs.list[g.vdruuid]||{name:"--"},h=$(""+epgd.channels.getHtml(g.channelid)+''+(g.day?$.datepicker.formatDate(epgd.tr.dateTimePicker.dateFormat,epgd.utils.date(g.day)):"-")+""+new String(100+parseInt(g.starttime/100,10)).slice(1)+":"+new String(100+parseInt(g.starttime%100,10)).slice(1)+""+new String(100+parseInt(g.endtime/100,10)).slice(1)+":"+new String(100+parseInt(g.endtime%100,10)).slice(1)+"'+g.title+"
    "+(g.shorttext||""):">")+""+i.name+"
    "+g.file+""+e+"")[0];h.tData=g;c.push(h)});a.trs=c;a.showHead()}a.dialog&&a.dialog.resize&&window.setTimeout(function(){a.dialog.resize()},100);epgd.utils.loader.close()})})};epgd.pages.timerList=new epgd.timerListBase({updateUrl:"data/timers?state=P,R",saveUrl:"data/save-timer",selectable:true,addNew:true,right:epgd.rights.umTimer},new epgd.timerDialog());epgd.pages.timersDone=new epgd.timerListBase({updateUrl:"data/timers?state=D,F,E&action=A",right:epgd.rights.umTimer});epgd.pages.timersDone.getTable=function(){return epgd.timerListBase.prototype.getTable.call(this).replace('data-defaultSort="1"','data-defaultSort="-1"')};epgd.pages.timerListDone=new epgd.timerListBase({updateUrl:"data/donetimers",saveUrl:"data/store-donetimers",selectable:true,right:epgd.rights.umTimer});epgd.pages.timerListDone.getTable=function(){return'
    '+this.sortIcons+''+epgd.tr.pages.timerList.recordTime+this.sortIcons+""+epgd.tr.pages.eventDetail.title+' '+this.sortIcons+''+epgd.tr.channel+this.sortIcons+''+this.sortIcons+'
    '};epgd.pages.timerListDone.action=function(a,c,b){if(c=="detail"&&!a[0].eventDetail){a[0].eventDetail=new epgd.doneTimerDetail(a.parent()[0])}epgd.timerListBase.prototype.action.call(this,a,c,b)};epgd.pages.timerListDone.stateIcons={D:'
    '+epgd.tr.pages.timerList.doneStates.D+"
    ",F:'
    '+epgd.tr.pages.timerList.doneStates.F+"
    ",f:'
    '+epgd.tr.pages.timerList.doneStates.f+"
    ",R:'
    '+epgd.tr.pages.timerList.doneStates.R+"
    ",C:'
    '+epgd.tr.pages.timerList.doneStates.C+"
    ",Q:'
    '+epgd.tr.pages.timerList.doneStates.Q+"
    "};epgd.pages.timerListDone.update=function(){var a=this;epgd.utils.loader.process(function(){epgd.ajax({url:epgd.login.url+a.o.updateUrl,async:false,cache:false},function(h){a.$con.find("tbody").empty();if(!h.donetimers.length){a.hideHead()}else{var b=[],g,e,d,c='$title$';for(e in h.donetimers){d=h.donetimers[e];g=$(""+(d.state&&a.stateIcons[d.state]||"")+''+epgd.utils.formatDateTime(d.starttime)+"
    "+parseInt(d.duration/60,10)+" "+epgd.tr.minutes+''+(d.title||"")+"
    "+(d.shorttext||"")+''+epgd.channels.getHtml(d.channelid)+''+(d.autotimerid?c.replace("$id$",d.autotimerid).replace("$title$",d.autotimername||d.expression||epgd.tr.pages.timer.searchTimerList):"")+"")[0];g.tData=d;b.push(g)}a.trs=b;a.showHead()}epgd.utils.loader.close();$(window).trigger("timerlist_updated",a)})},true)};epgd.pages.timerJobList=new epgd.timerListBase({updateUrl:"data/timers?notaction=A",saveUrl:"data/delete-timerjobs",selectable:true,right:epgd.rights.umTimer},new epgd.timerDialog());epgd.pages.searchTimerList=new epgd.timerListBase({saveUrl:"data/save-searchtimer",right:epgd.rights.umSearchTimer},new epgd.searchTimerDialog());epgd.pages.searchTimerList.getTable=function(){var a=epgd.tr.pages.timerList;return'
    '+epgd.tr.pages.search.searchName+"/"+epgd.tr.pages.search.searchExpression+' '+this.sortIcons+"hits"+this.sortIcons+'VDR'+this.sortIcons+'
    '};epgd.pages.searchTimerList.action=function(c,e,d){epgd.timerListBase.prototype.action.call(this,c,e,d);switch(e){case"link-ext":this.triggerUpdate();break;case"down-dir":if(!c[0].tList){var b={$td:c.parent().css("position","relative"),tdHeight:c.parent().outerHeight()+10,data:c.parent().parent()[0].tData,resize:function(){var g=this.list.$con.find(">table").addClass("sub");g.width(this.$td.parent().outerWidth());this.$td.height(this.tdHeight+g.outerHeight(true)+10)},toggle:function(g){this.list.$con.toggle(g);if(g){this.$td.css("height","100px");this.list.update(this.data)}else{this.$td.css("height","auto")}}},a={conSel:$('
    ').appendTo(document.body)};c[0].tList=b.data.type=="S"?new epgd.searchResultList(a,b):new epgd.searchTimerTimerList(a,b);c[0].tList.render();b.$td.append(b.list.$con)}c[0].tList.dialog.toggle(true);c.removeClass("i-down-dir").addClass("i-right-dir");break;case"right-dir":c.removeClass("i-right-dir").addClass("i-down-dir");if(c[0].tList){c[0].tList.dialog.toggle(false)}break}};epgd.pages.searchTimerList.update=function(){var a=this;this.$con.find("tbody").empty();epgd.utils.loader.process(function(){epgd.ajax({url:epgd.login.url+"data/searchtimers",async:false,cache:false},function(d){var b=[],e=a.editIcons,c={V:"i-tv",R:"i-record",S:"i-search"};if(!d.searchtimers.length){a.hideHead()}else{$.each(d.searchtimers,function(k,g){var i=epgd.vdrs.list[g.vdruuid]||{name:"--"},h=$("
    '+(g.name||g.expression)+"
    --":' data-sort="'+new String("00000"+g.hits).slice(-5)+'">'+g.hits)+""+i.name+""+e+"")[0];h.tData=g;b.push(h)});a.trs=b;a.showHead()}epgd.utils.loader.close();$(window).trigger("searchTimerList_updated",a)})})};epgd.pages.searchTimerList.triggerUpdate=function(){var a=this;epgd.ajax({url:epgd.login.url+"data/updatesearchtimer"},function(b){if(b.result.state==200){epgd.utils.topInfo(epgd.tr.dataSaved)}else{epgd.utils.topInfo(b.message,{isError:1})}a.update()})};epgd.pages.search=new epgd.searchDialog();epgd.pages.messageList=new epgd.timerListBase({saveUrl:"data/markmessages",selectable:true});epgd.pages.messageList.getTable=function(){return'
    id'+this.sortIcons+'Typ '+this.sortIcons+'Zeit'+this.sortIcons+'Titel '+this.sortIcons+'infotext '+this.sortIcons+'
    Status
    '+this.sortIcons+'
    '};epgd.pages.messageList.update=function(b){var a=this;epgd.utils.loader.process(function(){epgd.ajax({url:epgd.login.url+"data/messages",async:false,cache:false},function(l){a.$con.find("tbody").empty();if(!l.messages.length){a.hideHead()}else{var c=[],k,h,g,e={N:''+epgd.tr.pages.timerList.messageStates.N+"",R:''+epgd.tr.pages.timerList.messageStates.R+""},d={E:'
    '+epgd.tr.pages.timerList.timerStates.E+"
    ",F:'
    '+epgd.tr.pages.timerList.timerStates.F+"
    ",I:'
    '+epgd.tr.pages.timerList.messageTypes.I+"
    ",W:'
    '+epgd.tr.pages.timerList.messageTypes.W+"
    "};for(h in l.messages){g=l.messages[h];k=$(''+g.id+""+(d[g.type]||"")+''+epgd.utils.formatDateTime(g.updsp)+""+g.title+""+g.text+''+(e[g.state]||"")+"")[0];k.tData=g;c.push(k)}a.trs=c;a.$con.find(">table>tbody").append(c.sort(function(m,i){return m.tData.state==i.tData.state?m.tData.state.updsp>i.tData.state.updsp?-1:1:m.tData.state>i.tData.state}).slice());a.showHead()}epgd.utils.loader.close();$(window).trigger("messagelist_updated",a)})},true)};epgd.pages.messageList.action=function(b,g,e){var c=this.getSelectedIds(b),d=null,a;if(c){switch(g){case"check":d=b[0].parentNode.nodeName=="TH"?"R":"N";break;case"check-empty":d=b[0].parentNode.nodeName=="TH"?"N":"R";break;case"trash":d="D";break}if(d){for(a in c){c[a]={id:c[a],state:d}}d=="D"?this.del(c,null,"messages"):this.saveArray(c,"messages");return true}}return epgd.timerListBase.prototype.action.call(this,b,g,e)};epgd.vdr=function(a,b){this.uuid=a;$.extend(this,b)};epgd.vdr.prototype.switchChannel=function(a){epgd.ajax({url:epgd.login.url+"data/channelswitch?uuid="+this.uuid+"&channel="+a,cache:false},function(b){epgd.utils.popup(b.result.message,{title:"VDR",autoClose:5000})})};epgd.vdr.prototype.wol=function(){epgd.ajax({url:epgd.login.url+"data/wakeupvdr?uuid="+this.uuid,cache:false},function(a){epgd.utils.popup(a.result.message,{title:"VDR",autoClose:5000})})};epgd.vdrs={list:null,current:null,load:function(){if(!this.list){this.list={};epgd.ajax({url:epgd.login.url+"data/vdrs",async:false},function(b){var a;for(a in b.vdrs){epgd.vdrs.list[a]=new epgd.vdr(a,b.vdrs[a])}if(!epgd.vdrs.current){if(epgd.profile.defaultVDRuuid){epgd.vdrs.current=epgd.vdrs.list[epgd.profile.defaultVDRuuid];if(!epgd.vdrs.current){epgd.utils.log("the default VDR ("+epgd.profile.defaultVDRuuid+" is invalid! Please change this in Web Interface/options)")}}if(!epgd.vdrs.current){for(a in epgd.vdrs.list){epgd.vdrs.current=epgd.vdrs.list[a];break}}if(!epgd.vdrs.current){epgd.utils.log("no VDR found",2);epgd.vdrs.current=new epgd.vdr("000-missing-vdr-000",{name:"no VDR found"})}}$(window).trigger("vdrs_load")})}},get:function(a){return this.list[(a||this.current)]||{}}};epgd.pages.vdrs={render:function(){epgd.$con.html('
    ')}}; \ No newline at end of file diff --git a/http/www/lang/de.js b/http/www/lang/de.js index 2ecb9b0..4d8a631 100644 --- a/http/www/lang/de.js +++ b/http/www/lang/de.js @@ -98,7 +98,7 @@ epgd.tr = { 'D': 'gelöscht', 'E': 'Fehler', 'F': 'Aufnahme erfolgreich', - 'P': 'wartet auf Aufnahmebeginn', + 'P': 'wartet auf Start', 'R': 'nimmt gerade auf...', 'U': 'unbekannt' }, @@ -117,15 +117,15 @@ epgd.tr = { 'Q': 'Timer in Vorbereitung', 'R': 'Aufnahme fertig' }, - messageStates: { + messageStates: { 'N': 'Neu', 'R': 'gelesen' }, - messageTypes: { + messageTypes: { 'I': 'Information', - 'W': 'Warnung', + 'W': 'Warnung', 'E': 'Fehler', - 'F': 'Fataler Fehler' + 'F': 'Fataler Fehler' }, chFormat: "bevorzugtes Sendeformat" //channelModes: ["SD", "HD", "3D", "HD,SD", "SD,HD", "3D,HD,SD", "SD,HD,3D"] }, @@ -261,8 +261,8 @@ epgd.tr = { vdr: { startWithSched:'EPG Menü startet mit Schedule' }, - record: { - subFolderSort: 'Sortierung der Unterordner' + record: { + subFolderSort: 'Sortierung der Unterordner' } } }, -- cgit v1.2.3