Simplify modifier button display
This commit is contained in:
parent
999f1d45db
commit
6cba147d4e
|
@ -2,6 +2,7 @@
|
|||
* noVNC base CSS
|
||||
* Copyright (C) 2012 Joel Martin
|
||||
* Copyright (C) 2016 Samuel Mannehed for Cendio AB
|
||||
* Copyright (C) 2016 Pierre Ossman for Cendio AB
|
||||
* noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
|
||||
* This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
|
||||
*/
|
||||
|
@ -151,6 +152,9 @@ html {
|
|||
#noVNC_sendEsc_button {
|
||||
display: inline;
|
||||
}
|
||||
#noVNC_modifiers {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* Left side buttons */
|
||||
.noVNC_buttons_left {
|
||||
|
@ -430,26 +434,25 @@ html {
|
|||
#noVNC_toggleExtraKeys_button {
|
||||
display: inline;
|
||||
}
|
||||
#noVNC_toggleCtrl_button {
|
||||
#noVNC_modifiers {
|
||||
display: none;
|
||||
}
|
||||
#noVNC_toggleCtrl_button {
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
left: 0px;
|
||||
}
|
||||
#noVNC_toggleAlt_button {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 65px;
|
||||
left: 0px;
|
||||
}
|
||||
#noVNC_sendTab_button {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
left: 0px;
|
||||
}
|
||||
#noVNC_sendEsc_button {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 135px;
|
||||
left: 0px;
|
||||
|
|
11
app/ui.js
11
app/ui.js
|
@ -2,6 +2,7 @@
|
|||
* noVNC: HTML5 VNC client
|
||||
* Copyright (C) 2012 Joel Martin
|
||||
* Copyright (C) 2016 Samuel Mannehed for Cendio AB
|
||||
* Copyright (C) 2016 Pierre Ossman for Cendio AB
|
||||
* Licensed under MPL 2.0 (see LICENSE.txt)
|
||||
*
|
||||
* See README.md for usage and integration instructions.
|
||||
|
@ -1216,17 +1217,11 @@ var UI;
|
|||
toggleExtraKeys: function() {
|
||||
UI.keepKeyboard();
|
||||
if(UI.extraKeysVisible === false) {
|
||||
document.getElementById('noVNC_toggleCtrl_button').style.display = "inline";
|
||||
document.getElementById('noVNC_toggleAlt_button').style.display = "inline";
|
||||
document.getElementById('noVNC_sendTab_button').style.display = "inline";
|
||||
document.getElementById('noVNC_sendEsc_button').style.display = "inline";
|
||||
document.getElementById('noVNC_modifiers').style.display = "inline";
|
||||
document.getElementById('noVNC_toggleExtraKeys_button').className = "noVNC_status_button_selected";
|
||||
UI.extraKeysVisible = true;
|
||||
} else if(UI.extraKeysVisible === true) {
|
||||
document.getElementById('noVNC_toggleCtrl_button').style.display = "";
|
||||
document.getElementById('noVNC_toggleAlt_button').style.display = "";
|
||||
document.getElementById('noVNC_sendTab_button').style.display = "";
|
||||
document.getElementById('noVNC_sendEsc_button').style.display = "";
|
||||
document.getElementById('noVNC_modifiers').style.display = "";
|
||||
document.getElementById('noVNC_toggleExtraKeys_button').className = "noVNC_status_button";
|
||||
UI.extraKeysVisible = false;
|
||||
}
|
||||
|
|
3
vnc.html
3
vnc.html
|
@ -6,6 +6,7 @@
|
|||
noVNC example: simple example using default UI
|
||||
Copyright (C) 2012 Joel Martin
|
||||
Copyright (C) 2016 Samuel Mannehed for Cendio AB
|
||||
Copyright (C) 2016 Pierre Ossman for Cendio AB
|
||||
noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
|
||||
This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
|
||||
|
||||
|
@ -81,6 +82,7 @@
|
|||
<div id="noVNC_extra_keys">
|
||||
<input type="image" alt="Extra keys" src="app/images/toggleextrakeys.png"
|
||||
id="noVNC_toggleExtraKeys_button" class="noVNC_status_button" />
|
||||
<div id="noVNC_modifiers">
|
||||
<input type="image" alt="Ctrl" src="app/images/ctrl.png"
|
||||
id="noVNC_toggleCtrl_button" class="noVNC_status_button" />
|
||||
<input type="image" alt="Alt" src="app/images/alt.png"
|
||||
|
@ -92,6 +94,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="noVNC_status"></div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue