WebUtil.load_scripts({
'core': ["base64.js", "websock.js", "des.js", "input/keysymdef.js",
"input/xtscancodes.js", "input/util.js", "input/devices.js",
- "display.js", "inflator.js", "rfb.js", "input/keysym.js"],
- 'app': [WebUtil.getLanguageFileLocation(), "webutil.js"]});
+ "display.js", "inflator.js", "rfb.js", "input/keysym.js"]});
var rfb;
var resizeTimeout;
var html;
html = '<form onsubmit="return setPassword();"';
html += ' style="margin-bottom: 0px">';
- html += msg;
+ html += '<label></label>'
html += '<input type=password size=10 id="password_input" class="noVNC_status">';
html += '<\/form>';
- status(html, "warn");
+
+ // bypass status() because it sets text content
+ document.getElementById('noVNC_status_bar').setAttribute("class", "noVNC_status_warn");
+ document.getElementById('noVNC_status').innerHTML = html;
+ document.getElementById('noVNC_status').querySelector('label').textContent = msg;
}
function setPassword() {
rfb.sendPassword(document.getElementById('password_input').value);
level = "warn";
}
document.getElementById('noVNC_status_bar').setAttribute("class", "noVNC_status_" + level);
- document.getElementById('noVNC_status').innerHTML = text;
+ document.getElementById('noVNC_status').textContent = text;
}
function updateState(rfb, state, oldstate) {
var cad = document.getElementById('sendCtrlAltDelButton');
switch (state) {
case 'connecting':
- status(Util.Localisation.get("Connecting"), "normal");
+ status("Connecting", "normal");
break;
case 'connected':
if (rfb && rfb.get_encrypt()) {
- status(Util.Localisation.
- get("Connected (encrypted) to ") +
+ status("Connected (encrypted) to " +
desktopName, "normal");
} else {
- status(Util.Localisation.
- get("Connected (unencrypted) to ") +
+ status("Connected (unencrypted) to " +
desktopName, "normal");
}
break;
case 'disconnecting':
- status(Util.Localisation.get("Disconnecting"), "normal");
+ status("Disconnecting", "normal");
break;
case 'disconnected':
- status(Util.Localisation.get("Disconnected"), "normal");
+ status("Disconnected", "normal");
break;
default:
status(state, "warn");