From a8773eab1e8f82a7bd862492e5520dcb9690a5e0 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Mon, 27 Aug 2018 13:13:49 +0300 Subject: own modals - first implementation --- kvmd/web/js/msd.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kvmd/web/js/msd.js') diff --git a/kvmd/web/js/msd.js b/kvmd/web/js/msd.js index 1dfdd1d3..7652d4fe 100644 --- a/kvmd/web/js/msd.js +++ b/kvmd/web/js/msd.js @@ -65,7 +65,7 @@ function Msd() { var http = tools.makeRequest("POST", "/kvmd/msd/connect?to=" + to, function() { if (http.readyState === 4) { if (http.status !== 200) { - alert("Switch error:", http.responseText); + modal.error("Switch error:
", http.responseText); } } __applyState(); @@ -78,7 +78,7 @@ function Msd() { var el_input = $("msd-select-new-image-file"); var image_file = (el_input.files.length ? el_input.files[0] : null); if (image_file && image_file.size > __state.info.size) { - alert("New image is too big for your Mass Storage Device; maximum: " + __formatSize(__state.info.size)); + modal.error("New image is too big for your Mass Storage Device.
Maximum:", __formatSize(__state.info.size)); el_input.value = ""; image_file = null; } @@ -143,7 +143,7 @@ function Msd() { var __uploadStateChange = function() { if (__upload_http.readyState === 4) { if (__upload_http.status !== 200) { - alert("Can't upload image to the Mass Storage Device:", __upload_http.responseText); + modal.error("Can't upload image to the Mass Storage Device:
", __upload_http.responseText); } $("msd-select-new-image-file").value = ""; __image_file = null; -- cgit v1.2.3