summaryrefslogtreecommitdiff
path: root/javascript
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2007-05-08 22:59:40 +0000
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2007-05-08 22:59:40 +0000
commit70f268b6fff0037cbff265cf849663755223ffed (patch)
tree26806a8fa7fe319be310ba12266c80e2b2fee34a /javascript
parent805c2d6fec9d9b88d9d3d6e4cd8dcac33d062533 (diff)
downloadvdr-plugin-live-70f268b6fff0037cbff265cf849663755223ffed.tar.gz
vdr-plugin-live-70f268b6fff0037cbff265cf849663755223ffed.tar.bz2
- Control recordings playback from Infobox
- Added button images (Buttons by skiller2k1) - Made recordings look more like schedule - Made all tables 100% width to have a common look over all pages - some cleanup in ajax xml responses - common file for xmlresponses - Added translations for recordings related strings - Javascript updates in vdr_status.js for new playback control functions - Added tasks for playback control actions
Diffstat (limited to 'javascript')
-rw-r--r--javascript/vdr_status.js37
1 files changed, 36 insertions, 1 deletions
diff --git a/javascript/vdr_status.js b/javascript/vdr_status.js
index 073d568..d9505e3 100644
--- a/javascript/vdr_status.js
+++ b/javascript/vdr_status.js
@@ -39,6 +39,25 @@ function LiveStatusRequest(url, containerid)
function LiveStatusShowInfo(xmldoc, containerId)
{
+ var infoType = xmldoc.getElementsByTagName('type').item(0);
+
+ var channel = document.getElementById(containerId + '_channel_buttons');
+ var playback = document.getElementById(containerId + '_recording_buttons');
+
+ if (infoType.firstChild.nodeValue != "channel") {
+ channel.style.display = 'none';
+ playback.style.display = 'block';
+ LiveStatusSetTextContent(containerId, 'pause', infoType.firstChild.nodeValue);
+ LiveStatusSetTextContent(containerId, 'play', infoType.firstChild.nodeValue);
+ LiveStatusSetTextContent(containerId, 'rwd', infoType.firstChild.nodeValue);
+ LiveStatusSetTextContent(containerId, 'ffw', infoType.firstChild.nodeValue);
+ LiveStatusSetTextContent(containerId, 'stop', infoType.firstChild.nodeValue);
+ }
+ else {
+ playback.style.display = 'none';
+ channel.style.display = 'block';
+ }
+
var epgInfo = xmldoc.getElementsByTagName('epginfo').item(0);
for (var i = 0; i < epgInfo.childNodes.length; i++) {
@@ -89,6 +108,22 @@ function LiveStatusSetTextContent(containerId, nodeName, textContent)
else {
docNode.style.visibility = "hidden";
}
+ break;
+ }
+ case "pause":
+ case "play":
+ case "rwd":
+ case "ffw":
+ case "stop":
+ {
+ if (textContent != "") {
+ docNode.href = "javascript:LiveSimpleAjaxRequest('" + nodeName + "_recording.xml', 'param', '" + textContent + "');";
+ docNode.style.visibility = "visible";
+ }
+ else {
+ docNode.style.visibility = "hidden";
+ }
+ break;
}
default:
break;
@@ -110,6 +145,6 @@ function LiveStatusToggleUpdate()
var img = document.getElementById('statusReloadBtn');
if (img != null) {
// change image according to state.
- img.src = vst_reload ? 'stop.png' : 'reload.png';
+ img.src = vst_reload ? 'stop_update.png' : 'reload.png';
}
}