diff --git a/include/base.css b/include/base.css index 0a62a1ba..105984d4 100644 --- a/include/base.css +++ b/include/base.css @@ -153,6 +153,7 @@ html { } #noVNC_controls { + display:none; margin-top:77px; right:12px; position:fixed; @@ -161,6 +162,23 @@ html { right:15px; } +#noVNC_description { + display:none; + position:fixed; + + margin-top:77px; + right:20px; + left:20px; + padding:15px; + color:#000; + background:#eee; /* default background for browsers without gradient support */ + + border:2px solid #E0E0E0; + -webkit-border-radius:10px; + -moz-border-radius:10px; + border-radius:10px; +} + #noVNC_clipboard { display:none; margin-top:77px; diff --git a/include/ui.js b/include/ui.js index 62c561af..b5d7ce35 100644 --- a/include/ui.js +++ b/include/ui.js @@ -14,7 +14,7 @@ var UI = { rfb_state : 'loaded', settingsOpen : false, -connSettingsOpen : true, +connSettingsOpen : false, clipboardOpen: false, keyboardVisible: false, @@ -102,6 +102,14 @@ load: function() { } } ); + // Show description by default when hosted at for kanaka.github.com + if (location.host === "kanaka.github.com") { + // Open the description dialog + $D('noVNC_description').style.display = "block"; + } else { + // Open the connect panel on first load + UI.toggleConnectPanel(); + } }, // Read form control compatible setting from cookie @@ -189,6 +197,8 @@ forceSetting: function(name, val) { // Show the clipboard panel toggleClipboardPanel: function() { + // Close the description panel + $D('noVNC_description').style.display = "none"; //Close settings if open if (UI.settingsOpen === true) { UI.settingsApply(); @@ -212,6 +222,8 @@ toggleClipboardPanel: function() { // Show the connection settings panel/menu toggleConnectPanel: function() { + // Close the description panel + $D('noVNC_description').style.display = "none"; //Close connection settings if open if (UI.settingsOpen === true) { UI.settingsApply(); @@ -239,6 +251,8 @@ toggleConnectPanel: function() { // On open, settings are refreshed from saved cookies. // On close, settings are applied toggleSettingsPanel: function() { + // Close the description panel + $D('noVNC_description').style.display = "none"; if (UI.settingsOpen) { UI.settingsApply(); UI.closeSettingsMenu(); @@ -265,6 +279,8 @@ toggleSettingsPanel: function() { // Open menu openSettingsMenu: function() { + // Close the description panel + $D('noVNC_description').style.display = "none"; if (UI.clipboardOpen === true) { UI.toggleClipboardPanel(); } @@ -415,10 +431,12 @@ updateVisualState: function() { if (connected) { UI.setViewClip(); UI.setMouseButton(1); + $D('clipboardButton').style.display = "inline"; $D('showKeyboard').style.display = "inline"; $D('sendCtrlAltDelButton').style.display = "inline"; } else { UI.setMouseButton(); + $D('clipboardButton').style.display = "none"; $D('showKeyboard').style.display = "none"; $D('sendCtrlAltDelButton').style.display = "none"; } diff --git a/vnc.html b/vnc.html index fe9e85ec..b6cf85ba 100644 --- a/vnc.html +++ b/vnc.html @@ -90,7 +90,7 @@ title="Settings" onclick="UI.toggleSettingsPanel();" /> + + + +