This commit is contained in:
samhed 2016-06-03 10:46:05 +02:00
commit 6cef4000e9
7 changed files with 712 additions and 646 deletions

View File

Before

Width:  |  Height:  |  Size: 735 B

After

Width:  |  Height:  |  Size: 735 B

View File

@ -1,7 +1,7 @@
/* /*
* noVNC base CSS * noVNC base CSS
* Copyright (C) 2012 Joel Martin * Copyright (C) 2012 Joel Martin
* Copyright (C) 2013 Samuel Mannehed for Cendio AB * Copyright (C) 2016 Samuel Mannehed for Cendio AB
* noVNC is licensed under the MPL 2.0 (see LICENSE.txt) * noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
* This file is licensed under the 2-Clause BSD license (see LICENSE.txt). * This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
*/ */
@ -30,18 +30,18 @@ html {
padding-bottom:8px; padding-bottom:8px;
} }
#noVNC_host { #noVNC_setting_host {
width:150px; width:150px;
} }
#noVNC_port { #noVNC_setting_port {
width: 80px; width: 80px;
} }
#noVNC_password { #noVNC_setting_password {
width: 150px; width: 150px;
} }
#noVNC_encrypt { #noVNC_setting_encrypt {
} }
#noVNC_path { #noVNC_setting_path {
width: 100px; width: 100px;
} }
#noVNC_connect_button { #noVNC_connect_button {
@ -56,10 +56,10 @@ html {
#noVNC_view_drag_button { #noVNC_view_drag_button {
display: none; display: none;
} }
#sendCtrlAltDelButton { #noVNC_sendCtrlAltDel_button {
display: none; display: none;
} }
#fullscreenButton { #noVNC_fullscreen_button {
display: none; display: none;
} }
#noVNC_xvp_buttons { #noVNC_xvp_buttons {
@ -77,13 +77,13 @@ html {
position: relative; position: relative;
} }
.noVNC-buttons-left { .noVNC_buttons_left {
float: left; float: left;
z-index: 1; z-index: 1;
position: relative; position: relative;
} }
.noVNC-buttons-right { .noVNC_buttons_right {
float:right; float:right;
right: 0px; right: 0px;
z-index: 2; z-index: 2;
@ -109,13 +109,11 @@ html {
padding: 0px; padding: 0px;
} }
#noVNC_apply { #noVNC_settings_apply {
float:right; float:right;
} }
/* Do not set width/height for VNC_screen or VNC_canvas or incorrect #noVNC_container {
* scaling will occur. Canvas resizes to remote VNC settings */
#noVNC_screen {
display: table; display: table;
width:100%; width:100%;
height:100%; height:100%;
@ -124,7 +122,7 @@ html {
/*border-top-left-radius: 800px 600px;*/ /*border-top-left-radius: 800px 600px;*/
} }
#noVNC_container { #noVNC_screen {
display: none; display: none;
position: absolute; position: absolute;
margin: 0px; margin: 0px;
@ -137,6 +135,9 @@ html {
height: auto; height: auto;
} }
/* Do not set width/height for VNC_canvas or incorrect
* scaling will occur. Canvas size depends on remote VNC
* settings and noVNC settings. */
#noVNC_canvas { #noVNC_canvas {
position: absolute; position: absolute;
left: 0; left: 0;
@ -232,7 +233,7 @@ html {
right:85px; right:85px;
} }
#keyboardinput { #noVNC_keyboardinput {
width:1px; width:1px;
height:1px; height:1px;
background-color:#fff; background-color:#fff;
@ -277,7 +278,7 @@ html {
} }
/* Control bar */ /* Control bar */
#noVNC-control-bar { #noVNC_control_bar {
position:fixed; position:fixed;
display:block; display:block;
@ -426,11 +427,11 @@ html {
font-size: 180px; font-size: 180px;
} }
.noVNC-buttons-left { .noVNC_buttons_left {
padding-left: 10px; padding-left: 10px;
} }
.noVNC-buttons-right { .noVNC_buttons_right {
padding-right: 10px; padding-right: 10px;
} }
@ -441,11 +442,11 @@ html {
margin-left: 0px; margin-left: 0px;
} }
#showExtraKeysButton { display: none; } #noVNC_toggleExtraKeys_button { display: none; }
#toggleCtrlButton { display: inline; } #noVNC_toggleCtrl_button { display: inline; }
#toggleAltButton { display: inline; } #noVNC_toggleAlt_button { display: inline; }
#sendTabButton { display: inline; } #noVNC_sendTab_button { display: inline; }
#sendEscButton { display: inline; } #noVNC_sendEsc_button { display: inline; }
/* left-align the status text on lower resolutions */ /* left-align the status text on lower resolutions */
@media screen and (max-width: 800px){ @media screen and (max-width: 800px){
@ -468,35 +469,35 @@ html {
.noVNC_status_button { .noVNC_status_button {
font-size: 10px; font-size: 10px;
} }
.noVNC-buttons-left { .noVNC_buttons_left {
padding-left: 0px; padding-left: 0px;
} }
.noVNC-buttons-right { .noVNC_buttons_right {
padding-right: 0px; padding-right: 0px;
} }
/* collapse the extra keys on lower resolutions */ /* collapse the extra keys on lower resolutions */
#showExtraKeysButton { #noVNC_toggleExtraKeys_button {
display: inline; display: inline;
} }
#toggleCtrlButton { #noVNC_toggleCtrl_button {
display: none; display: none;
position: absolute; position: absolute;
top: 30px; top: 30px;
left: 0px; left: 0px;
} }
#toggleAltButton { #noVNC_toggleAlt_button {
display: none; display: none;
position: absolute; position: absolute;
top: 65px; top: 65px;
left: 0px; left: 0px;
} }
#sendTabButton { #noVNC_sendTab_button {
display: none; display: none;
position: absolute; position: absolute;
top: 100px; top: 100px;
left: 0px; left: 0px;
} }
#sendEscButton { #noVNC_sendEsc_button {
display: none; display: none;
position: absolute; position: absolute;
top: 135px; top: 135px;

