Moved guacamole-specific parts into own lib dir
37
guacamole/web-client/web/guac-web-lib/css/guacamole.css
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
/*
|
||||
* Guacamole - Clientless Remote Desktop
|
||||
* Copyright (C) 2010 Michael Jumper
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
.guac-display .guac-loading {
|
||||
border: 1px dotted gray;
|
||||
background-image: url('images/spinner92.gif');
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.guac-display .guac-error {
|
||||
border: 1px dotted red;
|
||||
background-image: url('images/noimage92.png');
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.guac-hide-cursor {
|
||||
cursor: url('images/mouse/dot.gif'),url('images/mouse/blank.cur'),default;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 71 B After Width: | Height: | Size: 71 B |
Before Width: | Height: | Size: 72 B After Width: | Height: | Size: 72 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -66,7 +66,7 @@ function GuacamoleClient(display) {
|
||||
|
||||
// Hide hardware cursor
|
||||
if (cursorHidden == 0) {
|
||||
display.className += " hideCursor";
|
||||
display.className += " guac-hide-cursor";
|
||||
cursorHidden = 1;
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ function GuacamoleClient(display) {
|
||||
disconnect();
|
||||
|
||||
// In case nothing has been rendered yet, use error style
|
||||
display.className += " error";
|
||||
display.className += " guac-error";
|
||||
|
||||
// Show error by desaturating display
|
||||
if (background)
|
@@ -128,20 +128,6 @@ div#display {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
div#display.loading {
|
||||
border: 1px dotted gray;
|
||||
background-image: url('images/spinner92.gif');
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
div#display.error {
|
||||
border: 1px dotted red;
|
||||
background-image: url('images/noimage92.png');
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
#menu img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
@@ -178,7 +164,3 @@ div#clipboardDiv textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hideCursor {
|
||||
cursor: url('images/mouse/dot.gif'),url('images/mouse/blank.cur'),default;
|
||||
}
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
<head>
|
||||
<link rel="icon" type="image/png" href="images/guacamole-icon-64.png"/>
|
||||
<link rel="stylesheet" type="text/css" href="guacamole.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="guac-web-lib/css/guacamole.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="keyboard.css"/>
|
||||
<title>Guacamole</title>
|
||||
</head>
|
||||
@@ -54,7 +55,7 @@
|
||||
|
||||
|
||||
<!-- Display -->
|
||||
<div id="display" class="loading">
|
||||
<div id="display" class="guac-loading">
|
||||
<!-- On-screen keyboard -->
|
||||
<div id="keyboardContainer"></div>
|
||||
</div>
|
||||
@@ -73,12 +74,12 @@
|
||||
|
||||
|
||||
<!-- Scripts -->
|
||||
<script type="text/javascript" src="javascript/keymap.js"></script>
|
||||
<script type="text/javascript" src="javascript/keyboard.js"></script>
|
||||
<script type="text/javascript" src="javascript/mouse.js"></script>
|
||||
<script type="text/javascript" src="javascript/layer.js"></script>
|
||||
<script type="text/javascript" src="javascript/guacamole.js"></script>
|
||||
<script type="text/javascript" src="javascript/oskeyboard.js"></script>
|
||||
<script type="text/javascript" src="guac-web-lib/javascript/keymap.js"></script>
|
||||
<script type="text/javascript" src="guac-web-lib/javascript/keyboard.js"></script>
|
||||
<script type="text/javascript" src="guac-web-lib/javascript/mouse.js"></script>
|
||||
<script type="text/javascript" src="guac-web-lib/javascript/layer.js"></script>
|
||||
<script type="text/javascript" src="guac-web-lib/javascript/guacamole.js"></script>
|
||||
<script type="text/javascript" src="guac-web-lib/javascript/oskeyboard.js"></script>
|
||||
|
||||
<!-- Init -->
|
||||
<script type="text/javascript">
|
||||
@@ -98,10 +99,10 @@
|
||||
window.onresize();
|
||||
|
||||
// Instantiate client
|
||||
var vncClient = new GuacamoleClient(display);
|
||||
var guac = new GuacamoleClient(display);
|
||||
|
||||
var state = document.getElementById("state");
|
||||
vncClient.setOnStateChangeHandler(function(clientState) {
|
||||
guac.setOnStateChangeHandler(function(clientState) {
|
||||
|
||||
switch (clientState) {
|
||||
case 0:
|
||||
@@ -114,7 +115,7 @@
|
||||
state.textContent = "Connected, waiting for first update...";
|
||||
break;
|
||||
case 3:
|
||||
display.className = display.className.replace(/loading/, '');
|
||||
display.className = display.className.replace(/guac-loading/, '');
|
||||
menu.className = "connected";
|
||||
state.textContent = "Connected.";
|
||||
break;
|
||||
@@ -133,7 +134,7 @@
|
||||
var guacErrorImage = new Image();
|
||||
guacErrorImage.src = "images/noguacamole-logo.png";
|
||||
|
||||
vncClient.setErrorHandler(function(error) {
|
||||
guac.setErrorHandler(function(error) {
|
||||
menu.className = "error";
|
||||
logo.src = guacErrorImage.src;
|
||||
errorDialogText.textContent = error;
|
||||
@@ -147,11 +148,11 @@
|
||||
};
|
||||
|
||||
// Connect
|
||||
vncClient.connect();
|
||||
guac.connect();
|
||||
|
||||
// Disconnect on close
|
||||
window.onunload = function() {
|
||||
vncClient.disconnect();
|
||||
guac.disconnect();
|
||||
}
|
||||
|
||||
// Handle clipboard events
|
||||
@@ -159,22 +160,22 @@
|
||||
clipboardElement.onchange = function() {
|
||||
|
||||
var text = clipboardElement.value;
|
||||
vncClient.setClipboard(text);
|
||||
guac.setClipboard(text);
|
||||
|
||||
};
|
||||
|
||||
// Ignore keypresses when clipboard is focused
|
||||
clipboardElement.onfocus = function() {
|
||||
vncClient.disableKeyboard();
|
||||
guac.disableKeyboard();
|
||||
};
|
||||
|
||||
// Capture keypresses when clipboard is not focused
|
||||
clipboardElement.onblur = function() {
|
||||
vncClient.enableKeyboard();
|
||||
guac.enableKeyboard();
|
||||
};
|
||||
|
||||
// Server copy handler
|
||||
vncClient.setClipboardHandler(
|
||||
guac.setClipboardHandler(
|
||||
function(data) {
|
||||
clipboardElement.value = data;
|
||||
}
|
||||
@@ -223,13 +224,13 @@
|
||||
|
||||
osKeyboard.setKeyPressedHandler(
|
||||
function(keysym) {
|
||||
vncClient.pressKey(keysym);
|
||||
guac.pressKey(keysym);
|
||||
}
|
||||
);
|
||||
|
||||
osKeyboard.setKeyReleasedHandler(
|
||||
function(keysym) {
|
||||
vncClient.releaseKey(keysym);
|
||||
guac.releaseKey(keysym);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -237,12 +238,12 @@
|
||||
var CtrlAltDelete = document.getElementById("CtrlAltDelete");
|
||||
|
||||
CtrlAltDelete.onclick = function() {
|
||||
vncClient.pressKey(KEYSYM_CTRL);
|
||||
vncClient.pressKey(KEYSYM_ALT);
|
||||
vncClient.pressKey(KEYSYM_DELETE);
|
||||
vncClient.releaseKey(KEYSYM_DELETE);
|
||||
vncClient.releaseKey(KEYSYM_ALT);
|
||||
vncClient.releaseKey(KEYSYM_CTRL);
|
||||
guac.pressKey(KEYSYM_CTRL);
|
||||
guac.pressKey(KEYSYM_ALT);
|
||||
guac.pressKey(KEYSYM_DELETE);
|
||||
guac.releaseKey(KEYSYM_DELETE);
|
||||
guac.releaseKey(KEYSYM_ALT);
|
||||
guac.releaseKey(KEYSYM_CTRL);
|
||||
}
|
||||
|
||||
</script>
|
||||
|