summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/recorder.js
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2021-07-29 02:11:44 +0300
committerMaxim Devaev <[email protected]>2021-07-29 02:11:44 +0300
commit02335734ceafa25c660110e1f8059ff60bcb6d84 (patch)
tree69e07e3031ae365fb2a509554f8a411a5d44d607 /web/share/js/kvm/recorder.js
parent33c34bd4efbb675ec0c700454c655575cffe26e9 (diff)
refactoring
Diffstat (limited to 'web/share/js/kvm/recorder.js')
-rw-r--r--web/share/js/kvm/recorder.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/web/share/js/kvm/recorder.js b/web/share/js/kvm/recorder.js
index 6057696a..e3b40667 100644
--- a/web/share/js/kvm/recorder.js
+++ b/web/share/js/kvm/recorder.js
@@ -41,14 +41,14 @@ export function Recorder() {
var __last_event_ts = 0;
var __init__ = function() {
- tools.setOnClick($("hid-recorder-record"), __startRecord);
- tools.setOnClick($("hid-recorder-stop"), __stopProcess);
- tools.setOnClick($("hid-recorder-play"), __playRecord);
- tools.setOnClick($("hid-recorder-clear"), __clearRecord);
+ tools.el.setOnClick($("hid-recorder-record"), __startRecord);
+ tools.el.setOnClick($("hid-recorder-stop"), __stopProcess);
+ tools.el.setOnClick($("hid-recorder-play"), __playRecord);
+ tools.el.setOnClick($("hid-recorder-clear"), __clearRecord);
$("hid-recorder-new-script-file").onchange = __uploadScript;
- tools.setOnClick($("hid-recorder-upload"), () => $("hid-recorder-new-script-file").click());
- tools.setOnClick($("hid-recorder-download"), __downloadScript);
+ tools.el.setOnClick($("hid-recorder-upload"), () => $("hid-recorder-new-script-file").click());
+ tools.el.setOnClick($("hid-recorder-download"), __downloadScript);
};
/************************************************************************/
@@ -241,14 +241,14 @@ export function Recorder() {
$("hid-recorder-led").title = "";
}
- wm.setElementEnabled($("hid-recorder-record"), (__ws && !__play_timer && !__recording));
- wm.setElementEnabled($("hid-recorder-stop"), (__ws && (__play_timer || __recording)));
- wm.setElementEnabled($("hid-recorder-play"), (__ws && !__recording && __events.length));
- wm.setElementEnabled($("hid-recorder-clear"), (!__play_timer && !__recording && __events.length));
- wm.setElementEnabled($("hid-recorder-loop-switch"), (__ws && !__recording));
+ tools.el.setEnabled($("hid-recorder-record"), (__ws && !__play_timer && !__recording));
+ tools.el.setEnabled($("hid-recorder-stop"), (__ws && (__play_timer || __recording)));
+ tools.el.setEnabled($("hid-recorder-play"), (__ws && !__recording && __events.length));
+ tools.el.setEnabled($("hid-recorder-clear"), (!__play_timer && !__recording && __events.length));
+ tools.el.setEnabled($("hid-recorder-loop-switch"), (__ws && !__recording));
- wm.setElementEnabled($("hid-recorder-upload"), (!__play_timer && !__recording));
- wm.setElementEnabled($("hid-recorder-download"), (!__play_timer && !__recording && __events.length));
+ tools.el.setEnabled($("hid-recorder-upload"), (!__play_timer && !__recording));
+ tools.el.setEnabled($("hid-recorder-download"), (!__play_timer && !__recording && __events.length));
__setCounters(__events.length, __events_time);
};