mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-30 00:23:21 +00:00 
			
		
		
		
	Further remove unneeded elements and styles.
This commit is contained in:
		| @@ -32,12 +32,6 @@ | ||||
|  | ||||
|     <body> | ||||
|  | ||||
|         <!-- Touch-specific menu --> | ||||
|         <div id="touchMenu"><img id="touchShowClipboard" src="images/menu-icons/tango/edit-paste.png"/><img id="touchShowKeyboard" src="images/menu-icons/tango/input-keyboard.png"/><img id="touchLogout" src="images/menu-icons/tango/system-log-out.png"/></div> | ||||
|  | ||||
|         <!-- Keyboard event target for platforms with native OSKs --> | ||||
|         <textarea id="eventTarget"></textarea> | ||||
|  | ||||
|         <!-- Display --> | ||||
|         <div id="display"> | ||||
|         </div> | ||||
|   | ||||
| @@ -26,6 +26,7 @@ | ||||
|         <link rel="apple-touch-icon" type="image/png" href="images/guacamole-logo-144.png"/> | ||||
|         <link rel="stylesheet" type="text/css" href="styles/login.css"/> | ||||
|         <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi"/> | ||||
|         <meta name="apple-mobile-web-app-capable" content="yes"/> | ||||
|         <title>Guacamole ${project.version}</title> | ||||
|     </head> | ||||
|  | ||||
|   | ||||
| @@ -25,7 +25,6 @@ var GuacamoleUI = { | ||||
|     "viewport"    : document.getElementById("viewportClone"), | ||||
|     "display"     : document.getElementById("display"), | ||||
|     "logo"        : document.getElementById("status-logo"), | ||||
|     "eventTarget" : document.getElementById("eventTarget"), | ||||
|  | ||||
|     "buttons": { | ||||
|         "reconnect"    : document.getElementById("reconnect") | ||||
| @@ -145,16 +144,6 @@ GuacamoleUI.supportedVideo = []; | ||||
|         window.location.reload(); | ||||
|     }; | ||||
|  | ||||
|     // Turn off autocorrect and autocapitalization on eventTarget | ||||
|     GuacamoleUI.eventTarget.setAttribute("autocorrect", "off"); | ||||
|     GuacamoleUI.eventTarget.setAttribute("autocapitalize", "off"); | ||||
|  | ||||
|     // Automatically reposition event target on scroll | ||||
|     window.addEventListener("scroll", function() { | ||||
|         GuacamoleUI.eventTarget.style.left = window.pageXOffset + "px"; | ||||
|         GuacamoleUI.eventTarget.style.top = window.pageYOffset + "px"; | ||||
|     }); | ||||
|  | ||||
|     // Query audio support | ||||
|     (function () { | ||||
|         var probably_supported = []; | ||||
| @@ -314,63 +303,6 @@ GuacamoleUI.attach = function(guac) { | ||||
|     // Keyboard | ||||
|     var keyboard = new Guacamole.Keyboard(document); | ||||
|  | ||||
|     // Monitor whether the event target is focused | ||||
|     var eventTargetFocused = false; | ||||
|  | ||||
|     // Save length for calculation of changed value | ||||
|     var currentLength = GuacamoleUI.eventTarget.value.length; | ||||
|  | ||||
|     GuacamoleUI.eventTarget.onfocus = function() { | ||||
|         eventTargetFocused = true; | ||||
|         GuacamoleUI.eventTarget.value = ""; | ||||
|         currentLength = 0; | ||||
|     }; | ||||
|  | ||||
|     GuacamoleUI.eventTarget.onblur = function() { | ||||
|         eventTargetFocused = false; | ||||
|     }; | ||||
|  | ||||
|     // If text is input directly into event target without typing (as with | ||||
|     // voice input, for example), type automatically. | ||||
|     GuacamoleUI.eventTarget.oninput = function(e) { | ||||
|  | ||||
|         // Calculate current length and change in length | ||||
|         var oldLength = currentLength; | ||||
|         currentLength = GuacamoleUI.eventTarget.value.length; | ||||
|          | ||||
|         // If deleted or replaced text, ignore | ||||
|         if (currentLength <= oldLength) | ||||
|             return; | ||||
|  | ||||
|         // Get changed text | ||||
|         var text = GuacamoleUI.eventTarget.value.substring(oldLength); | ||||
|  | ||||
|         // Send each character | ||||
|         for (var i=0; i<text.length; i++) { | ||||
|  | ||||
|             // Get char code | ||||
|             var charCode = text.charCodeAt(i); | ||||
|  | ||||
|             // Convert to keysym | ||||
|             var keysym = 0x003F; // Default to a question mark | ||||
|             if (charCode >= 0x0000 && charCode <= 0x00FF) | ||||
|                 keysym = charCode; | ||||
|             else if (charCode >= 0x0100 && charCode <= 0x10FFFF) | ||||
|                 keysym = 0x01000000 | charCode; | ||||
|  | ||||
|             // Send keysym only if not already pressed | ||||
|             if (!keyboard.pressed[keysym]) { | ||||
|  | ||||
|                 // Press and release key | ||||
|                 guac.sendKeyEvent(1, keysym); | ||||
|                 guac.sendKeyEvent(0, keysym); | ||||
|  | ||||
|             } | ||||
|  | ||||
|         } | ||||
|  | ||||
|     } | ||||
|  | ||||
|     function isTypableCharacter(keysym) { | ||||
|         return (keysym & 0xFFFF00) != 0xFF00; | ||||
|     } | ||||
| @@ -384,12 +316,10 @@ GuacamoleUI.attach = function(guac) { | ||||
|  | ||||
|         keyboard.onkeydown = function (keysym) { | ||||
|             guac.sendKeyEvent(1, keysym); | ||||
|             return eventTargetFocused && isTypableCharacter(keysym); | ||||
|         }; | ||||
|  | ||||
|         keyboard.onkeyup = function (keysym) { | ||||
|             guac.sendKeyEvent(0, keysym); | ||||
|             return eventTargetFocused && isTypableCharacter(keysym); | ||||
|         }; | ||||
|  | ||||
|     } | ||||
|   | ||||
| @@ -19,7 +19,7 @@ | ||||
|  | ||||
| body { | ||||
|     background: black; | ||||
|     font-family: sans-serif; | ||||
|     font-family: FreeSans, Helvetica, Arial, sans-serif; | ||||
|     padding: 0; | ||||
|     margin: 0; | ||||
| } | ||||
| @@ -138,27 +138,6 @@ div.dialog p { | ||||
|     color: #D44; | ||||
| } | ||||
|  | ||||
| /* Menu */ | ||||
|  | ||||
| #menu { | ||||
|     position: fixed; | ||||
|     left: 0; | ||||
|     top: 0; | ||||
|     width: 100%; | ||||
|     z-index: 4; | ||||
|     background: #888; | ||||
|     padding: 0.5em; | ||||
|     font-weight: bold; | ||||
|     text-shadow: -1px -1px rgba(0, 0, 0, 0.6); | ||||
|     color: rgba(255, 255, 255, 0.7); | ||||
|     border-bottom: 1px solid black; | ||||
|     font-size: 0.8em; | ||||
| } | ||||
|  | ||||
| .guac-error #menu { | ||||
|     background: #D44; | ||||
| } | ||||
|  | ||||
| div#display * { | ||||
|     position: relative; | ||||
| } | ||||
| @@ -168,74 +147,6 @@ div#display > * { | ||||
|     margin-right: auto; | ||||
| } | ||||
|  | ||||
| #menu img { | ||||
|     vertical-align: middle; | ||||
| } | ||||
|  | ||||
| #menu span { | ||||
|     vertical-align: middle; | ||||
| } | ||||
|  | ||||
| #menu button { | ||||
|     vertical-align: middle; | ||||
|     background:   #DC8; | ||||
|     border-color: #986; | ||||
|     color:        black;  | ||||
| } | ||||
|  | ||||
| #menu button:hover { | ||||
|     background:   #FFC; | ||||
|     border-color: #DC8; | ||||
| } | ||||
|  | ||||
| .guac-error #menu button { | ||||
|     background:   #B33; | ||||
|     border-color: #822; | ||||
| } | ||||
|  | ||||
| .guac-error #menu button:hover { | ||||
|     background:   #F44; | ||||
|     border-color: #B33; | ||||
| } | ||||
|  | ||||
| div#clipboardDiv { | ||||
|     display: none; | ||||
|     position: absolute; | ||||
|     background: #FA5; | ||||
|     padding: 1em; | ||||
|  | ||||
|     border: 1px solid black; | ||||
|  | ||||
|     width: 50em; | ||||
|     z-index: 2; | ||||
|     opacity: 0.5; | ||||
| } | ||||
|  | ||||
| #menu:hover div#clipboardDiv { | ||||
|     opacity: 1; | ||||
| } | ||||
|  | ||||
| div#clipboardDiv h2 { | ||||
|     margin: 0; | ||||
|     font-size: 1em; | ||||
| } | ||||
|  | ||||
| div#clipboardDiv textarea { | ||||
|     width: 100%; | ||||
| } | ||||
|  | ||||
| div#menuControl { | ||||
|     position: fixed; | ||||
|     top: 0; | ||||
|     left: 0; | ||||
|      | ||||
|     width: 100%; | ||||
|     height: 3px; | ||||
|     background: none; | ||||
|  | ||||
|     z-index: 3; | ||||
| } | ||||
|  | ||||
| /* Viewport Clone */ | ||||
|  | ||||
| div#viewportClone { | ||||
| @@ -248,60 +159,3 @@ div#viewportClone { | ||||
|  | ||||
|     visibility: hidden; | ||||
| } | ||||
|  | ||||
| /* Keyboard event target */ | ||||
|  | ||||
| textarea#eventTarget { | ||||
|     position: absolute; | ||||
|     | ||||
|     /* Hide offscreen */ | ||||
|     left: 0; | ||||
|     top: 0; | ||||
|     width: 0; | ||||
|     height: 0; | ||||
|     opacity: 0; | ||||
|  | ||||
|     overflow: hidden; | ||||
| } | ||||
|  | ||||
| /* Touch-specific menu */ | ||||
|  | ||||
| div#touchMenu { | ||||
|  | ||||
|     position: absolute; | ||||
|     display: none; | ||||
|     z-index: 4; | ||||
|      | ||||
|     white-space: pre; | ||||
|     background: black; | ||||
|     border: 1px solid silver; | ||||
|     padding: 1em; | ||||
|     opacity: 0.8; | ||||
|  | ||||
| } | ||||
|  | ||||
| div#touchClipboardDiv { | ||||
|  | ||||
|     position: absolute; | ||||
|     visibility: hidden; | ||||
|     z-index: 4; | ||||
|  | ||||
|     color: white; | ||||
|     background: black; | ||||
|     border: 1px solid silver; | ||||
|     padding: 1em; | ||||
|     opacity: 0.8; | ||||
|  | ||||
|     max-width: 50em; | ||||
|      | ||||
| } | ||||
|  | ||||
| div#touchClipboardDiv h2 { | ||||
|     margin: 0; | ||||
|     font-size: 1em; | ||||
| } | ||||
|  | ||||
| div#touchClipboardDiv textarea { | ||||
|     width: 100%; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -17,6 +17,10 @@ | ||||
|  *  along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||
|  */ | ||||
|  | ||||
| * { | ||||
|     -webkit-tap-highlight-color: rgba(0,0,0,0); | ||||
| } | ||||
|  | ||||
| body { | ||||
|     background: #EEE; | ||||
|     font-family: FreeSans, Helvetica, Arial, sans-serif; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user