summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorAndreas Mair <amair.sob@googlemail.com>2006-07-14 08:22:51 +0200
committerAndreas Mair <amair.sob@googlemail.com>2006-07-14 08:22:51 +0200
commit8652aa0a9b228e21df5dd68ccf83badb5e20bab8 (patch)
tree2035d01fe474c34aeac8d9307563be2bb58c9384 /template
parentf04236038448cce41ff2af10e2d0ccfcd8df378a (diff)
downloadvdradmin-am-3.4.6.tar.gz
vdradmin-am-3.4.6.tar.bz2
2006-07-14: 3.4.6v3.4.6
- No changes.
Diffstat (limited to 'template')
-rw-r--r--template/default/at_timer_list.html2
-rw-r--r--template/default/prog_list.html2
-rw-r--r--template/default/prog_list2.html2
-rw-r--r--template/default/prog_summary2.html2
-rw-r--r--template/default/prog_timeline.html61
-rw-r--r--template/default/rec_list.html2
-rw-r--r--template/default/style.css10
-rw-r--r--template/default/timeline.js180
-rw-r--r--template/default/timer_list.html2
9 files changed, 158 insertions, 105 deletions
diff --git a/template/default/at_timer_list.html b/template/default/at_timer_list.html
index 7408472..97ade6b 100644
--- a/template/default/at_timer_list.html
+++ b/template/default/at_timer_list.html
@@ -48,7 +48,7 @@
</form>
<form action="<tmpl_var url>" method="get" name="FormName">
- <table width="100%" border="0" cellspacing="0" cellpadding="0" id="content" class="list">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" id="content" class="list hilight">
<tr class="heading">
<td class="col_active <tmpl_if sortbyactive>selected</tmpl_if>">
<h2>
diff --git a/template/default/prog_list.html b/template/default/prog_list.html
index d0f5774..5bbdd3c 100644
--- a/template/default/prog_list.html
+++ b/template/default/prog_list.html
@@ -39,7 +39,7 @@
<div id="content">
<tmpl_loop loop>
<tmpl_if newd>
- <table width="100%" border="0" cellspacing="0" cellpadding="0" class="group">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" class="list hilight">
<tr class="heading">
<td colspan="2">
<span class="channel_name"><tmpl_var progname></span>
diff --git a/template/default/prog_list2.html b/template/default/prog_list2.html
index cd6f87b..c247819 100644
--- a/template/default/prog_list2.html
+++ b/template/default/prog_list2.html
@@ -47,7 +47,7 @@
<div id="content">
<tmpl_loop loop>
<tmpl_if newd>
- <table width="100%" border="0" cellspacing="0" cellpadding="0" class="group">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" class="list hilight">
<tr class="heading">
<td colspan="4">
<span class="channel_name"><a href="<tmpl_var proglink>" title="<%! Channels !%>"><tmpl_var channel_name></a></span>
diff --git a/template/default/prog_summary2.html b/template/default/prog_summary2.html
index 0a3d2c8..d9fa1a7 100644
--- a/template/default/prog_summary2.html
+++ b/template/default/prog_summary2.html
@@ -37,7 +37,7 @@
</table>
<input type="hidden" name="aktion" value="prog_summary" />
- <table border="0" cellspacing="0" cellpadding="0" width="100%" class="list" id="content">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%" class="list hilight" id="content">
<?%
tr_class = "row_odd";
olddate = "";
diff --git a/template/default/prog_timeline.html b/template/default/prog_timeline.html
index 69d3fff..6a23951 100644
--- a/template/default/prog_timeline.html
+++ b/template/default/prog_timeline.html
@@ -75,46 +75,9 @@
<script type="text/javascript" language="JavaScript1.2">
var trans = new Translation("<%! now !%>",
"<%! o'clock !%>",
- "<%! to !%>",
- "<%! Sunday !%>",
- "<%! Monday !%>",
- "<%! Tuesday !%>",
- "<%! Wednesday !%>",
- "<%! Thursday !%>",
- "<%! Friday !%>",
- "<%! Saturday !%>");
-
- function GetWindowW()
- {
- if (window.innerWidth)
- {
- return window.innerWidth;
- }
- else if (document.body && document.body.offsetWidth)
- {
- return document.body.offsetWidth;
- }
- else
- {
- return 0;
- }
- }
-
- function GetWindowH()
- {
- if (window.innerHeight)
- {
- return window.innerHeight;
- }
- else if (document.body && document.body.offsetHeight)
- {
- return document.body.offsetHeight;
- }
- else
- {
- return 0;
- }
- }
+ "<%! to !%>");
+ var redraw_w;
+ var redraw_h;
function Redraw()
{
@@ -182,32 +145,40 @@
</script>
<form action="<?% nowurl %?>" method="get" name="FormName">
+ <script type="text/javascript" language="JavaScript1.2">
+ var tl = new TimeLine(<?% now_sec %?>, "<?% nowurl %?>", <?% px_per_min %?>, <?% end_min %?>);
+ </script>
+
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="heading">
<tr>
<td class="col_title">
- <h1><?% now %?>&nbsp;<%! o'clock !%></h1>
+ <h1><?% date.format(now_sec, "%A,") %?>&nbsp;<?% now %?>&nbsp;<%! o'clock !%></h1>
</td>
<td class="col_other">
<%! What's on: !%>&nbsp;
<select name="Auswahl" class="submit" onChange="Go(this.form.Auswahl.options[this.form.Auswahl.options.selectedIndex].value)" width="100">
- <option value="<?% nowurl %?>">-</option>
<?% select_now = (now == date.format(date.now, '%H:%M')) %?>
- <option value="<?% nowurl %?>" <?% "selected" IF select_now %?>><%! now !%></option>
+ <script type="text/javascript" language="JavaScript1.2">
+ BuildOption("", 0, "-");
+ BuildOption("", <?% select_now ? 1 : 0 %?>, "<%! now !%>");
<?% FOREACH timer = times %?>
<?% timer_o_dopp = timer | replace('\:', '') %?>
- <option value="<?% nowurl %?>&amp;time=<?% timer_o_dopp %?>" <?% "selected" IF !select_now && (now == timer) %?>><?% timer %?></option>
+ BuildOption("<?% timer_o_dopp %?>", <?% !select_now && (now == timer) ? 1 : 0 %?>, "<?% timer %?>");
<?% END %?>
+ </script>
</select>
&nbsp;|&nbsp;<%! at: !%>&nbsp;
<input type="text" name="time" size="5" value="<?% now %?>" />
&nbsp;<%! o'clock !%>
<input type="hidden" name="aktion" value="prog_timeline" />
+ <script type="text/javascript" language="JavaScript1.2">
+ BuildHiddenFrameInput();
+ </script>
</td>
</tr>
</table>
<script type="text/javascript" language="JavaScript1.2">
- var tl = new TimeLine(<?% now_sec %?>, "<?% nowurl %?>", <?% px_per_min %?>, <?% end_min %?>);
BuildContent();
</script>
<noscript>
diff --git a/template/default/rec_list.html b/template/default/rec_list.html
index cce508d..d9d204a 100644
--- a/template/default/rec_list.html
+++ b/template/default/rec_list.html
@@ -36,7 +36,7 @@
</div>
<form action="<tmpl_var url>" method="get" name="FormName">
- <table width="100%" border="0" cellspacing="0" cellpadding="0" id="content" class="list">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" id="content" class="list hilight">
<!-- TODO: this breaks IE, but why?
<colgroup>
<col class="col_date"/>
diff --git a/template/default/style.css b/template/default/style.css
index 301e377..b43f408 100644
--- a/template/default/style.css
+++ b/template/default/style.css
@@ -143,6 +143,11 @@ body.help .heading {
.heading {
height: 17px;
}
+.list.hilight .row_even:hover,
+.list.hilight .row_odd:hover
+{
+ background-color: #8cc1da;
+}
.heading td {
background-color: #6d96a9;
height: 17px;
@@ -158,10 +163,11 @@ body.help .heading {
white-space: normal;
}
-.row_even td {
+#prog_summary .row_even .col_epg,
+.row_even {
background-color: #ffffff;
}
-.row_odd td {
+.row_odd {
background-color: #dee6ee;
}
diff --git a/template/default/timeline.js b/template/default/timeline.js
index 7dd5a53..b5bc510 100644
--- a/template/default/timeline.js
+++ b/template/default/timeline.js
@@ -1,4 +1,40 @@
/*##########################################################################*/
+/* Browser independent size detection */
+/*##########################################################################*/
+function GetWindowW()
+{
+ if (window.innerWidth)
+ {
+ return window.innerWidth;
+ }
+ else if (document.body && document.body.offsetWidth)
+ {
+ return document.body.offsetWidth;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+function GetWindowH()
+{
+ if (window.innerHeight)
+ {
+ return window.innerHeight;
+ }
+ else if (document.body && document.body.offsetHeight)
+ {
+ return document.body.offsetHeight;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+
+/*##########################################################################*/
/* Utility functions */
/*##########################################################################*/
function W(s)
@@ -11,15 +47,11 @@ function Div(x, y)
return (x - x % y) / y;
}
-function Translation(_now, _o_clock, _to,
- _sunday, _monday, _tuesday, _wednesday,
- _thursday, _friday, _saturday)
+function Translation(_now, _o_clock, _to)
{
this.now = _now;
this.o_clock = _o_clock;
this.to = _to;
- this.week_day = new Array(_sunday, _monday, _tuesday, _wednesday,
- _thursday, _friday, _saturday);
}
function ChannelInfo(vdr_id, name, url, events)
@@ -53,63 +85,111 @@ function format_date(fmt, time)
var m = '0' + date.getMinutes();
return h.substr(h.length-2, 2) + ':' + m.substr(m.length-2, 2);
}
- case "%A, %H:%M":
- {
- var d = trans.week_day[date.getDay()];
- var h = '0' + date.getHours();
- var m = '0' + date.getMinutes();
- return d + ", " + h.substr(h.length-2, 2) + ':' + m.substr(m.length-2, 2);
- }
}
return "[WRONG_FMT:" + fmt + "]";
}
-function TimeLine(_req_sec, _now_url, _px_per_min, _end_min)
+function SetTimeLine(_this, _table_w, _px_per_min, _end_min)
{
- this.now_url = _now_url;
+ _this.name_w = 100;
+ _this.table_w = _table_w;
+ _this.px_per_min = _px_per_min;
- this.name_w = 100;
- var tab = document.getElementById("heading");
- if (tab)
- {
- this.table_w = tab.clientWidth;
- }
- else
+ _this.end_min = Div(_this.table_w - _this.name_w, _this.px_per_min);
+ if (_this.end_min > _end_min)
{
- this.table_w = this.innerWidth - 8;
+ _this.px_per_min = Div(_this.table_w - _this.name_w, _end_min);
+ _this.end_min = _end_min;
}
- //this.table_w -= tab.offsetLeft;
- this.px_per_min = _px_per_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_min = Div(this.table_w - this.name_w, this.px_per_min);
- if (this.end_min > _end_min)
- {
- this.px_per_min = Div(this.table_w - this.name_w, _end_min);
- this.end_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.min5_h = 10;
+ _this.end_sec = _this.start_sec + _this.end_min * 60;
- var d = new Date();
- this.now_sec = Div(d.getTime(), 1000);
+ _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;
+}
+
+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.end_sec = this.start_sec + this.end_min * 60;
+ this.min5_h = 10;
- 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;
+ var d = new Date();
+ this.now_sec = Div(d.getTime(), 1000);
+
+ var table_w = GetWindowW();
+ if (!document.all)
+ {
+ table_w -= 8;
+ }
+ SetTimeLine(this, table_w, _px_per_min, _end_min);
}
/*##########################################################################*/
/* Build the HTML code */
/*##########################################################################*/
+function BuildOption(time, selected, text)
+{
+ W('<option value="' + tl.now_url);
+ if (time)
+ {
+ W('&amp;time=' + time + '&amp;frame=' + tl.first_sec);
+ }
+ W('"');
+ if (selected)
+ {
+ W(' selected');
+ }
+ W('>' + text + '</option>');
+}
+
+function BuildHiddenFrameInput()
+{
+ W('<input type="hidden" name="frame" value="' + tl.first_sec + '"/>');
+}
+
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('<div id="content">');
W('<table width="' + tl.table_w + '" border="0" cellspacing="0" cellpadding="0" class="bigtable list">');
@@ -126,7 +206,7 @@ function BuildHeader()
W('<tr class="heading">');
W('<td id="header_title" colspan="3">');
W('<h2>');
- W(format_date('%A, %H:%M', tl.start_sec) + '&nbsp;' + trans.o_clock
+ W(format_date('%H:%M', tl.start_sec) + '&nbsp;' + trans.o_clock
+ '&nbsp;' + trans.to + '&nbsp;'
+ format_date('%H:%M', tl.end_sec) + '&nbsp;' + trans.o_clock);
W('</h2>');
@@ -144,22 +224,18 @@ function BuildHeader()
{
diff_sec = tl.first_sec;
}
- W('<a href="' + tl.now_url + '&amp;time=' + format_date('%H:%M', diff_sec) + '">');
+ W('<a href="' + tl.now_url + '&amp;time=' + format_date('%H:%M', diff_sec) + '&amp;frame=' + tl.first_sec + '">');
W('<img src="bilder/pfeile_nachlinks.png" border="0" />');
W('</a>');
}
- if (tl.end_sec > tl.last_sec - 1800)
+ if (tl.end_sec >= tl.last_sec)
{
W('<img src="bilder/pfeile_nachrechts_soft.png" border="0" />');
}
else
{
var diff_sec = tl.end_sec;
- if (diff_sec > tl.last_sec - tl.end_min * 60 - 1800)
- {
- diff_sec = tl.last_sec - tl.end_min * 60;
- }
- W('<a href="' + tl.now_url + '&amp;time=' + format_date('%H:%M', diff_sec) + '">');
+ W('<a href="' + tl.now_url + '&amp;time=' + format_date('%H:%M', diff_sec) + '&amp;frame=' + tl.first_sec + '">');
W('<img src="bilder/pfeile_nachrechts.png" border="0" />');
W('</a>');
}
@@ -270,10 +346,10 @@ function BuildChannel(channel, td_class)
td_class = "color_current";
}
else if (event.summary)
- {
- td_class = "color_summary";
- }
- else
+ {
+ td_class = "color_summary";
+ }
+ else
{
td_class = "color_broadcast";
}
diff --git a/template/default/timer_list.html b/template/default/timer_list.html
index d40af55..17956e0 100644
--- a/template/default/timer_list.html
+++ b/template/default/timer_list.html
@@ -185,7 +185,7 @@
</form>
<form action="<tmpl_var url>" method="get" name="FormName">
- <table width="100%" border="0" cellspacing="0" cellpadding="0" class="list">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" class="list hilight">
<!-- TODO: this breaks IE, but why?
<colgroup>
<col class="col_active"/>