refactoring

This commit is contained in:
Devaev Maxim
2018-07-17 04:14:05 +03:00
parent 45bdfd111d
commit 1c4a6b0deb
4 changed files with 9 additions and 11 deletions

View File

@@ -28,13 +28,13 @@ var stream = new function() {
// };
this.clickResetButton = function(el_button) {
tools.setButtonBusy(el_button, true);
el_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);
}
tools.setButtonBusy(el_button, false);
el_button.disabled = false;
}
});
};