From 958739d6b84d31402b01ec1b7048cd5ccb59f5e4 Mon Sep 17 00:00:00 2001 From: Andreas Mair Date: Wed, 30 Dec 2009 14:29:12 +0100 Subject: =?UTF-8?q?2009-12-30:=203.6.5=20-=20Changed:=20use=20HTTP::Date?= =?UTF-8?q?=20for=20HTTP=20date/time=20formatting=20(Ville=20Skytt=C3=A4).?= =?UTF-8?q?=20-=20Improved:=20Create=20fewer=20SVDRP=20connections=20(Vill?= =?UTF-8?q?e=20Skytt=C3=A4).=20-=20Fixed:=20some=20jslint=20warnings=20in?= =?UTF-8?q?=20javascript=20files=20(Ville=20Skytt=C3=A4).=20-=20Improved:?= =?UTF-8?q?=20Config=20file=20read/write=20error=20handling=20(Ville=20Sky?= =?UTF-8?q?tt=C3=A4).=20-=20Improved:=20Send=20Last-Modified=20header=20fo?= =?UTF-8?q?r=20static=20resources=20(Ville=20Skytt=C3=A4).=20-=20Added:=20?= =?UTF-8?q?"-l"=20and=20"--log"=20parameter.=20-=20Changed:=20"-nf"=20opti?= =?UTF-8?q?on=20to=20"-n".=20-=20Changed:=20Logging.=20-=20Added:=20"--ssl?= =?UTF-8?q?"=20switch=20to=20accept=20https=20instead=20of=20http.=20-=20A?= =?UTF-8?q?dded:=20Find=20VDR=201.7.2+=20TS=20recordings.=20-=20Updated:?= =?UTF-8?q?=20Italian=20translation=20(Submitted=20by=20Diego=20Pierotto).?= =?UTF-8?q?=20-=20Fixed:=20epgsearch=20uses=20seconds=20in=20aux=20field?= =?UTF-8?q?=20of=20timers,=20not=20minutes=20(Reported=20by=20Rincewind99?= =?UTF-8?q?=20@vdr-portal.de).=20-=20Fix=20bug=20#507=20"EPGsearch=20custo?= =?UTF-8?q?m=20categories=20no=20longer=20show".=20-=20Fixed:=20Saving=20t?= =?UTF-8?q?he=20config=20showed=20error=20message=20"1".=20-=20Reworked:?= =?UTF-8?q?=20Spanish=20translation=20(Submitted=20by=20Manuel=20Gomez).?= =?UTF-8?q?=20-=20Fixed:=20failing=20check=20whether=20the=20process=20wit?= =?UTF-8?q?h=20our=20pid=20is=20a=20vdradmind=20(Ville=20Skytt=C3=A4)=20-?= =?UTF-8?q?=20Fixed:=20always=20exit=20with=20status=201=20from=20--kill?= =?UTF-8?q?=20if=20no=20processes=20were=20killed=20(Ville=20Skytt=C3=A4)?= =?UTF-8?q?=20-=20Improved:=20pid=20file=20error=20handling=20(Ville=20Sky?= =?UTF-8?q?tt=C3=A4)=20-=20Added:=20autotimer=20schedule=20change=20tracki?= =?UTF-8?q?ng=20option=20in=20UI=20(Ville=20Skytt=C3=A4)=20-=20Fixed:=20us?= =?UTF-8?q?e=20text/javascript=20for=20JavaScript=20in=20HTTP=20headers=20?= =?UTF-8?q?(Ville=20Skytt=C3=A4)=20-=20Updated:=20required=20Perl=20module?= =?UTF-8?q?=20documentation=20(Ville=20Skytt=C3=A4)=20-=20Improved:=20temp?= =?UTF-8?q?late=20caching=20options=20(stat=20ttl,=20default=20cache=20dir?= =?UTF-8?q?=20is=20now=20/var/cache/vdradmin)=20(Ville=20Skytt=C3=A4)=20-?= =?UTF-8?q?=20Improved:=20error=20message=20when=20binding=20the=20server?= =?UTF-8?q?=20socket=20fails=20(Ville=20Skytt=C3=A4)=20-=20Improved:=20war?= =?UTF-8?q?n=20if=20log=20file=20cannot=20be=20written=20to=20(Ville=20Sky?= =?UTF-8?q?tt=C3=A4)=20-=20Fixed:=20don't=20try=20to=20delete=20pid=20file?= =?UTF-8?q?=20in=20non-daemon=20mode.=20-=20Improved:=20include=20reason?= =?UTF-8?q?=20in=20pid=20file=20deletion=20error=20message=20(Ville=20Skyt?= =?UTF-8?q?t=C3=A4).=20-=20Added:=20ability=20to=20log=20to=20syslog=20("L?= =?UTF-8?q?OGFILE=20=3D=20syslog"=20in=20config)=20(Ville=20Skytt=C3=A4).?= =?UTF-8?q?=20-=20Changed:=20non-daemon=20mode=20(-nf)=20always=20turns=20?= =?UTF-8?q?on=20logging=20to=20stderr=20(Ville=20Skytt=C3=A4).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/default/about.html | 4 +- template/default/config.html | 7 + template/default/help_at_timer_new.html | 6 +- template/default/help_config.html | 8 +- template/default/library.js | 15 +- template/default/timeline.js | 371 ++++++++++++++++---------------- 6 files changed, 218 insertions(+), 193 deletions(-) (limited to 'template/default') diff --git a/template/default/about.html b/template/default/about.html index 81c9faa..1406bfe 100644 --- a/template/default/about.html +++ b/template/default/about.html @@ -20,7 +20,7 @@

