summaryrefslogtreecommitdiff
path: root/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'javascript')
-rw-r--r--javascript/vdr_status.js58
1 files changed, 29 insertions, 29 deletions
diff --git a/javascript/vdr_status.js b/javascript/vdr_status.js
index d9505e3..158bc1a 100644
--- a/javascript/vdr_status.js
+++ b/javascript/vdr_status.js
@@ -8,35 +8,6 @@ var vst_timer;
var vst_boxId = null;
var vst_url = null;
-function LiveStatusRequest(url, containerid)
-{
- if (vst_url == null)
- {
- vst_url = url;
- }
- if (vst_boxId == null)
- vst_boxId = containerid;
-
- var status = new LiveAjaxCall("xml", url);
- status.oncomplete = function()
- {
- try {
- LiveStatusShowInfo(this.xml.responseXML, containerid);
- }
- catch (e) {
- LiveStatusReportError(e.message, containerid);
- }
- if (vst_reload)
- vst_timer = window.setTimeout("LiveStatusRequest('" + url + "', '" + containerid + "')", 1000);
- }
- status.onerror = function(message)
- {
- LiveStatusToggleUpdate();
- LiveStatusReportError(message, containerid);
- }
- status.request("update", vst_reload ? "1" : "0");
-}
-
function LiveStatusShowInfo(xmldoc, containerId)
{
var infoType = xmldoc.getElementsByTagName('type').item(0);
@@ -148,3 +119,32 @@ function LiveStatusToggleUpdate()
img.src = vst_reload ? 'stop_update.png' : 'reload.png';
}
}
+
+function LiveStatusRequest(url, containerid)
+{
+ if (vst_url == null)
+ {
+ vst_url = url;
+ }
+ if (vst_boxId == null)
+ vst_boxId = containerid;
+
+ var status = new LiveAjaxCall("xml", url);
+ status.oncomplete = function()
+ {
+ try {
+ LiveStatusShowInfo(this.xml.responseXML, containerid);
+ }
+ catch (e) {
+ LiveStatusReportError(e.message, containerid);
+ }
+ if (vst_reload)
+ vst_timer = window.setTimeout("LiveStatusRequest('" + url + "', '" + containerid + "')", 1000);
+ }
+ status.onerror = function(message)
+ {
+ LiveStatusToggleUpdate();
+ LiveStatusReportError(message, containerid);
+ }
+ status.request("update", vst_reload ? "1" : "0");
+}