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
|
// Hide hardware cursor
|
||||||
if (cursorHidden == 0) {
|
if (cursorHidden == 0) {
|
||||||
display.className += " hideCursor";
|
display.className += " guac-hide-cursor";
|
||||||
cursorHidden = 1;
|
cursorHidden = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ function GuacamoleClient(display) {
|
|||||||
disconnect();
|
disconnect();
|
||||||
|
|
||||||
// In case nothing has been rendered yet, use error style
|
// In case nothing has been rendered yet, use error style
|
||||||
display.className += " error";
|
display.className += " guac-error";
|
||||||
|
|
||||||
// Show error by desaturating display
|
// Show error by desaturating display
|
||||||
if (background)
|
if (background)
|
@@ -128,20 +128,6 @@ div#display {
|
|||||||
margin-right: auto;
|
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 {
|
#menu img {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
@@ -178,7 +164,3 @@ div#clipboardDiv textarea {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hideCursor {
|
|
||||||
cursor: url('images/mouse/dot.gif'),url('images/mouse/blank.cur'),default;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<link rel="icon" type="image/png" href="images/guacamole-icon-64.png"/>
|
<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="guacamole.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="guac-web-lib/css/guacamole.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="keyboard.css"/>
|
<link rel="stylesheet" type="text/css" href="keyboard.css"/>
|
||||||
<title>Guacamole</title>
|
<title>Guacamole</title>
|
||||||
</head>
|
</head>
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Display -->
|
<!-- Display -->
|
||||||
<div id="display" class="loading">
|
<div id="display" class="guac-loading">
|
||||||
<!-- On-screen keyboard -->
|
<!-- On-screen keyboard -->
|
||||||
<div id="keyboardContainer"></div>
|
<div id="keyboardContainer"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -73,12 +74,12 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Scripts -->
|
<!-- Scripts -->
|
||||||
<script type="text/javascript" src="javascript/keymap.js"></script>
|
<script type="text/javascript" src="guac-web-lib/javascript/keymap.js"></script>
|
||||||
<script type="text/javascript" src="javascript/keyboard.js"></script>
|
<script type="text/javascript" src="guac-web-lib/javascript/keyboard.js"></script>
|
||||||
<script type="text/javascript" src="javascript/mouse.js"></script>
|
<script type="text/javascript" src="guac-web-lib/javascript/mouse.js"></script>
|
||||||
<script type="text/javascript" src="javascript/layer.js"></script>
|
<script type="text/javascript" src="guac-web-lib/javascript/layer.js"></script>
|
||||||
<script type="text/javascript" src="javascript/guacamole.js"></script>
|
<script type="text/javascript" src="guac-web-lib/javascript/guacamole.js"></script>
|
||||||
<script type="text/javascript" src="javascript/oskeyboard.js"></script>
|
<script type="text/javascript" src="guac-web-lib/javascript/oskeyboard.js"></script>
|
||||||
|
|
||||||
<!-- Init -->
|
<!-- Init -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@@ -98,10 +99,10 @@
|
|||||||
window.onresize();
|
window.onresize();
|
||||||
|
|
||||||
// Instantiate client
|
// Instantiate client
|
||||||
var vncClient = new GuacamoleClient(display);
|
var guac = new GuacamoleClient(display);
|
||||||
|
|
||||||
var state = document.getElementById("state");
|
var state = document.getElementById("state");
|
||||||
vncClient.setOnStateChangeHandler(function(clientState) {
|
guac.setOnStateChangeHandler(function(clientState) {
|
||||||
|
|
||||||
switch (clientState) {
|
switch (clientState) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -114,7 +115,7 @@
|
|||||||
state.textContent = "Connected, waiting for first update...";
|
state.textContent = "Connected, waiting for first update...";
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
display.className = display.className.replace(/loading/, '');
|
display.className = display.className.replace(/guac-loading/, '');
|
||||||
menu.className = "connected";
|
menu.className = "connected";
|
||||||
state.textContent = "Connected.";
|
state.textContent = "Connected.";
|
||||||
break;
|
break;
|
||||||
@@ -133,7 +134,7 @@
|
|||||||
var guacErrorImage = new Image();
|
var guacErrorImage = new Image();
|
||||||
guacErrorImage.src = "images/noguacamole-logo.png";
|
guacErrorImage.src = "images/noguacamole-logo.png";
|
||||||
|
|
||||||
vncClient.setErrorHandler(function(error) {
|
guac.setErrorHandler(function(error) {
|
||||||
menu.className = "error";
|
menu.className = "error";
|
||||||
logo.src = guacErrorImage.src;
|
logo.src = guacErrorImage.src;
|
||||||
errorDialogText.textContent = error;
|
errorDialogText.textContent = error;
|
||||||
@@ -147,11 +148,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Connect
|
// Connect
|
||||||
vncClient.connect();
|
guac.connect();
|
||||||
|
|
||||||
// Disconnect on close
|
// Disconnect on close
|
||||||
window.onunload = function() {
|
window.onunload = function() {
|
||||||
vncClient.disconnect();
|
guac.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle clipboard events
|
// Handle clipboard events
|
||||||
@@ -159,22 +160,22 @@
|
|||||||
clipboardElement.onchange = function() {
|
clipboardElement.onchange = function() {
|
||||||
|
|
||||||
var text = clipboardElement.value;
|
var text = clipboardElement.value;
|
||||||
vncClient.setClipboard(text);
|
guac.setClipboard(text);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Ignore keypresses when clipboard is focused
|
// Ignore keypresses when clipboard is focused
|
||||||
clipboardElement.onfocus = function() {
|
clipboardElement.onfocus = function() {
|
||||||
vncClient.disableKeyboard();
|
guac.disableKeyboard();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Capture keypresses when clipboard is not focused
|
// Capture keypresses when clipboard is not focused
|
||||||
clipboardElement.onblur = function() {
|
clipboardElement.onblur = function() {
|
||||||
vncClient.enableKeyboard();
|
guac.enableKeyboard();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Server copy handler
|
// Server copy handler
|
||||||
vncClient.setClipboardHandler(
|
guac.setClipboardHandler(
|
||||||
function(data) {
|
function(data) {
|
||||||
clipboardElement.value = data;
|
clipboardElement.value = data;
|
||||||
}
|
}
|
||||||
@@ -223,13 +224,13 @@
|
|||||||
|
|
||||||
osKeyboard.setKeyPressedHandler(
|
osKeyboard.setKeyPressedHandler(
|
||||||
function(keysym) {
|
function(keysym) {
|
||||||
vncClient.pressKey(keysym);
|
guac.pressKey(keysym);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
osKeyboard.setKeyReleasedHandler(
|
osKeyboard.setKeyReleasedHandler(
|
||||||
function(keysym) {
|
function(keysym) {
|
||||||
vncClient.releaseKey(keysym);
|
guac.releaseKey(keysym);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -237,12 +238,12 @@
|
|||||||
var CtrlAltDelete = document.getElementById("CtrlAltDelete");
|
var CtrlAltDelete = document.getElementById("CtrlAltDelete");
|
||||||
|
|
||||||
CtrlAltDelete.onclick = function() {
|
CtrlAltDelete.onclick = function() {
|
||||||
vncClient.pressKey(KEYSYM_CTRL);
|
guac.pressKey(KEYSYM_CTRL);
|
||||||
vncClient.pressKey(KEYSYM_ALT);
|
guac.pressKey(KEYSYM_ALT);
|
||||||
vncClient.pressKey(KEYSYM_DELETE);
|
guac.pressKey(KEYSYM_DELETE);
|
||||||
vncClient.releaseKey(KEYSYM_DELETE);
|
guac.releaseKey(KEYSYM_DELETE);
|
||||||
vncClient.releaseKey(KEYSYM_ALT);
|
guac.releaseKey(KEYSYM_ALT);
|
||||||
vncClient.releaseKey(KEYSYM_CTRL);
|
guac.releaseKey(KEYSYM_CTRL);
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|