From 65e13cfa23db0c3481f53a0313ef35b9e2e61d19 Mon Sep 17 00:00:00 2001 From: horchi Date: Wed, 28 Jun 2017 21:01:27 +0200 Subject: 2017-06-28: version 1.1.119 (rechner)\n - added: Link to osd2web, if available\n\n --- http/src/css/epgd.less | 306 +++++++++++++++++++++++++------------------------ http/src/js/1_main.js | 305 ++++++++++++++++++++++++------------------------ 2 files changed, 311 insertions(+), 300 deletions(-) (limited to 'http/src') 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 = $('

' + txt + '

').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 = $("
") .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]) { $("
") .addClass("ui-autocomplete-multiselect-item") .text(ui.item.label) .append( $("") .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 = '').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('').replace(/~/g, '' + epgd.tr.clear + '').appendTo(tp_inst.inst.dpDiv.find('.ui-datepicker-buttonpane')).click(function () { + else + $('').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 = $('').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); + epgd.$dtPicker.datetimepicker({ + beforeShow: function () { + this.$overlay = $("
").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 ? '' : '') + ''); epgd.$menu.append(''); - epgd.$menu.append(''); + epgd.$menu.append(''); } epgd.profile.needLogin == "1" && epgd.$menu.append('