Removed header from error dialog, migrating to traditional JS handlers.
authorMichael Jumper <zhangmaike@users.sourceforge.net>
Mon, 4 Jul 2011 21:26:09 +0000 (14:26 -0700)
committerMichael Jumper <zhangmaike@users.sourceforge.net>
Mon, 4 Jul 2011 21:26:09 +0000 (14:26 -0700)
src/main/webapp/index.html

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