summaryrefslogtreecommitdiff
path: root/kvmd/web/js/stream.js
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/web/js/stream.js')
-rw-r--r--kvmd/web/js/stream.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/kvmd/web/js/stream.js b/kvmd/web/js/stream.js
index 6dad610a..288762be 100644
--- a/kvmd/web/js/stream.js
+++ b/kvmd/web/js/stream.js
@@ -12,29 +12,26 @@ var stream = new function() {
__prev_state = false;
$("stream-image").className = "stream-image-inactive";
$("stream-led").className = "led-off";
+ $("stream-reset-button").disabled = true;
} else if (!__prev_state) {
__refreshImage();
__prev_state = true;
$("stream-image").className = "stream-image-active";
$("stream-led").className = "led-on";
+ $("stream-reset-button").disabled = false;
}
}
});
setTimeout(stream.startPoller, 2000);
};
-// this.setActive = function(active) {
-// $("stream-image").className = (active ? "stream-image-active" : "stream-image-inactive");
-// };
-
- this.clickResetButton = function(el_button) {
- el_button.disabled = true;
+ this.clickResetButton = function() {
+ $("stream-reset-button").disabled = true;
var http = tools.makeRequest("POST", "/kvmd/streamer/reset", function() {
if (http.readyState === 4) {
if (http.status !== 200) {
alert("Can't reset stream:", http.responseText);
}
- el_button.disabled = false;
}
});
};