var errorDialog = document.getElementById("errorDialog");
var errorDialogText = document.getElementById("errorText");
- // Position display correctly
- window.onresize = function() {
- display.style.top = menu.offsetHeight + "px";
- };
-
- window.onresize();
-
var state = document.getElementById("state");
guac.onstatechange = function(clientState) {
var mouse = new Guacamole.Mouse(display);
mouse.onmousedown = mouse.onmouseup = mouse.onmousemove =
function(mouseState) {
+
+ if (mouseState.y <= 5)
+ showMenu();
+
guac.sendMouseState(mouseState);
};
// TODO: Handle exception ...
}
+ var menu_shaded = false;
+
+ var hide_interval = null;
+ var show_interval = null;
+
+ function hideMenu() {
+
+ if (!menu_shaded) {
+
+ var step = Math.floor(menu.offsetHeight / 5) + 1;
+ var offset = 0;
+ menu_shaded = true;
+
+ window.clearInterval(show_interval);
+ hide_interval = window.setInterval(function() {
+
+ offset -= step;
+ menu.style.top = offset + "px";
+
+ if (offset <= -menu.offsetHeight) {
+ window.clearInterval(hide_interval);
+ menu.style.visiblity = "hidden";
+ }
+
+ }, 30);
+ }
+
+ }
+
+ function showMenu() {
+
+ if (menu_shaded) {
+
+ var step = Math.floor(menu.offsetHeight / 5) + 1;
+ var offset = -menu.offsetHeight;
+ menu_shaded = false;
+ menu.style.visiblity = "";
+
+ window.clearInterval(hide_interval);
+ show_interval = window.setInterval(function() {
+
+ offset += step;
+
+ if (offset >= 0) {
+ offset = 0;
+ window.clearInterval(show_interval);
+ }
+
+ menu.style.top = offset + "px";
+
+ }, 30);
+ }
+
+ }
+
+ display.onmouseout = function() {
+ showMenu();
+ };
+
+ display.onmouseover = function() {
+ hideMenu();
+ };
+
/* ]]> */ </script>
var protocol = document.createElement("td");
var id = document.createElement("td");
+ var protocolIcon = document.createElement("div");
+ protocolIcon.className = "protocol icon " + configs[i].protocol;
+
// Set CSS
protocol.className = "protocol";
id.className = "name";
"client.xhtml?" + encodeURIComponent(configs[i].id));
// Set cell contents
- protocol.textContent = configs[i].protocol;
+ protocol.appendChild(protocolIcon);
+ //protocol.textContent = configs[i].protocol;
clientLink.textContent = configs[i].id;
id.appendChild(clientLink);