From dc905e859f197cca3360012119543bf310c63014 Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Tue, 31 Oct 2017 16:37:12 +0100 Subject: [PATCH] Move styling from vnc_lite.html to css This clears up some conflicting style attributes as well. HTML inline-styling is prioritized above css styling. --- app/styles/lite.css | 13 ++++++++++++- vnc_lite.html | 16 +++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/styles/lite.css b/app/styles/lite.css index 9e2cf8f9..8fe39e30 100644 --- a/app/styles/lite.css +++ b/app/styles/lite.css @@ -20,9 +20,13 @@ html { height:100%; } +#noVNC_status_bar { + margin-top:0px; +} + #noVNC_status { padding-top: 4px; - height:32px; + height: auto; text-align: center; color: #fff; font: bold 12px Helvetica; @@ -43,6 +47,13 @@ html { background: linear-gradient(#b4b41e 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); } +.noNVC_shown { + display: inline; +} +.noVNC_hidden { + display: none; +} + /* Do not set width/height for VNC_canvas or incorrect * scaling will occur. Canvas size depends on remote VNC * settings and noVNC settings. */ diff --git a/vnc_lite.html b/vnc_lite.html index 52b809b7..563ba168 100644 --- a/vnc_lite.html +++ b/vnc_lite.html @@ -106,7 +106,6 @@ var html; var form = document.createElement('form'); - form.style = 'margin-bottom: 0px'; form.innerHTML = '' form.innerHTML += ''; form.onsubmit = setPassword; @@ -146,7 +145,7 @@ default: level = "warn"; } - document.getElementById('noVNC_status_bar').setAttribute("class", "noVNC_status_" + level); + document.getElementById('noVNC_status_bar').className = "noVNC_status_" + level; document.getElementById('noVNC_status').textContent = text; } function updateState(rfb, state, oldstate) { @@ -206,13 +205,12 @@ var xvpbuttons; xvpbuttons = document.getElementById('noVNC_xvp_buttons'); if (ver >= 1) { - xvpbuttons.style.display = 'inline'; + xvpbuttons.className= "noVNC_shown"; } else { - xvpbuttons.style.display = 'none'; + xvpbuttons.className = "noVNC_hidden"; } } - document.getElementById('sendCtrlAltDelButton').style.display = "inline"; document.getElementById('sendCtrlAltDelButton').onclick = sendCtrlAltDel; document.getElementById('xvpShutdownButton').onclick = xvpShutdown; document.getElementById('xvpRebootButton').onclick = xvpReboot; @@ -280,15 +278,15 @@ -
+
-
+
Loading
- + id="sendCtrlAltDelButton" class="noVNC_shown"> +