View File

@ -6,7 +6,7 @@
* This file is licensed under the 2-Clause BSD license (see LICENSE.txt). * This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
*/ */
#keyboardinput { #noVNC_keyboardinput {
background-color:#000; background-color:#000;
} }

View File

@ -58,7 +58,7 @@
color:#fff; color:#fff;
} }
#keyboardinput { #noVNC_keyboardinput {
background-color:#04073d; background-color:#04073d;
} }

View File

@ -311,6 +311,8 @@ var RFB;
this._sock.flush(); this._sock.flush();
}, },
// Requests a change of remote desktop size. This message is an extension
// and may only be sent if we have received an ExtendedDesktopSize message
requestDesktopSize: function (width, height) { requestDesktopSize: function (width, height) {
if (this._rfb_state !== "normal") { return; } if (this._rfb_state !== "normal") { return; }

File diff suppressed because it is too large Load Diff

108
vnc.html
View File

@ -5,7 +5,7 @@
<!-- <!--
noVNC example: simple example using default UI noVNC example: simple example using default UI
Copyright (C) 2012 Joel Martin Copyright (C) 2012 Joel Martin
Copyright (C) 2013 Samuel Mannehed for Cendio AB Copyright (C) 2016 Samuel Mannehed for Cendio AB
noVNC is licensed under the MPL 2.0 (see LICENSE.txt) noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
This file is licensed under the 2-Clause BSD license (see LICENSE.txt). This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
@ -16,20 +16,20 @@
--> -->
<title>noVNC</title> <title>noVNC</title>
<meta charset="utf-8"> <meta charset="utf-8" />
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess --> Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<!-- Apple iOS Safari settings --> <!-- Apple iOS Safari settings -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<!-- App Start Icon --> <!-- App Start Icon -->
<link rel="apple-touch-startup-image" href="images/screen_320x460.png" /> <link rel="apple-touch-startup-image" href="images/screen_320x460.png" />
<!-- For iOS devices set the icon to use if user bookmarks app on their homescreen --> <!-- For iOS devices set the icon to use if user bookmarks app on their homescreen -->
<link rel="apple-touch-icon" href="images/screen_57x57.png"> <link rel="apple-touch-icon" href="images/screen_57x57.png" />
<!-- <!--
<link rel="apple-touch-icon-precomposed" href="images/screen_57x57.png" /> <link rel="apple-touch-icon-precomposed" href="images/screen_57x57.png" />
--> -->
@ -48,42 +48,42 @@
</head> </head>
<body> <body>
<div id="noVNC-control-bar" class="noVNC_status_normal"> <div id="noVNC_control_bar" class="noVNC_status_normal">
<!--noVNC Mobile Device only Buttons--> <!--noVNC Mobile Device only Buttons-->
<div class="noVNC-buttons-left"> <div class="noVNC_buttons_left">
<input type="image" alt="viewport drag" src="images/drag.png" <input type="image" alt="viewport drag" src="images/drag.png"
id="noVNC_view_drag_button" class="noVNC_status_button" id="noVNC_view_drag_button" class="noVNC_status_button"
title="Move/Drag Viewport"> title="Move/Drag Viewport" />
<div id="noVNC_mobile_buttons"> <div id="noVNC_mobile_buttons">
<input type="image" alt="No mousebutton" src="images/mouse_none.png" <input type="image" alt="No mousebutton" src="images/mouse_none.png"
id="noVNC_mouse_button0" class="noVNC_status_button"> id="noVNC_mouse_button0" class="noVNC_status_button" />
<input type="image" alt="Left mousebutton" src="images/mouse_left.png" <input type="image" alt="Left mousebutton" src="images/mouse_left.png"
id="noVNC_mouse_button1" class="noVNC_status_button"> id="noVNC_mouse_button1" class="noVNC_status_button" />
<input type="image" alt="Middle mousebutton" src="images/mouse_middle.png" <input type="image" alt="Middle mousebutton" src="images/mouse_middle.png"
id="noVNC_mouse_button2" class="noVNC_status_button"> id="noVNC_mouse_button2" class="noVNC_status_button" />
<input type="image" alt="Right mousebutton" src="images/mouse_right.png" <input type="image" alt="Right mousebutton" src="images/mouse_right.png"
id="noVNC_mouse_button4" class="noVNC_status_button"> id="noVNC_mouse_button4" class="noVNC_status_button" />
<input type="image" alt="Keyboard" src="images/keyboard.png" <input type="image" alt="Keyboard" src="images/keyboard.png"
id="showKeyboard" class="noVNC_status_button" id="noVNC_keyboard_button" class="noVNC_status_button"
value="Keyboard" title="Show Keyboard"/> value="Keyboard" title="Show Keyboard" />
<!-- Note that Google Chrome on Android doesn't respect any of these, <!-- Note that Google Chrome on Android doesn't respect any of these,
html attributes which attempt to disable text suggestions on the html attributes which attempt to disable text suggestions on the
on-screen keyboard. Let's hope Chrome implements the ime-mode on-screen keyboard. Let's hope Chrome implements the ime-mode
style for example --> style for example -->
<textarea id="keyboardinput" autocapitalize="off" <textarea id="noVNC_keyboardinput" autocapitalize="off"
autocorrect="off" autocomplete="off" spellcheck="false" autocorrect="off" autocomplete="off" spellcheck="false"
mozactionhint="Enter"></textarea> mozactionhint="Enter"></textarea>
<div id="noVNC_extra_keys"> <div id="noVNC_extra_keys">
<input type="image" alt="Extra keys" src="images/showextrakeys.png" <input type="image" alt="Extra keys" src="images/toggleextrakeys.png"
id="showExtraKeysButton" class="noVNC_status_button"> id="noVNC_toggleExtraKeys_button" class="noVNC_status_button" />
<input type="image" alt="Ctrl" src="images/ctrl.png" <input type="image" alt="Ctrl" src="images/ctrl.png"
id="toggleCtrlButton" class="noVNC_status_button"> id="noVNC_toggleCtrl_button" class="noVNC_status_button" />
<input type="image" alt="Alt" src="images/alt.png" <input type="image" alt="Alt" src="images/alt.png"
id="toggleAltButton" class="noVNC_status_button"> id="noVNC_toggleAlt_button" class="noVNC_status_button" />
<input type="image" alt="Tab" src="images/tab.png" <input type="image" alt="Tab" src="images/tab.png"
id="sendTabButton" class="noVNC_status_button"> id="noVNC_sendTab_button" class="noVNC_status_button" />
<input type="image" alt="Esc" src="images/esc.png" <input type="image" alt="Esc" src="images/esc.png"
id="sendEscButton" class="noVNC_status_button"> id="noVNC_sendEsc_button" class="noVNC_status_button" />
</div> </div>
</div> </div>
</div> </div>
@ -91,27 +91,27 @@
<div id="noVNC_status"></div> <div id="noVNC_status"></div>
<!--noVNC Buttons--> <!--noVNC Buttons-->
<div class="noVNC-buttons-right"> <div class="noVNC_buttons_right">
<input type="image" alt="Ctrl+Alt+Del" src="images/ctrlaltdel.png" <input type="image" alt="Ctrl+Alt+Del" src="images/ctrlaltdel.png"
id="sendCtrlAltDelButton" class="noVNC_status_button" id="noVNC_sendCtrlAltDel_button" class="noVNC_status_button"
title="Send Ctrl-Alt-Del" /> title="Send Ctrl-Alt-Del" />
<input type="image" alt="Shutdown/Reboot" src="images/power.png" <input type="image" alt="Shutdown/Reboot" src="images/power.png"
id="xvpButton" class="noVNC_status_button" id="noVNC_toggleXvp_button" class="noVNC_status_button"
title="Shutdown/Reboot..." /> title="Shutdown/Reboot..." />
<input type="image" alt="Clipboard" src="images/clipboard.png" <input type="image" alt="Clipboard" src="images/clipboard.png"
id="clipboardButton" class="noVNC_status_button" id="noVNC_clipboard_button" class="noVNC_status_button"
title="Clipboard" /> title="Clipboard" />
<input type="image" alt="Fullscreen" src="images/fullscreen.png" <input type="image" alt="Fullscreen" src="images/fullscreen.png"
id="fullscreenButton" class="noVNC_status_button" id="noVNC_fullscreen_button" class="noVNC_status_button"
title="Fullscreen" /> title="Fullscreen" />
<input type="image" alt="Settings" src="images/settings.png" <input type="image" alt="Settings" src="images/settings.png"
id="settingsButton" class="noVNC_status_button" id="noVNC_settings_button" class="noVNC_status_button"
title="Settings" /> title="Settings" />
<input type="image" alt="Connect" src="images/connect.png" <input type="image" alt="Connect" src="images/connect.png"
id="connectButton" class="noVNC_status_button" id="noVNC_connectPanel_button" class="noVNC_status_button"
title="Connect" /> title="Connect" />
<input type="image" alt="Disconnect" src="images/disconnect.png" <input type="image" alt="Disconnect" src="images/disconnect.png"
id="disconnectButton" class="noVNC_status_button" id="noVNC_disconnect_button" class="noVNC_status_button"
title="Disconnect" /> title="Disconnect" />
</div> </div>
@ -128,7 +128,7 @@
and <a href="http://kanaka.github.com/noVNC">website</a> and <a href="http://kanaka.github.com/noVNC">website</a>
for more information. for more information.
<br /> <br />
<input id="descriptionButton" type="button" value="Close"> <input id="noVNC_description_button" type="button" value="Close" />
</div> </div>
<!-- Popup Status --> <!-- Popup Status -->
@ -141,15 +141,15 @@
</textarea> </textarea>
<br /> <br />
<input id="noVNC_clipboard_clear_button" type="button" <input id="noVNC_clipboard_clear_button" type="button"
value="Clear"> value="Clear" />
</div> </div>
<!-- XVP Shutdown/Reboot Panel --> <!-- XVP Shutdown/Reboot Panel -->
<div id="noVNC_xvp" class="triangle-right top"> <div id="noVNC_xvp" class="triangle-right top">
<span id="noVNC_xvp_menu"> <span id="noVNC_xvp_menu">
<input type="button" id="xvpShutdownButton" value="Shutdown" /> <input type="button" id="noVNC_xvpShutdown_button" value="Shutdown" />
<input type="button" id="xvpRebootButton" value="Reboot" /> <input type="button" id="noVNC_xvpReboot_button" value="Reboot" />
<input type="button" id="xvpResetButton" value="Reset" /> <input type="button" id="noVNC_xvpReset_button" value="Reset" />
</span> </span>
</div> </div>
@ -157,38 +157,38 @@
<div id="noVNC_settings" class="triangle-right top"> <div id="noVNC_settings" class="triangle-right top">
<span id="noVNC_settings_menu"> <span id="noVNC_settings_menu">
<ul> <ul>
<li><input id="noVNC_encrypt" type="checkbox"> Encrypt</li> <li><input id="noVNC_setting_encrypt" type="checkbox" /> Encrypt</li>
<li><input id="noVNC_true_color" type="checkbox" checked> True Color</li> <li><input id="noVNC_setting_true_color" type="checkbox" checked /> True Color</li>
<li><input id="noVNC_cursor" type="checkbox"> Local Cursor</li> <li><input id="noVNC_setting_cursor" type="checkbox" /> Local Cursor</li>
<li><input id="noVNC_clip" type="checkbox"> Clip to Window</li> <li><input id="noVNC_setting_clip" type="checkbox" /> Clip to Window</li>
<li><input id="noVNC_shared" type="checkbox"> Shared Mode</li> <li><input id="noVNC_setting_shared" type="checkbox" /> Shared Mode</li>
<li><input id="noVNC_view_only" type="checkbox"> View Only</li> <li><input id="noVNC_setting_view_only" type="checkbox" /> View Only</li>
<hr> <hr>
<li><input id="noVNC_path" type="input" value="websockify"> Path</li> <li><input id="noVNC_setting_path" type="input" value="websockify" /> Path</li>
<li><label> <li><label>
<select id="noVNC_resize" name="vncResize"> <select id="noVNC_setting_resize" name="vncResize">
<option value="off">None</option> <option value="off">None</option>
<option value="scale">Local Scaling</option> <option value="scale">Local Scaling</option>
<option value="downscale">Local Downscaling</option> <option value="downscale">Local Downscaling</option>
<option value="remote">Remote Resizing</option> <option value="remote">Remote Resizing</option>
</select> Scaling Mode</label> </select> Scaling Mode</label>
</li> </li>
<li><input id="noVNC_repeaterID" type="input" value=""> Repeater ID</li> <li><input id="noVNC_setting_repeaterID" type="input" value="" /> Repeater ID</li>
<hr> <hr>
<!-- Stylesheet selection dropdown --> <!-- Stylesheet selection dropdown -->
<li><label><strong>Style: </strong> <li><label><strong>Style: </strong>
<select id="noVNC_stylesheet" name="vncStyle"> <select id="noVNC_setting_stylesheet" name="vncStyle">
<option value="default">default</option> <option value="default">default</option>
</select></label> </select></label>
</li> </li>
<!-- Logging selection dropdown --> <!-- Logging selection dropdown -->
<li><label><strong>Logging: </strong> <li><label><strong>Logging: </strong>
<select id="noVNC_logging" name="vncLogging"> <select id="noVNC_setting_logging" name="vncLogging">
</select></label> </select></label>
</li> </li>
<hr> <hr>
<li><input type="button" id="noVNC_apply" value="Apply"></li> <li><input type="button" id="noVNC_settings_apply" value="Apply" /></li>
</ul> </ul>
</span> </span>
</div> </div>
@ -196,22 +196,22 @@
<!-- Connection Panel --> <!-- Connection Panel -->
<div id="noVNC_controls" class="triangle-right top"> <div id="noVNC_controls" class="triangle-right top">
<ul> <ul>
<li><label><strong>Host: </strong><input id="noVNC_host" /></label></li> <li><label><strong>Host: </strong><input id="noVNC_setting_host" /></label></li>
<li><label><strong>Port: </strong><input id="noVNC_port" /></label></li> <li><label><strong>Port: </strong><input id="noVNC_setting_port" /></label></li>
<li><label><strong>Password: </strong><input id="noVNC_password" type="password" /></label></li> <li><label><strong>Password: </strong><input id="noVNC_setting_password" type="password" /></label></li>
<li><label><strong>Token: </strong><input id="noVNC_token"/></label></li> <li><label><strong>Token: </strong><input id="noVNC_setting_token" /></label></li>
<li><input id="noVNC_connect_button" type="button" value="Connect"></li> <li><input id="noVNC_connect_button" type="button" value="Connect" /></li>
</ul> </ul>
</div> </div>
</div> <!-- End of noVNC-control-bar --> </div> <!-- End of noVNC_control_bar -->
<div id="noVNC_screen"> <div id="noVNC_container">
<h1 id="noVNC_logo"><span>no</span><br />VNC</h1> <h1 id="noVNC_logo"><span>no</span><br />VNC</h1>
<!-- HTML5 Canvas --> <!-- HTML5 Canvas -->
<div id="noVNC_container"> <div id="noVNC_screen">
<canvas id="noVNC_canvas" width="0" height="0"> <canvas id="noVNC_canvas" width="0" height="0">
Canvas not supported. Canvas not supported.
</canvas> </canvas>