summaryrefslogtreecommitdiff
path: root/template/default/tv.html
diff options
context:
space:
mode:
authorAndreas Mair <amair.sob@googlemail.com>2006-03-14 12:14:10 +0100
committerAndreas Mair <amair.sob@googlemail.com>2006-03-14 12:14:10 +0100
commitdddf3a10680874dc1950995b6c09446915df81ca (patch)
tree5c621b1a3e5660888faf01c929c4e3ad16fc780b /template/default/tv.html
parent2723bd07c1a821c2198f43a313570c600907c327 (diff)
downloadvdradmin-am-3.4.4beta2.tar.gz
vdradmin-am-3.4.4beta2.tar.bz2
2006-03-14: 3.4.4beta2v3.4.4beta2
- Reworked TV grabbing. - Added optional parameters for TV for use with external tools: http://vdradmin-am.ip?aktion=tv_show&size=[full|half|quarter]&interval=[0|1|2|3|5|10|30|60]&tv_only=bla - Fixed program switching in prog_summary, prog_list and prog_detail (Based on suggestions by kayser). - New: buttons to move to previous/next day in timers_list (Requested by BigDiSt). - Moved "help" menu into "about" menu. - Added VDR's "commands.conf" conntent to select box in navigation menu. - Changed defaults for "autotimer checking" in timers as they had been in v3.4.3. - New button on remote controls: Mute (Requested by RĂ¼diger Jung and Hardy Flor). - Timeline in timer_list will show timers of current day even if a timer starts the day before (Reported by Hardy Flor).
Diffstat (limited to 'template/default/tv.html')
-rw-r--r--template/default/tv.html46
1 files changed, 27 insertions, 19 deletions
diff --git a/template/default/tv.html b/template/default/tv.html
index 54c651e..24ad372 100644
--- a/template/default/tv.html
+++ b/template/default/tv.html
@@ -12,8 +12,9 @@
<script type="text/javascript" language="JavaScript">
<!--
var aktiv;
- var interval = 5;
- var size = "half";
+ var timeout;
+ var interval = <tmpl_var interval>;
+ var size = "<tmpl_var size>";
function switch_by_select() {
for (i = 0; i < document.forms[0].channel.length; ++i)
@@ -26,19 +27,21 @@
function switch_channel(url) {
Now = new Date();
- document.switchimage.src = url + "&" + Now.getTime();
- window.setTimeout("WebcamUpdate()", 500);
+ document.switchimage.src = url + "&rand=" + Now.getTime();
+ timeout = window.setTimeout("WebcamUpdate()", 500);
}
function WebcamUpdate() {
- Now = new Date();
- NewPicUrl = "<tmpl_var url>&size=" + size + "&" + Now.getTime();
+ Before = new Date();
+ NewPicUrl = "<tmpl_var url>&size=" + size + "&rand=" + Before.getTime();
document.Bild.src = NewPicUrl;
+ After = new Date();
+ timeout = window.setTimeout("WebcamUpdate()", (interval * 1000) - (After - Before));
}
function go() {
WebcamUpdate();
- v_Start();
+// v_Start();
}
function v_Start() {
@@ -46,7 +49,8 @@
}
function v_Stop() {
- window.clearInterval(aktiv);
+// window.clearInterval(aktiv);
+ cleanTimeout(timeout);
}
function v_changeInterval(val) {
@@ -81,6 +85,7 @@
<tr>
<td align="center" valign="middle"><img name="Bild" src="<tmpl_var url>" border="1" hspace="2" vspace="2" /></td>
<td><img src="bilder/spacer.gif" name="switchimage" width="2" height="1" /></td>
+<tmpl_unless tv_only>
<td valign="top">
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
@@ -168,7 +173,7 @@
</tr>
<tr>
<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&amp;key=VolumeMinus');"><img src="bilder/fern_39.jpg" alt="" height="27" width="67" border="0" /></a></td>
- <td></td>
+ <td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&amp;key=mute');"><img src="bilder/fern_mute.jpg" alt="" height="27" width="67" border="0" /></a></td>
<td><a href="javascript:switch_channel('./vdradmin.pl?aktion=rc_hitk&amp;key=VolumePlus');"><img src="bilder/fern_40.jpg" alt="" height="27" width="67" border="0" /></a></td>
</tr>
<tr>
@@ -186,7 +191,9 @@
</select>
<!-- <a class="submit" href="javascript:switch_by_select();">Switch</a>-->
</td>
+</tmpl_unless>
</tr>
+<tmpl_unless tv_only>
<tr>
<td colspan="4"></td>
</tr>
@@ -195,20 +202,20 @@
<h5><%! Interval: !%></h5>
<select name="Seconds" class="submit" onChange="v_changeInterval(this.options[this.selectedIndex].value)">
<option value="0"><%! off !%></option>
- <option value="1"> 1 <%! sec. !%></option>
- <option value="2"> 2 <%! sec. !%></option>
- <option value="3"> 3 <%! sec. !%></option>
- <option value="5" selected> 5 <%! sec. !%></option>
- <option value="10">10 <%! sec. !%></option>
- <option value="30">30 <%! sec. !%></option>
- <option value="60">60 <%! sec. !%></option>
+ <option value="1" <tmpl_if expr="interval == 1">selected="selected"</tmpl_if>> 1 <%! sec. !%></option>
+ <option value="2" <tmpl_if expr="interval == 2">selected="selected"</tmpl_if>> 2 <%! sec. !%></option>
+ <option value="3" <tmpl_if expr="interval == 3">selected="selected"</tmpl_if>> 3 <%! sec. !%></option>
+ <option value="5" <tmpl_if expr="interval == 5">selected="selected"</tmpl_if>> 5 <%! sec. !%></option>
+ <option value="10" <tmpl_if expr="interval == 10">selected="selected"</tmpl_if>>10 <%! sec. !%></option>
+ <option value="30" <tmpl_if expr="interval == 30">selected="selected"</tmpl_if>>30 <%! sec. !%></option>
+ <option value="60" <tmpl_if expr="interval == 60">selected="selected"</tmpl_if>>60 <%! sec. !%></option>
</select>
<input type="button" class="submit" name="livebild" value='<%! G !%>' title="<%! Grab the picture! !%>" onClick="WebcamUpdate()" />
&nbsp;&nbsp;<h5><%! Size: !%></h5>
<select name="Size" class="submit" onChange="v_changeSize(this.options[this.selectedIndex].value)">
- <option value="full">1:1</option>
- <option value="half" selected>1:2</option>
- <option value="quarter">1:4</option>
+ <option value="full" <tmpl_if expr="size eq 'full'">selected="selected"</tmpl_if>>1:1</option>
+ <option value="half" <tmpl_if expr="size eq 'half'">selected="selected"</tmpl_if>>1:2</option>
+ <option value="quarter" <tmpl_if expr="size eq 'quarter'">selected="selected"</tmpl_if>>1:4</option>
</select>
<input type="button" class="submit" name="livebild" value='<%! G !%>' title="<%! Grab the picture! !%>" onClick="WebcamUpdate()" />
</td>
@@ -217,6 +224,7 @@
<tr>
<td colspan="4"></td>
</tr>
+</tmpl_unless>
</table>
</form>
</body>