summaryrefslogtreecommitdiff
path: root/web/js/kvm/msd.js
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2018-12-01 12:56:36 +0300
committerDevaev Maxim <[email protected]>2018-12-01 12:56:36 +0300
commita6d4545bafe750f894654fa3cddbfe15a89e6e6e (patch)
tree14534ad82d798575904813134f4d2360f9c024b1 /web/js/kvm/msd.js
parent5f7834724a48f28539a66b481772201f00147b31 (diff)
focus-based window manager
Diffstat (limited to 'web/js/kvm/msd.js')
-rw-r--r--web/js/kvm/msd.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/web/js/kvm/msd.js b/web/js/kvm/msd.js
index 057dec5b..4ce5d464 100644
--- a/web/js/kvm/msd.js
+++ b/web/js/kvm/msd.js
@@ -61,7 +61,7 @@ function Msd() {
__applyState();
});
__applyState();
- $(`msd-switch-to-${to}-button`).disabled = true;
+ ui.switchDisabled($(`msd-switch-to-${to}-button`), true);
};
var __selectNewImageFile = function() {
@@ -120,12 +120,12 @@ function Msd() {
$("msd-current-image-size").innerHTML = (__state.in_operate && __state.info.image ? __formatSize(__state.info.image.size) : "None");
$("msd-storage-size").innerHTML = (__state.in_operate ? __formatSize(__state.info.size) : "Unavailable");
- $("msd-switch-to-kvm-button").disabled = (!__state.in_operate || __state.connected_to === "kvm" || __state.busy);
- $("msd-switch-to-server-button").disabled = (!__state.in_operate || __state.connected_to === "server" || __state.busy);
- $("msd-select-new-image-button").disabled = (!__state.in_operate || __state.connected_to !== "kvm" || __state.busy || __upload_http);
- $("msd-upload-new-image-button").disabled = (!__state.in_operate || __state.connected_to !== "kvm" || __state.busy || !__image_file);
- $("msd-abort-uploading-button").disabled = (!__state.in_operate || !__upload_http);
- $("msd-reset-button").disabled = (!__state.in_operate || __upload_http);
+ ui.switchDisabled($("msd-switch-to-kvm-button"), (!__state.in_operate || __state.connected_to === "kvm" || __state.busy));
+ ui.switchDisabled($("msd-switch-to-server-button"), (!__state.in_operate || __state.connected_to === "server" || __state.busy));
+ ui.switchDisabled($("msd-select-new-image-button"), (!__state.in_operate || __state.connected_to !== "kvm" || __state.busy || __upload_http));
+ ui.switchDisabled($("msd-upload-new-image-button"), (!__state.in_operate || __state.connected_to !== "kvm" || __state.busy || !__image_file));
+ ui.switchDisabled($("msd-abort-uploading-button"), (!__state.in_operate || !__upload_http));
+ ui.switchDisabled($("msd-reset-button"), (!__state.in_operate || __upload_http));
$("msd-new-image").style.display = (__image_file ? "block" : "none");
$("msd-progress").setAttribute("data-label", "Waiting for upload ...");