]> git.proxmox.com Git - mirror_novnc.git/blobdiff - vnc_auto.html
Change server example
[mirror_novnc.git] / vnc_auto.html
index ea1ca7b129b0fcbbe8b85a4ab71f806f7a76a179..e4fc46769d818cf6be2a9fba3dd80cd36cabaf82 100644 (file)
@@ -81,8 +81,7 @@
         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");