From 160fabf65c63d7339a8ba36d80825e0b27cf7ab1 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Tue, 15 Jun 2010 17:56:38 -0500 Subject: [PATCH] Disabled ctrlAltDel button when N/A. --- include/default_controls.js | 6 ++++++ vnc_auto.html | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/default_controls.js b/include/default_controls.js index b108931..b395c12 100644 --- a/include/default_controls.js +++ b/include/default_controls.js @@ -49,6 +49,7 @@ load: function(target) { html += '
Loading
'; html += '
'; html += '
Loading
@@ -39,13 +40,17 @@ Connect parameters are provided in query string: var s, sb, klass, html; s = $('VNC_status'); sb = $('VNC_status_bar'); + cad = $('sendCtrlAltDelButton'); switch (state) { - case 'failed': klass = "VNC_status_error"; break; + case 'failed': klass = "VNC_status_error"; break; case 'normal': klass = "VNC_status_normal"; break; case 'disconnected': klass = "VNC_status_normal"; break; - default: klass = "VNC_status_warn"; break; + default: klass = "VNC_status_warn"; break; } + if (state === "normal") { cad.disabled = false; } + else { cad.disabled = true; } + if (typeof(msg) !== 'undefined') { sb.setAttribute("class", klass); s.innerHTML = msg;