diff options
author | horchi <vdr@jwendel.de> | 2017-06-28 21:01:27 +0200 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2017-06-28 21:01:27 +0200 |
commit | 65e13cfa23db0c3481f53a0313ef35b9e2e61d19 (patch) | |
tree | 8d8fe395b69617fee439e06391de7d60602a97e4 /http/src | |
parent | 7d9947657176d68305a428a640879bef1dbb607b (diff) | |
download | vdr-epg-daemon-65e13cfa23db0c3481f53a0313ef35b9e2e61d19.tar.gz vdr-epg-daemon-65e13cfa23db0c3481f53a0313ef35b9e2e61d19.tar.bz2 |
2017-06-28: version 1.1.119 (rechner)\n - added: Link to osd2web, if available\n\n1.1.120
Diffstat (limited to 'http/src')
-rw-r--r-- | http/src/css/epgd.less | 306 | ||||
-rw-r--r-- | http/src/js/1_main.js | 305 |
2 files changed, 311 insertions, 300 deletions
diff --git a/http/src/css/epgd.less b/http/src/css/epgd.less index 51a9c90..ea13b61 100644 --- a/http/src/css/epgd.less +++ b/http/src/css/epgd.less @@ -1,6 +1,6 @@ /* Hier sind Variablen aus Jquery-ui. Sie werden folgendermass erstellt: - aus 3rdParty\jquery-ui-x:x.custom\development-bundle\themes\humanity\jquery-ui.css den Link kopieren und hier einfügen. - Dann diesen Link (nur Auswahl) per regulären Ausdruck + aus 3rdParty\jquery-ui-x:x.custom\development-bundle\themes\humanity\jquery-ui.css den Link kopieren und hier einf�gen. + Dann diesen Link (nur Auswahl) per regul�ren Ausdruck suchen "$([^=]+)=([^&]+)" und ersetzen "@$1: $2; " suchen " ([a-f0-9]{6})" und ersetzen " #$1" */ @@ -120,10 +120,10 @@ h5 { line-height: 1.5; } -.placeholders {
- position: absolute;
- max-height: 120px;
- overflow: auto;
+.placeholders { + position: absolute; + max-height: 120px; + overflow: auto; } .ui-dialog{position:fixed} @@ -141,8 +141,8 @@ h5 { margin: 3px; white-space: nowrap; - &[disabled] {
- opacity: .35;
+ &[disabled] { + opacity: .35; } } @@ -236,14 +236,14 @@ select { //border-width: 0px 0px 5px 0px; background-color: #fff; - span.maxi {
- display:none;
+ span.maxi { + display:none; } -
- .iAsButton {
- padding: 0 2px;
- line-height: 21px;
- margin-top: 0;
+ + .iAsButton { + padding: 0 2px; + line-height: 21px; + margin-top: 0; } &.mini{ @@ -277,8 +277,8 @@ select { float: left; min-width: 90%; min-height: 25px; - > a {
- width:100%;
+ > a { + width:100%; } } } @@ -314,9 +314,9 @@ select { overflow: hidden; text-decoration: none; } -
- span.ui-menu-icon {
- display:none;
+ + span.ui-menu-icon { + display:none; } } .menu-active { @@ -369,7 +369,9 @@ select { float: right; margin-right: 20px !important; } - +#osd2web { + text-decoration: none; +} .menu-active input, .menu-active select { display: block; visibility: visible; @@ -438,12 +440,12 @@ table.ui-datepicker-calendar { line-height: 1; color: #4d4949; padding: 3px 5px 0 3px; - img {
- max-width: 70px;
- max-height: 50px;
- margin-right: 5px;
- margin-bottom: 5px;
- display:block;
+ img { + max-width: 70px; + max-height: 50px; + margin-right: 5px; + margin-bottom: 5px; + display:block; } .i-tv { font-size: 1.8em; @@ -504,14 +506,14 @@ table.ui-datepicker-calendar { box-sizing: border-box; /* Opera/IE 8+ */ } - .desc {
- height: 72px;
- overflow: hidden;
- &:hover{
- min-height: 72px;
- height:auto;
- overflow-y:visible;
- }
+ .desc { + height: 72px; + overflow: hidden; + &:hover{ + min-height: 72px; + height:auto; + overflow-y:visible; + } } .desc img { @@ -527,8 +529,8 @@ table.ui-datepicker-calendar { float: right; font-size: 0.9em; } - .tipp {
- margin:1px 5px 0 0;
+ .tipp { + margin:1px 5px 0 0; } .title { @@ -552,20 +554,20 @@ table.ui-datepicker-calendar { } } -#magazine-nav{
+#magazine-nav{ // overflow:hidden; - width:100%;
- left:-27px;
- position:relative;
-
+ width:100%; + left:-27px; + position:relative; + .left, .right { width: 50px; height:54px; border-top: none; border-bottom: none; position: absolute; - z-index: 98;
+ z-index: 98; top:0; .ui-widget-content { @@ -583,17 +585,17 @@ table.ui-datepicker-calendar { .left { left:0; //border-right: 5px solid white; - }
+ } .right { right: 0; //border-left: 5px solid white; } -}
+} #magazine-head { - margin: 0 0 0 -2%;
+ margin: 0 0 0 -2%; height: 55px; padding: 0 0 0 54px; overflow:hidden; @@ -608,8 +610,8 @@ table.ui-datepicker-calendar { height: 55px; width:auto; img { - max-width:100px;
- float:left;
+ max-width:100px; + float:left; } } } @@ -658,17 +660,17 @@ table.ui-datepicker-calendar { position: absolute; z-index: 99; - p {
+ p { position: absolute; - pointer-events:none;
- width: 5000px;
- height: 180px;
- background-color: red !important;
- opacity: 0.1;
+ pointer-events:none; + width: 5000px; + height: 180px; + background-color: red !important; + opacity: 0.1; } - &.tlr{
- p{display:none}
+ &.tlr{ + p{display:none} } dfn { height: 120px; @@ -863,8 +865,8 @@ table.ui-datepicker-calendar { font-size: 12px; border: 1px solid #ccc; border-radius: 4px; - img {
- margin: 0 auto 5px auto;
+ img { + margin: 0 auto 5px auto; } } @@ -900,17 +902,17 @@ table.ui-datepicker-calendar { box-sizing: border-box; } - .rate {
- background-size: 25px;
- min-height:40px;
- padding-left: 30px;
- > span {
- display: block;
- font-size: 1.2em;
- }
+ .rate { + background-size: 25px; + min-height:40px; + padding-left: 30px; + > span { + display: block; + font-size: 1.2em; + } } - .tipp{
- margin:0 5px 0 0;
+ .tipp{ + margin:0 5px 0 0; } .stars { @@ -1002,8 +1004,8 @@ table.ui-datepicker-calendar { } } } - .rec {
- font-size:0.9em;
+ .rec { + font-size:0.9em; } } @@ -1062,16 +1064,16 @@ table.ui-datepicker-calendar { color: transparent; float: right; } -
-.rate {
- background: url() no-repeat left top;
- background-size: 18px;
- min-height:35px;
- padding-left: 25px;
- margin: 5px 0;
+ +.rate { + background: url() no-repeat left top; + background-size: 18px; + min-height:35px; + padding-left: 25px; + margin: 5px 0; float: left; clear:left; - display:block;
+ display:block; } .rate1{ background-image: url('images/thumb-rate1.svg');} @@ -1081,16 +1083,16 @@ table.ui-datepicker-calendar { .rate5{ background-image: url('images/thumb-rate5.svg');} .rate0{ background:none; height:auto;padding-left:inherit} -.tipp{
- display:block;
- float: left;
- margin:5px 0;
- background-color: rgb(245, 126, 126);
- color: white;
- border-radius: @ui-cornerRadius;
- padding: 1px 3px;
- font-size: 0.9em;
- font-weight: normal;
+.tipp{ + display:block; + float: left; + margin:5px 0; + background-color: rgb(245, 126, 126); + color: white; + border-radius: @ui-cornerRadius; + padding: 1px 3px; + font-size: 0.9em; + font-weight: normal; } #searchResult { @@ -1116,16 +1118,16 @@ table.ui-datepicker-calendar { vertical-align: top; .channel { - img {
- max-height:30px;
+ img { + max-height:30px; } } } /* p { - border-top: 1px solid #ccc;
- height: 18px;
- margin: 0;
+ border-top: 1px solid #ccc; + height: 18px; + margin: 0; overflow-y: hidden; &:hover { @@ -1162,8 +1164,8 @@ table.ui-datepicker-calendar { } } } -#timerSearchList {
- max-width:750px;
+#timerSearchList { + max-width:750px; } .searchDialog { min-width: 320px; @@ -1176,13 +1178,13 @@ table.ui-datepicker-calendar { text-decoration: underline; } - >form{
- >div{
- margin-bottom:5px;
- margin-top: 5px;
+ >form{ + >div{ + margin-bottom:5px; + margin-top: 5px; } - &.noAdv{
- >div + div {display: none}
+ &.noAdv{ + >div + div {display: none} } } @@ -1215,7 +1217,7 @@ table.ui-datepicker-calendar { } .colBlock { - width:100%;
+ width:100%; float: left; div { float: left; @@ -1226,14 +1228,14 @@ table.ui-datepicker-calendar { } } } - form.typeS {
- .noTypeS, .onlyTypeR {display:none}
+ form.typeS { + .noTypeS, .onlyTypeR {display:none} } - form.typeV {
- .onlyTypeR, .onlyTypeS {display:none}
+ form.typeV { + .onlyTypeR, .onlyTypeS {display:none} } - form.typeR {
- .onlyTypeS {display:none}
+ form.typeR { + .onlyTypeS {display:none} } } @@ -1281,9 +1283,9 @@ table.ui-datepicker-calendar { h4 { margin: 3px 0; display: inline-block; - span {
- font-weight: normal;
- padding-right: 3px;
+ span { + font-weight: normal; + padding-right: 3px; } } @@ -1313,7 +1315,7 @@ table.ui-datepicker-calendar { } } -
+ } .rec { border: 1px solid @ui-borderColorDefault; @@ -1351,24 +1353,24 @@ table.ui-datepicker-calendar { padding: 2px 0; } } - #recBar{
- font-size:0.9em;
- display:inline-block;
+ #recBar{ + font-size:0.9em; + display:inline-block; } - body.dd-open{
- #ui-menu-top, #recBar{
- display:none !important;
- }
+ body.dd-open{ + #ui-menu-top, #recBar{ + display:none !important; + } #records{ - .folder {
- display:block;
+ .folder { + display:block; } - div.rec{
- display:none;
+ div.rec{ + display:none; } - }
-
+ } + } .pageEditChannels > li { @@ -1380,11 +1382,11 @@ table.ui-datepicker-calendar { padding-left: 5px; width: 96%; - &.filterHide {
- height:0;
- overflow:hidden;
- margin:0;
- border:none;
+ &.filterHide { + height:0; + overflow:hidden; + margin:0; + border:none; } } @@ -1472,22 +1474,22 @@ table.ui-datepicker-calendar { } } -#page_editUser {
- >div {
- float:left;
- height:350px;
- padding-right:20px;
- margin-right:20px;
- border-right:2px solid #ccc;
- }
- h2 {
- margin: 5px 0 2px 0;
- font-size:1em
- }
- form {float:left}
- select{
- overflow:auto; height:200px
- }
+#page_editUser { + >div { + float:left; + height:350px; + padding-right:20px; + margin-right:20px; + border-right:2px solid #ccc; + } + h2 { + margin: 5px 0 2px 0; + font-size:1em + } + form {float:left} + select{ + overflow:auto; height:200px + } } /* ========================================================================== @@ -1560,10 +1562,10 @@ table.ui-datepicker-calendar { width: 320px; } - #magazine-nav {
- top:-10px;
- .left{margin-left:-1px;}
- .right{margin-right:-1px;}
+ #magazine-nav { + top:-10px; + .left{margin-left:-1px;} + .right{margin-right:-1px;} } #magazine-head { @@ -1585,14 +1587,14 @@ table.ui-datepicker-calendar { .rec { margin: 2px; padding: 0; - border-bottom-left-radius: 0;
+ border-bottom-left-radius: 0; border-bottom-right-radius: 0; u { position: inherit; margin-left: 2px; } - }
+ } } @media only screen and (min-width: 768px) and (max-width:1139px) { diff --git a/http/src/js/1_main.js b/http/src/js/1_main.js index 3a8251a..09e93c4 100644 --- a/http/src/js/1_main.js +++ b/http/src/js/1_main.js @@ -55,10 +55,10 @@ epgd.profile_load = function (doNotCache) { epgd.channels.isDirty = true; } } - if (epgd.utils.timeOffset == null) {
- epgd.utils.timeOffset = (data.timezone - new Date().getTimezoneOffset() * 60) * 1000;
- now = epgd.utils.now();
- epgd.$dtPicker.datetimepicker('setDate', new Date(now.setMinutes(parseInt(now.getMinutes() / 15, 10) * 15)));
+ if (epgd.utils.timeOffset == null) { + epgd.utils.timeOffset = (data.timezone - new Date().getTimezoneOffset() * 60) * 1000; + now = epgd.utils.now(); + epgd.$dtPicker.datetimepicker('setDate', new Date(now.setMinutes(parseInt(now.getMinutes() / 15, 10) * 15))); } if (!profile.minEventTime) { now = epgd.utils.now(); @@ -131,7 +131,7 @@ epgd.utils = { width: 400, height:200, maxWidth: $w.width() * 0.8, - maxHeight: $w.height() * 0.7,
+ maxHeight: $w.height() * 0.7, }, options); $dlg = $('<div class="epgPopUp"><p>' + txt + '</p></div>').dialog(options); options.autoClose && window.setTimeout(function () { $dlg.dialog('close').dialog('destroy'); }, options.autoClose); @@ -214,63 +214,63 @@ epgd.utils = { fontSize, kc; inst.selectedItems = {}; - if (o.multiselect) {
+ if (o.multiselect) { inst.multiselect = $("<div></div>") .addClass("ui-autocomplete-multiselect ui-state-default ui-widget " + cn) .css("width", w) .insertBefore(inst.element) .append(inst.element) - .bind("click.autocomplete", function () {
- inst.element.focus();
+ .bind("click.autocomplete", function () { + inst.element.focus(); }); inst.menu.element.css({ "height": "300px", "overflow-y": "auto" }); fontSize = parseInt(inst.element.css("fontSize") || 10, 10); function autoSize(e) { // Hackish autosizing var $this = $(this); - $this.width(1).width(this.scrollWidth + fontSize - 1);
+ $this.width(1).width(this.scrollWidth + fontSize - 1); }; kc = $.ui.keyCode; - inst.element.bind({
- "keydown.autocomplete": function (e) {
- if ((this.value === "") && (e.keyCode == kc.BACKSPACE)) {
+ inst.element.bind({ + "keydown.autocomplete": function (e) { + if ((this.value === "") && (e.keyCode == kc.BACKSPACE)) { var prev = inst.element.prev(); delete inst.selectedItems[prev.text()]; - prev.remove();
- }
+ prev.remove(); + } }, // TODO: Implement outline of container - "focus.autocomplete blur.autocomplete": function () {
- inst.multiselect.toggleClass("ui-state-active");
+ "focus.autocomplete blur.autocomplete": function () { + inst.multiselect.toggleClass("ui-state-active"); }, - "keypress.autocomplete change.autocomplete focus.autocomplete blur.autocomplete": autoSize
+ "keypress.autocomplete change.autocomplete focus.autocomplete blur.autocomplete": autoSize }).trigger("change"); - o.select = o.select || function (e, ui) {
- if (!inst.selectedItems[ui.item.label]) {
+ o.select = o.select || function (e, ui) { + if (!inst.selectedItems[ui.item.label]) { $("<div></div>") .addClass("ui-autocomplete-multiselect-item") .text(ui.item.label) .append( $("<span></span>") .addClass("ui-icon ui-icon-close") - .click(function () {
+ .click(function () { var item = $(this).parent(); delete inst.selectedItems[item.text()]; - item.remove();
+ item.remove(); }) ) .insertBefore(inst.element); - inst.selectedItems[ui.item.label] = ui.item;
+ inst.selectedItems[ui.item.label] = ui.item; } inst._value(""); - return false;
- }
- } else {
- o.select = o.select || function (e, ui) {
- inst.selectedItems[0] = ui.item;
- inst._value(ui.item.label);
- return false;
- }
+ return false; + } + } else { + o.select = o.select || function (e, ui) { + inst.selectedItems[0] = ui.item; + inst._value(ui.item.label); + return false; + } }; } }, options)).focus(function () { @@ -313,43 +313,43 @@ epgd.utils = { } } }, - addPlaceholders: function (inputSelector, key, placeholders) {
- var input = $(inputSelector)[0],
- html = '<ul class="placeholders ui-menu ui-widget ui-widget-content">',
- p;
+ addPlaceholders: function (inputSelector, key, placeholders) { + var input = $(inputSelector)[0], + html = '<ul class="placeholders ui-menu ui-widget ui-widget-content">', + p; for (p in placeholders) html += '<li class="ui-menu-item"><b>' + p + '</b>' + placeholders[p] + '</li>'; - input.$placeholders = $(html + '</ul>').hide().insertAfter(input).click(function (ev) {
- var placeholder = ev.target.nodeName == 'B' ? $(ev.target).text() : ev.target.nodeName == 'LI' ? $(ev.target.firstChild).text() : null,
- cursorPos = $(input).prop('selectionStart'),
- v = $(input).val();
- if (placeholder) {
- $(input).val(v.substring(0, cursorPos) + placeholder + v.substring(cursorPos, v.length)).focus();
- cursorPos += placeholder.length;
- if (input.setSelectionRange) {
- input.setSelectionRange(cursorPos, cursorPos);
- }
- else if (input.createTextRange) {
- v = input.createTextRange();
- v.collapse(true);
- v.moveEnd('character', cursorPos);
- v.moveStart('character', cursorPos);
- v.select();
- }
- }
- $(this).hide();
- });
- $(input).keydown(function (ev) {
- if (ev.key == key) {
- $(document).one("click", function () { input.$placeholders.hide(); })
- input.blur();
- return !input.$placeholders.show().position({
- my: "left top",
- at: "left bottom",
- of: input
- });
- }
- });
+ input.$placeholders = $(html + '</ul>').hide().insertAfter(input).click(function (ev) { + var placeholder = ev.target.nodeName == 'B' ? $(ev.target).text() : ev.target.nodeName == 'LI' ? $(ev.target.firstChild).text() : null, + cursorPos = $(input).prop('selectionStart'), + v = $(input).val(); + if (placeholder) { + $(input).val(v.substring(0, cursorPos) + placeholder + v.substring(cursorPos, v.length)).focus(); + cursorPos += placeholder.length; + if (input.setSelectionRange) { + input.setSelectionRange(cursorPos, cursorPos); + } + else if (input.createTextRange) { + v = input.createTextRange(); + v.collapse(true); + v.moveEnd('character', cursorPos); + v.moveStart('character', cursorPos); + v.select(); + } + } + $(this).hide(); + }); + $(input).keydown(function (ev) { + if (ev.key == key) { + $(document).one("click", function () { input.$placeholders.hide(); }) + input.blur(); + return !input.$placeholders.show().position({ + my: "left top", + at: "left bottom", + of: input + }); + } + }); }, inherits : function (childClass, parentClass) { var tempClass = function () { }; @@ -392,12 +392,12 @@ epgd.init = function () { } else if (unit == 'second' && epgd.profile.quickTimes) { obj.closest('dl').find('.ui_tpicker_time').removeClass() .bind("click", { tp_inst: tp_inst, obj:obj, unit: 'time' }, $.timepicker.quicklink).html('<i><u title="' + epgd.profile.quickTimes.replace(/[^=~]+=@[a-z]+/gi, '').replace(/~{2,}/g, '~').replace(/=!?/g, '">').replace(/~/g, '</u></i><i><u title="') + '</u></i>'); - if (tp_inst.inst.settings.alwaysSetTime)
+ if (tp_inst.inst.settings.alwaysSetTime) epgd.pages.help.initButtons(tp_inst.inst.dpDiv.find('.ui-datepicker-buttonpane').append(epgd.pages.help.getButton('datepicker'))); - else
- $('<button class="iAsButton i-cancel" role="button">' + epgd.tr.clear + '</button>').appendTo(tp_inst.inst.dpDiv.find('.ui-datepicker-buttonpane')).click(function () {
+ else + $('<button class="iAsButton i-cancel" role="button">' + epgd.tr.clear + '</button>').appendTo(tp_inst.inst.dpDiv.find('.ui-datepicker-buttonpane')).click(function () { tp_inst.$input.val(''); - $.datepicker._hideDatepicker();
+ $.datepicker._hideDatepicker(); }); return obj; } else @@ -446,47 +446,47 @@ epgd.init = function () { epgd.$menu.parent().toggleClass('open'); }); epgd.$menu.checkMenuSize = function (ev, callback) { - if (window.wrm_i) { // interval aktiv?
- if (window.wrm_w == $(window).width()) { //Breite vom vorherigen Aufruf und aktuelle Breite gleich?
- 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, callback);
- } else
- window.wrm_w = $(window).width();
- return;
- }
- if (ev) {
- window.wrm_w = $(window).width();
- if (!window.wrm_i) // Interval setzen, um sicher zu sein, dass die Breite jetzt stimmt
- window.wrm_i = window.setInterval(epgd.$menu.checkMenuSize, 200,null,callback);
- } else {
- if (epgd.$menu.height() > 40)
- epgd.$menu.parent().addClass('mini');
- window.setTimeout(function () {
- document.body.style.paddingTop = (epgd.$menu.parent().height() + 10) + "px";
- callback && window.setTimeout(callback,200);
- }, 200);
+ if (window.wrm_i) { // interval aktiv? + if (window.wrm_w == $(window).width()) { //Breite vom vorherigen Aufruf und aktuelle Breite gleich? + 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, callback); + } else + window.wrm_w = $(window).width(); + return; + } + if (ev) { + window.wrm_w = $(window).width(); + if (!window.wrm_i) // Interval setzen, um sicher zu sein, dass die Breite jetzt stimmt + window.wrm_i = window.setInterval(epgd.$menu.checkMenuSize, 200,null,callback); + } else { + if (epgd.$menu.height() > 40) + epgd.$menu.parent().addClass('mini'); + window.setTimeout(function () { + document.body.style.paddingTop = (epgd.$menu.parent().height() + 10) + "px"; + callback && window.setTimeout(callback,200); + }, 200); } }; //epgd.$menu.show().checkMenuSize(); $(window).bind("resize", epgd.$menu.checkMenuSize); epgd.$dtPicker = $('<input type="text" id="selDate" readonly style="z-index:199;position:relative" />').appendTo(document.body).hide().bind("click",function () { $(this).datepicker("show"); return false; }); - epgd.$dtPicker.datetimepicker({
- beforeShow: function () {
- this.$overlay = $("<div />").addClass("ui-widget-overlay ui-front").appendTo(document.body);
+ epgd.$dtPicker.datetimepicker({ + beforeShow: function () { + this.$overlay = $("<div />").addClass("ui-widget-overlay ui-front").appendTo(document.body); }, - onClose: function () {
+ onClose: function () { this.$overlay.remove(); - $(window).trigger('datepicker');
- },
+ $(window).trigger('datepicker'); + }, calendarStart: function() { var d= new Date(epgd.profile.minEventTime * 1000) leadDays = (d.getDay() - parseInt(epgd.profile.pickerFirstDay, 10) + 7) % 7; d.setHours(12, 0); d.setDate(d.getDate() - leadDays); return d; - }
+ } }); epgd.$menu.menu({ @@ -499,14 +499,14 @@ epgd.init = function () { epgd.$menu.parent().removeClass('open'); $(".menu-active", this).removeClass("menu-active"); $(document.body).append(epgd.$dtPicker.hide()); - epgd.$menu.checkMenuSize(null,function () {
- try {
+ epgd.$menu.checkMenuSize(null,function () { + try { ui.item.addClass("menu-active").parent().parent('.ui-menu-item').addClass("menu-active"); - epgd.pages[id.slice(5)].render();
- } catch (e) {
- epgd.utils.popup(epgd.tr.error.common, { title: epgd.tr.error.error });
- epgd.utils.log((e.message || 'common error') + '\n' + (e.stack || ''), 2);
- }
+ epgd.pages[id.slice(5)].render(); + } catch (e) { + epgd.utils.popup(epgd.tr.error.common, { title: epgd.tr.error.error }); + epgd.utils.log((e.message || 'common error') + '\n' + (e.stack || ''), 2); + } }); } }); @@ -522,8 +522,8 @@ epgd.init = function () { if (changes["defaultVDRuuid"] != undefined) { $('#menu_vdrs > select').val(epgd.profile.defaultVDRuuid); } - if (changes["quickTimes"] != undefined) {
- epgd.pages.magazine.initQT();
+ if (changes["quickTimes"] != undefined) { + epgd.pages.magazine.initQT(); } if (changes["needLogin"] != undefined) { epgd.pages.login.doLogin(); @@ -550,7 +550,7 @@ epgd.init = function () { + ((epgd.login.rights & epgd.rights.umConfigUsers) == epgd.rights.umConfigUsers ? '<li id="menu_editUser"><a href="#menu_editUser">' + epgd.tr.pages.options.editUser + '</a></li>' : '') + '</ul></li>'); epgd.$menu.append('<li id="menu_help"><a href="#menu_help">' + epgd.tr.menu.help + '</a></li>'); - epgd.$menu.append('<li id="menu_vdrs"><a href="#menu_vdrs">VDR</a><select></select></li>'); + epgd.$menu.append('<li id="menu_vdrs"><a href="#menu_vdrs">VDR</a><select></select><span><a id="osd2web">->OSD</a></span></li>'); } epgd.profile.needLogin == "1" && epgd.$menu.append('<li id="menu_login"><a href="#menu_login">' + (epgd.login.session ? epgd.login.user + ' ' + epgd.tr.pages.login.logout : epgd.tr.pages.login.label ) @@ -571,13 +571,22 @@ epgd.init = function () { html += '<option value="' + uuid + '"' + (uuid == epgd.vdrs.current.uuid ? 'selected' : '') + '>' + epgd.vdrs.list[uuid].name + '</option>'; } $('<select>' + html + '</select>').replaceAll('#menu_vdrs > select').show().change(function () { - epgd.vdrs.current = epgd.vdrs.get(this[this.selectedIndex].value); + var vdr= epgd.vdrs.current = epgd.vdrs.get(this[this.selectedIndex].value); + if (vdr && vdr.osd2webp) + $('#osd2web').prop("target", "osd2web_" + vdr.name) + .prop("href", "http://" + vdr.ip + ":" + vdr.osd2webp) + .click(function(ev){ + ev.stopPropagation(); + return true; + }).show(); + else + $('#osd2web').hide(); }).mousedown(function (ev) { ev.stopPropagation(); return true; }).click(function (ev) { return false; - }); + }).change(); }).bind("unload", function () { if (epgd.login.session) epgd.pages.login.doLogin('logout'); @@ -593,15 +602,15 @@ epgd.init = function () { window.setInterval(epgd.profile_load, 3600000); // ca. jede Stunde neu abfragen // window.setTimeout(function () { $(window).trigger('resize'); }); } -window.onerror = function (msg, url, line, col, error) {
- // Note that col & error are new to the HTML 5 spec and may not be
- // supported in every browser. It worked for me in Chrome.
- var extra = !col ? '' : '\ncolumn: ' + col;
- extra += !error ? '' : '\nerror: ' + error.stack;
- try{
- epgd.utils.log(msg + "\nline: " + line + extra, 2);
- } catch(e){}
- return true;
+window.onerror = function (msg, url, line, col, error) { + // Note that col & error are new to the HTML 5 spec and may not be + // supported in every browser. It worked for me in Chrome. + var extra = !col ? '' : '\ncolumn: ' + col; + extra += !error ? '' : '\nerror: ' + error.stack; + try{ + epgd.utils.log(msg + "\nline: " + line + extra, 2); + } catch(e){} + return true; }; $.widget("custom.catcomplete", $.ui.autocomplete, { @@ -625,54 +634,54 @@ $.widget("custom.catcomplete", $.ui.autocomplete, { }); } }); -$.datepicker._gotoToday = function (id) {
+$.datepicker._gotoToday = function (id) { var inst = this._getInst($(id)[0]), now = epgd.utils.now(); this._base_gotoToday(id); this._setTime(inst, now); - this._setDate(inst, now);
- this._hideDatepicker();
+ this._setDate(inst, now); + this._hideDatepicker(); }; -$.timepicker.quicklink = function (ev) {
+$.timepicker.quicklink = function (ev) { var target = ev.target.nodeName == 'I' ? ev.target.firstChild : ev.target, tp_inst, val = null, d = false; - try {
- tp_inst = ev.data.tp_inst || $.datepicker._getInst(epgd.$dtPicker[0]).settings.timepicker;
- } catch (e) {
- epgd.utils.log((e.message || 'common error') + '\n' + (e.stack || ''), 2);
- return false;
+ try { + tp_inst = ev.data.tp_inst || $.datepicker._getInst(epgd.$dtPicker[0]).settings.timepicker; + } catch (e) { + epgd.utils.log((e.message || 'common error') + '\n' + (e.stack || ''), 2); + return false; } - if (target.nodeName == 'U') {
- if (ev.data.unit == "time")
- val = $.datepicker.parseTime(tp_inst._defaults.timeFormat, target.innerHTML, tp_inst._defaults);
- else if (ev.data.unit == "hour")
- val = { hour: parseInt(target.innerHTML, 10), minute: tp_inst.minute };
-
- if (val) {
+ if (target.nodeName == 'U') { + if (ev.data.unit == "time") + val = $.datepicker.parseTime(tp_inst._defaults.timeFormat, target.innerHTML, tp_inst._defaults); + else if (ev.data.unit == "hour") + val = { hour: parseInt(target.innerHTML, 10), minute: tp_inst.minute }; + + if (val) { if (val.hour < tp_inst.hour - 1) - d = true;
- else {
+ d = true; + else { tp_inst.control.value(tp_inst, tp_inst.hour_slider, "hour", val.hour); tp_inst._onTimeChange(); if (tp_inst.hour != val.hour) - d = true;
+ d = true; } - if (d) {
+ if (d) { d = new Date(tp_inst.inst.selectedYear, tp_inst.inst.selectedMonth, tp_inst.inst.selectedDay + 1, val.hour, val.minute); $.datepicker._setDate(tp_inst.inst, d); $.datepicker._setTime(tp_inst.inst, d); - $.datepicker._updateDatepicker(tp_inst.inst);
+ $.datepicker._updateDatepicker(tp_inst.inst); } else - tp_inst.control.value(tp_inst, tp_inst.minute_slider, "minute", val.minute);
+ tp_inst.control.value(tp_inst, tp_inst.minute_slider, "minute", val.minute); } else tp_inst.control.value(tp_inst, ev.data.obj, ev.data.unit, parseInt(target.innerHTML, 10)); tp_inst._onTimeChange(); tp_inst._onSelectHandler(); if (ev.target.nodeName == 'I') - $.datepicker._hideDatepicker();
- }
+ $.datepicker._hideDatepicker(); + } } epgd.ajax = function (options, success, error) { @@ -692,19 +701,19 @@ epgd.ajax = function (options, success, error) { } else if (jqxhr.status == 403) { epgd.utils.popup(epgd.tr.error.forbidden, { title: epgd.tr.error.error }); - } else if (jqxhr.status == 501){
- epgd.utils.popup(epgd.tr.error.notImplemented, { title: epgd.tr.error.error });
+ } else if (jqxhr.status == 501){ + epgd.utils.popup(epgd.tr.error.notImplemented, { title: epgd.tr.error.error }); } else { if (error && error.call(this, jqxhr, e)) return; //if (jqxhr.status == 409) { var mess = ''; - try {
+ try { if (jqxhr.responseJSON) - mess = jqxhr.responseJSON.result.message;
- } catch (e) {
+ mess = jqxhr.responseJSON.result.message; + } catch (e) { mess = ''; - epgd.utils.log((e.message || 'common error') + '\n' + (e.stack || '') + '\n options:' + JSON.stringify(options) + '\n jqhr:' + JSON.stringify(jqxhr), 3);
+ epgd.utils.log((e.message || 'common error') + '\n' + (e.stack || '') + '\n options:' + JSON.stringify(options) + '\n jqhr:' + JSON.stringify(jqxhr), 3); } epgd.utils.popup(mess || jqxhr.responseText || epgd.tr.error.serverNotResponse, { title: epgd.tr.error.error }); // } else |