- VDRAdmin-AM © 2005-2008 Andreas Mair. + VDRAdmin-AM © 2005-2010 Andreas Mair.

This program is free software; you can redistribute it and/or modify
@@ -78,7 +78,7 @@

- Rüdiger Jung + Rüdiger Jung, Manuel Gomez
diff --git a/template/default/config.html b/template/default/config.html index c40e4ba..ee1bbce 100644 --- a/template/default/config.html +++ b/template/default/config.html @@ -240,6 +240,13 @@ checked="checked" /> + +
+ + checked="checked" /> + checked="checked" /> + + diff --git a/template/default/help_at_timer_new.html b/template/default/help_at_timer_new.html index 6e1d88c..c4b48d9 100644 --- a/template/default/help_at_timer_new.html +++ b/template/default/help_at_timer_new.html @@ -30,7 +30,7 @@
-
Case doesn\'t matter, "X-Files" matches anything "x-files" will match. You can set multiple search items by separating them with spaces. Only broadcasts will match if they contain all items.
You\'d better only use letters and numbers for search items, as the EPG often miss colons, brackets and other characters.
Experts can also use regular expressions, but you have to get needed information from the VDRAdmin-AM sources (undocumented feature).

You can exclude broadcasts so that they don\'t get recorded even if they would match an AutoTimer. Therefore you have to enter that titles into the file vdradmind.bl, one event a line. This file must be located in your VDRAdmin-AM\'s configuration folder. If this string is found either in the EPG\'s title or in title~subtitle, this event will not be programmed by AutoTimer. So you can disable complete episodes (for example when using "Enterprise" as Blacklist-string) or only one episode (when using "Enterprise~Azati Prime" as Blacklist-string).') %?>
+
Case doesn\'t matter, "X-Files" matches anything "x-files" will match. You can set multiple search items by separating them with spaces. Broadcasts will match only if they match all configured search items.
You\'d better only use letters and numbers for search items, as the EPG often miss colons, brackets and other characters.
Experts can also use regular expressions, but you have to get needed information from the VDRAdmin-AM sources (undocumented feature).

