Removed header from error dialog, migrating to traditional JS handlers.

This commit is contained in:
Michael Jumper
2011-07-04 14:26:09 -07:00
parent 5e59a18c2c
commit 7e3ecfd5db

View File

@@ -105,7 +105,6 @@
<div id="errorDialog" class="errorDialogOuter"> <div id="errorDialog" class="errorDialogOuter">
<div class="errorDialogMiddle"> <div class="errorDialogMiddle">
<div class="errorDialog"> <div class="errorDialog">
<h1>Error</h1>
<p id="errorText"></p> <p id="errorText"></p>
<div class="buttons"><button id="reconnect">Reconnect</button></div> <div class="buttons"><button id="reconnect">Reconnect</button></div>
</div> </div>
@@ -189,7 +188,7 @@
window.onresize(); window.onresize();
var state = document.getElementById("state"); var state = document.getElementById("state");
guac.setOnStateChangeHandler(function(clientState) { guac.onstatechange = function(clientState) {
switch (clientState) { switch (clientState) {
case 0: case 0:
@@ -215,17 +214,17 @@
default: default:
state.textContent = "Unknown"; state.textContent = "Unknown";
} }
}); };
// Cache error image (might not be available when error occurs) // Cache error image (might not be available when error occurs)
var guacErrorImage = new Image(); var guacErrorImage = new Image();
guacErrorImage.src = "images/noguacamole-logo-24.png"; guacErrorImage.src = "images/noguacamole-logo-24.png";
guac.setNameHandler(function(name) { guac.onname = function(name) {
document.title = name; document.title = name;
}); };
guac.setErrorHandler(function(error) { guac.onerror = function(error) {
guac.disconnect(); guac.disconnect();
@@ -262,7 +261,7 @@
} }
}); };
// Mouse // Mouse
var mouse = new GuacamoleMouse(display); var mouse = new GuacamoleMouse(display);
@@ -340,11 +339,9 @@
}; };
// Server copy handler // Server copy handler
guac.setClipboardHandler( guac.onclipboard = function(data) {
function(data) { clipboardElement.value = data;
clipboardElement.value = data; };
}
);
// Show/Hide clipboard // Show/Hide clipboard