|
@@ -221,8 +221,8 @@ var UI;
|
|
$D("xvpShutdownButton").onclick = UI.xvpShutdown;
|
|
$D("xvpShutdownButton").onclick = UI.xvpShutdown;
|
|
$D("xvpRebootButton").onclick = UI.xvpReboot;
|
|
$D("xvpRebootButton").onclick = UI.xvpReboot;
|
|
$D("xvpResetButton").onclick = UI.xvpReset;
|
|
$D("xvpResetButton").onclick = UI.xvpReset;
|
|
- $D("noVNC_status").onclick = UI.togglePopupStatus;
|
|
|
|
- $D("noVNC_popup_status").onclick = UI.togglePopupStatus;
|
|
|
|
|
|
+ $D("noVNC_status").onclick = UI.popupStatus;
|
|
|
|
+ $D("noVNC_popup_status").onclick = UI.closePopup;
|
|
$D("xvpButton").onclick = UI.toggleXvpPanel;
|
|
$D("xvpButton").onclick = UI.toggleXvpPanel;
|
|
$D("clipboardButton").onclick = UI.toggleClipboardPanel;
|
|
$D("clipboardButton").onclick = UI.toggleClipboardPanel;
|
|
$D("fullscreenButton").onclick = UI.toggleFullscreen;
|
|
$D("fullscreenButton").onclick = UI.toggleFullscreen;
|
|
@@ -348,6 +348,31 @@ var UI;
|
|
//Util.Debug("<< updateVisualState");
|
|
//Util.Debug("<< updateVisualState");
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ popupStatus: function(text) {
|
|
|
|
+ var psp = $D('noVNC_popup_status');
|
|
|
|
+
|
|
|
|
+ clearTimeout(UI.popupStatusTimeout);
|
|
|
|
+
|
|
|
|
+ if (typeof text === 'string') {
|
|
|
|
+ psp.innerHTML = text;
|
|
|
|
+ } else {
|
|
|
|
+ psp.innerHTML = $D('noVNC_status').innerHTML;
|
|
|
|
+ }
|
|
|
|
+ psp.style.display = "block";
|
|
|
|
+ psp.style.left = window.innerWidth/2 -
|
|
|
|
+ parseInt(window.getComputedStyle(psp).width)/2 -30 + "px";
|
|
|
|
+
|
|
|
|
+ // Show the popup for a maximum of 1.5 seconds
|
|
|
|
+ UI.popupStatusTimeout = setTimeout(function() {
|
|
|
|
+ UI.closePopup();
|
|
|
|
+ }, 1500);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ closePopup: function() {
|
|
|
|
+ clearTimeout(UI.popupStatusTimeout);
|
|
|
|
+ $D('noVNC_popup_status').style.display = "none";
|
|
|
|
+ },
|
|
|
|
+
|
|
// Initial page load read/initialization of settings
|
|
// Initial page load read/initialization of settings
|
|
initSetting: function(name, defVal) {
|
|
initSetting: function(name, defVal) {
|
|
// Check Query string followed by cookie
|
|
// Check Query string followed by cookie
|
|
@@ -486,31 +511,6 @@ var UI;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
-
|
|
|
|
- // Show the popup status
|
|
|
|
- togglePopupStatus: function(text) {
|
|
|
|
- var psp = $D('noVNC_popup_status');
|
|
|
|
-
|
|
|
|
- var closePopup = function() { psp.style.display = "none"; };
|
|
|
|
-
|
|
|
|
- if (window.getComputedStyle(psp).display === 'none') {
|
|
|
|
- if (typeof text === 'string') {
|
|
|
|
- psp.innerHTML = text;
|
|
|
|
- } else {
|
|
|
|
- psp.innerHTML = $D('noVNC_status').innerHTML;
|
|
|
|
- }
|
|
|
|
- psp.style.display = "block";
|
|
|
|
- psp.style.left = window.innerWidth/2 -
|
|
|
|
- parseInt(window.getComputedStyle(psp).width)/2 -30 + "px";
|
|
|
|
-
|
|
|
|
- // Show the popup for a maximum of 1.5 seconds
|
|
|
|
- UI.popupStatusTimeout = setTimeout(function() { closePopup(); }, 1500);
|
|
|
|
- } else {
|
|
|
|
- clearTimeout(UI.popupStatusTimeout);
|
|
|
|
- closePopup();
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
// Show the XVP panel
|
|
// Show the XVP panel
|
|
toggleXvpPanel: function() {
|
|
toggleXvpPanel: function() {
|
|
// Close the description panel
|
|
// Close the description panel
|
|
@@ -968,7 +968,7 @@ var UI;
|
|
// The browser is IE and we are in fullscreen mode.
|
|
// The browser is IE and we are in fullscreen mode.
|
|
// - We need to force clipping while in fullscreen since
|
|
// - We need to force clipping while in fullscreen since
|
|
// scrollbars doesn't work.
|
|
// scrollbars doesn't work.
|
|
- UI.togglePopupStatus("Forcing clipping mode since scrollbars aren't supported by IE in fullscreen");
|
|
|
|
|
|
+ UI.popupStatus("Forcing clipping mode since scrollbars aren't supported by IE in fullscreen");
|
|
UI.rememberedClipSetting = UI.getSetting('clip');
|
|
UI.rememberedClipSetting = UI.getSetting('clip');
|
|
UI.setViewClip(true);
|
|
UI.setViewClip(true);
|
|
$D('noVNC_clip').disabled = true;
|
|
$D('noVNC_clip').disabled = true;
|