You can exclude broadcasts so that they don\'t get recorded even if they would match an AutoTimer. Therefore you have to enter that titles into the file vdradmind.bl, one event a line. This file must be located in your VDRAdmin-AM\'s configuration folder. If this string is found either in the EPG\'s title or in title~subtitle, this event will not be programmed by AutoTimer. So you can disable complete episodes (for example when using "Enterprise" as blacklist string) or only one episode (when using "Enterprise~Azati Prime" as blacklist string).') %?>
@@ -44,9 +44,9 @@
-
+
-
+
0...99, defining the priority of this timer and of recordings created by this timer. 0 represents the lowest value, 99 the highest. The priority is used to decide which timer shall be started in case there are two or more timers with the exact same start time. The first timer in the list with the highest priority will be used.

This value is also stored with the recording and is later used to decide which recording to remove from disk in order to free space for a new recording. If the disk runs full and a new recording needs more space, an existing recording with the lowest priority (and which has exceeded its guaranteed lifetime) will be removed.

If all available DVB cards are currently occupied, a timer with a higher priority will interrupt the timer with the lowest priority in order to start recording.') %?>
diff --git a/template/default/help_config.html b/template/default/help_config.html index f4a360c..3b54b25 100644 --- a/template/default/help_config.html +++ b/template/default/help_config.html @@ -98,9 +98,9 @@
guaranteed lifetime (in days) of a recording created by this timer. 0 means that this recording may be automatically deleted at any time by a new recording with higher priority. 99 means that this recording will never be automatically deleted. Any number in the range 1...98 means that this recording may not be automatically deleted in favour of a new recording, until the given number of days since the start time of the recording has passed by.') %?>
-
+
-
+
@@ -126,9 +126,9 @@
guaranteed lifetime (in days) of a recording created by this timer. 0 means that this recording may be automatically deleted at any time by a new recording with higher priority. 99 means that this recording will never be automatically deleted. Any number in the range 1...98 means that this recording may not be automatically deleted in favour of a new recording, until the given number of days since the start time of the recording has passed by.') %?>
-
+
-
+
diff --git a/template/default/library.js b/template/default/library.js index 29bbe42..ee9daf2 100644 --- a/template/default/library.js +++ b/template/default/library.js @@ -1,3 +1,5 @@ +/*jslint browser: true */ + // // this is part of VDR Admin // @@ -7,12 +9,16 @@ function open_help(url) { function del(message, suffix) { check=confirm(message); - if(check) window.location.href=suffix; + if(check) { + window.location.href=suffix; + } } function change(message, suffix) { check=confirm(message); - if(check) window.location.href=suffix; + if(check) { + window.location.href=suffix; + } } function mdel(but, message) { @@ -37,7 +43,8 @@ function AllMessages(myform) { for (var x = 0; x < myform.elements.length; x++) { var y = myform.elements[x]; - if (y.name != 'SELALL') - y.checked = myform.SELALL.checked; + if (y.name != 'SELALL') { + y.checked = myform.SELALL.checked; + } } } diff --git a/template/default/timeline.js b/template/default/timeline.js index 72a654b..8f6053e 100644 --- a/template/default/timeline.js +++ b/template/default/timeline.js @@ -1,33 +1,35 @@ +/*jslint browser: true, evil: true, laxbreak: true */ + /*##########################################################################*/ /* Browser independent size detection */ /*##########################################################################*/ -function GetWindowW() +function GetWindowW() { - if (window.innerWidth) + if (window.innerWidth) { return window.innerWidth; - } - else if (document.body && document.body.offsetWidth) + } + else if (document.body && document.body.offsetWidth) { return document.body.offsetWidth; - } - else + } + else { return 0; } } -function GetWindowH() +function GetWindowH() { - if (window.innerHeight) + if (window.innerHeight) { return window.innerHeight; - } - else if (document.body && document.body.offsetHeight) + } + else if (document.body && document.body.offsetHeight) { return document.body.offsetHeight; - } - else + } + else { return 0; } @@ -62,6 +64,18 @@ function ChannelInfo(vdr_id, name, url, events) this.events = events; } +function format_date(fmt, time) +{ + if (fmt == "%H:%M") + { + var date = new Date(time * 1000); + var h = '0' + date.getHours(); + var m = '0' + date.getMinutes(); + return h.substr(h.length-2, 2) + ':' + m.substr(m.length-2, 2); + } + return "[WRONG_FMT:" + fmt + "]"; +} + function EPGEvent(epg_id, start_sec, stop_sec, title, timer, summary) { this.epg_id = epg_id; @@ -74,27 +88,12 @@ function EPGEvent(epg_id, start_sec, stop_sec, title, timer, summary) this.summary = summary; } -function format_date(fmt, time) -{ - var date = new Date(time * 1000); - switch (fmt) - { - case "%H:%M": - { - var h = '0' + date.getHours(); - var m = '0' + date.getMinutes(); - return h.substr(h.length-2, 2) + ':' + m.substr(m.length-2, 2); - } - } - return "[WRONG_FMT:" + fmt + "]"; -} - function SetTimeLine(_this, _table_w, _px_per_min, _end_min) { _this.name_w = 100; _this.table_w = _table_w; _this.px_per_min = _px_per_min; - + _this.end_min = Div(_this.table_w - _this.name_w, _this.px_per_min); if (_this.end_min > _end_min) { @@ -104,9 +103,9 @@ function SetTimeLine(_this, _table_w, _px_per_min, _end_min) _this.end_min -= _this.end_min % 30; _this.event_w = _this.end_min * _this.px_per_min; _this.name_w = _this.table_w - _this.event_w; - + _this.end_sec = _this.start_sec + _this.end_min * 60; - + _this.first_sec = _this.now_sec + 1799 - _this.end_min * 60; _this.first_sec -= _this.first_sec % 1800; _this.last_sec = _this.first_sec + 86400; @@ -117,11 +116,11 @@ function TimeLine(_req_sec, _now_url, _px_per_min, _end_min) this.now_url = _now_url; this.org_px_per_min = _px_per_min; this.org_end_min = _end_min; - + this.req_sec = _req_sec; this.start_sec = _req_sec - _req_sec % 1800; this.min5_h = 10; - + var d = new Date(); this.now_sec = Div(d.getTime(), 1000); @@ -157,69 +156,26 @@ function BuildHiddenFrameInput() W(''); } -function BuildContent() -{ - /* Write content div */ - BuildContentDiv(); - - /* Check if the width has changed due to vertical scrollbar */ - var tab = document.getElementById("heading"); - var table_w; - if (tab) - { - table_w = tab.clientWidth; - } - else - { - table_w = this.innerWidth; - } - - if (tl.table_w > table_w) - { - /* Recalculate all data for new table width */ - SetTimeLine(tl, table_w, tl.org_px_per_min, tl.org_end_min); - - /* Delete first content div */ - tab = document.getElementById("content"); - tab.innerHTML = null; - - /* Write second content div */ - BuildContentDiv(); - } -} - -function BuildContentDiv() -{ - W('
'); - - W(''); - BuildHeader(); - BuildTable(); - W('
'); - - DrawTimeLine(); - W('
'); -} - function BuildHeader() { W(''); W(''); W('

'); - W(format_date('%H:%M', tl.start_sec) + ' ' + trans.o_clock - + ' ' + trans.to + ' ' + W(format_date('%H:%M', tl.start_sec) + ' ' + trans.o_clock + + ' ' + trans.to + ' ' + format_date('%H:%M', tl.end_sec) + ' ' + trans.o_clock); W('

'); W('
'); W(''); W(''); + var diff_sec; if (tl.start_sec < tl.first_sec + 1800) { W(''); } else { - var diff_sec = tl.start_sec - tl.end_min * 60; + diff_sec = tl.start_sec - tl.end_min * 60; if (diff_sec < tl.first_sec) { diff_sec = tl.first_sec; @@ -234,7 +190,7 @@ function BuildHeader() } else { - var diff_sec = tl.end_sec; + diff_sec = tl.end_sec; W(''); W(''); W(''); @@ -243,14 +199,29 @@ function BuildHeader() W(''); } -function BuildTable() +function DrawTimeLine() { - W(''); - W(''); - BuildTimeScale(); - BuildProgTable(); - W(''); - W(''); + var tab = document.getElementById("row_timeline"); + if (tab && (tl.start_sec <= tl.now_sec) && (tl.now_sec < tl.end_sec)) + { + var x = tl.name_w + tl.px_per_min * Div(tl.now_sec - tl.start_sec, 60) + 1; + var y = tab.offsetTop; + var h = tab.offsetHeight; + var style = "position:absolute; " + + "top:" + y + "px; " + + "left:" + x + "px; " + + "width:1px; " + + "height:" + h + "px; " + + "z-index:2; "; + if (document.all) + { + style = style + "filter:Alpha(opacity=50); "; + } + + W(''); + W(' '); + W(''); + } } function BuildTimeScale() @@ -258,10 +229,12 @@ function BuildTimeScale() W(''); W(''); W(''); + var c; + var w; for (var min = 0; min < tl.end_min; min += 30) { - var c = min % 60 ? 'color1' : 'color2'; - var w = tl.px_per_min * (tl.end_min - min < 30) ? tl.end_min - min : 30; + c = min % 60 ? 'color1' : 'color2'; + w = tl.px_per_min * (tl.end_min - min < 30) ? tl.end_min - min : 30; var t = tl.start_sec + min * 60; W(''); W(''); W(''); - for (var min = 0; min < tl.end_min; min += 5) + for (min = 0; min < tl.end_min; min += 5) { - var c = min % 10 ? 'color1' : 'color2'; - var w = tl.px_per_min * 5; + c = min % 10 ? 'color1' : 'color2'; + w = tl.px_per_min * 5; W(''); @@ -283,14 +256,63 @@ function BuildTimeScale() W('
'); W('
'); @@ -271,10 +244,10 @@ function BuildTimeScale() W('
'); W('
'); W('
'); } -function BuildProgTable() +function BuildSpacer(width) { - W(''); - for (var i = 0; i < channels.length; i++) - { - var c = "prgname " + (i % 2 ? "color1" : "color2"); - BuildChannel(channels[i], c); - } + W('
'); + W(''); + W(''); + W(''); + W('
'); + W('
'); + W(''); + W(' '); + W(''); + W('
'); +} + +function BuildNoEPG(event, width) +{ + W(''); + W(''); + W(''); + W(''); + W('
'); + W('
'); + W(''); + W(event.title); + W(''); + W('
'); +} + +function BuildEvent(vdr_id, counter, event, td_class, px_w) +{ + var table_class = event.timer ? "timertable" : "prgtable"; + W(''); + W(''); + W(''); + W(''); W('
'); + W('
'); + W(''); + var anchor_start = ""; + var anchor_end = ""; + if (event.summary) + { + anchor_start = ''; + anchor_end = ''; + } + W(anchor_start); + W(event.title); + W(anchor_end); + W(''); + W('
'); } @@ -306,22 +328,25 @@ function BuildChannel(channel, td_class) W(''); W(''); W(''); - + /* Events */ W(''); W(''); var old_stop_min = 0; if (channel.events[0].start_sec > 0) - { + { for (var i = 0; i < channel.events.length; i++) { var event = channel.events[i]; - + /* Calculate event start and stop time in minutes from table begin. */ var start_min = Div(event.start_sec - tl.start_sec, 60); var stop_min = Div(event.stop_sec - tl.start_sec, 60); - if (start_min >= tl.end_min) break; - + if (start_min >= tl.end_min) + { + break; + } + /* Adjust times to regard end of last event and end of table. */ td_class = ""; if (start_min < old_stop_min) @@ -332,11 +357,17 @@ function BuildChannel(channel, td_class) td_class = "color_spacer"; /* overlapped event */ } } - if (stop_min > tl.end_min) stop_min = tl.end_min; - + if (stop_min > tl.end_min) + { + stop_min = tl.end_min; + } + /* Ignore completely overlapped events. */ - if (start_min >= stop_min) continue; - + if (start_min >= stop_min) + { + continue; + } + if (!td_class) { if (event.timer) @@ -356,12 +387,12 @@ function BuildChannel(channel, td_class) td_class = "color_broadcast"; } } - + if (start_min > old_stop_min + 1) { BuildSpacer((start_min - old_stop_min) * tl.px_per_min); } - + var px_w = (stop_min - start_min) * tl.px_per_min; BuildEvent(channel.vdr_id, i, event, td_class, px_w); old_stop_min = stop_min; @@ -374,93 +405,73 @@ function BuildChannel(channel, td_class) else { BuildNoEPG(channel.events[0], tl.end_min * tl.px_per_min); - } + } W(''); W(''); W(''); } -function BuildSpacer(width) +function BuildProgTable() { - W(''); - W(''); - W(''); - W(''); + W('
'); - W('
'); - W(''); - W(' '); - W(''); - W('
'); + for (var i = 0; i < channels.length; i++) + { + var c = "prgname " + (i % 2 ? "color1" : "color2"); + BuildChannel(channels[i], c); + } W('
'); } -function BuildEvent(vdr_id, counter, event, td_class, px_w) +function BuildTable() { - var table_class = event.timer ? "timertable" : "prgtable"; - W(''); - W(''); - W(''); - W(''); - W('
'); - W('
'); - W(''); - var anchor_start = ""; - var anchor_end = ""; - if (event.summary) - { - anchor_start = ''; - anchor_end = ''; - } - W(anchor_start); - W(event.title); - W(anchor_end); - W(''); - W('
'); + W(''); + W(''); + BuildTimeScale(); + BuildProgTable(); + W(''); + W(''); } -function BuildNoEPG(event, width) +function BuildContentDiv() { - W(''); - W(''); - W(''); - W(''); - W('
'); - W('
'); - W(''); - W(event.title); - W(''); - W('
'); + W('
'); + + W(''); + BuildHeader(); + BuildTable(); + W('
'); + + DrawTimeLine(); + W('
'); } -function DrawTimeLine() +function BuildContent() { - var tab = document.getElementById("row_timeline"); - if (tab && (tl.start_sec <= tl.now_sec) && (tl.now_sec < tl.end_sec)) + /* Write content div */ + BuildContentDiv(); + + /* Check if the width has changed due to vertical scrollbar */ + var tab = document.getElementById("heading"); + var table_w; + if (tab) { - var x = tl.name_w + tl.px_per_min * Div(tl.now_sec - tl.start_sec, 60) + 1; - var y = tab.offsetTop; - var h = tab.offsetHeight; - var style = "position:absolute; " - + "top:" + y + "px; " - + "left:" + x + "px; " - + "width:1px; " - + "height:" + h + "px; " - + "z-index:2; "; - if (document.all) - { - style = style + "filter:Alpha(opacity=50); "; - } + table_w = tab.clientWidth; + } + else + { + table_w = this.innerWidth; + } - W(''); - W(' '); - W(''); + if (tl.table_w > table_w) + { + /* Recalculate all data for new table width */ + SetTimeLine(tl, table_w, tl.org_px_per_min, tl.org_end_min); + + /* Delete first content div */ + tab = document.getElementById("content"); + tab.innerHTML = null; + + /* Write second content div */ + BuildContentDiv(); } } -- cgit v1.2.3