Changeset ad10112 in guacamole
- Timestamp:
- 04/08/12 18:56:11 (13 months ago)
- Branches:
- master, guacamole-debian-parent, rpm, unstable, unstable-websocket
- Children:
- fae5867
- Parents:
- 32a768a
- git-author:
- Michael Jumper <zhangmaike@…> (04/08/12 18:56:11)
- git-committer:
- Michael Jumper <zhangmaike@…> (04/08/12 18:56:11)
- Location:
- src/main/webapp
- Files:
-
- 3 added
- 3 edited
-
client.xhtml (modified) (1 diff)
-
images/menu-icons/tango/edit-paste.png (added)
-
images/menu-icons/tango/input-keyboard.png (added)
-
images/menu-icons/tango/system-log-out.png (added)
-
scripts/interface.js (modified) (7 diffs)
-
styles/client.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/main/webapp/client.xhtml
r32a768a rad10112 85 85 </div> 86 86 87 <!-- Touch-specific menu --> 88 <div class="dialogOuter"> 89 <div class="dialogMiddle"> 90 91 <div id="touchMenu"> 92 <img id="touchShowClipboard" src="images/menu-icons/tango/edit-paste.png"/> 93 <img id="touchShowKeyboard" src="images/menu-icons/tango/input-keyboard.png"/> 94 <img id="touchLogout" src="images/menu-icons/tango/system-log-out.png"/> 95 </div> 96 97 </div> 98 </div> 99 87 100 <!-- guacamole-common-js scripts --> 88 101 <script type="text/javascript" src="guacamole-common-js/keyboard.js"></script> -
src/main/webapp/scripts/interface.js
r32a768a rad10112 38 38 "ctrlAltDelete": document.getElementById("ctrlAltDelete"), 39 39 "reconnect" : document.getElementById("reconnect"), 40 "logout" : document.getElementById("logout") 40 "logout" : document.getElementById("logout"), 41 42 "touchShowClipboard" : document.getElementById("touchShowClipboard"), 43 "touchShowKeyboard" : document.getElementById("touchShowKeyboard"), 44 "touchLogout" : document.getElementById("touchLogout") 41 45 42 46 }, … … 134 138 }; 135 139 140 GuacamoleUI.hideTouchMenu = function() { 141 GuacamoleUI.touchMenu.style.visibility = "hidden"; 142 }; 143 144 GuacamoleUI.showTouchMenu = function() { 145 GuacamoleUI.touchMenu.style.visibility = "visible"; 146 }; 147 136 148 GuacamoleUI.shadeMenu = function() { 137 149 … … 213 225 }; 214 226 215 // Assume no native OSK by default 216 GuacamoleUI.oskMode = GuacamoleUI.OSK_MODE_GUAC; 227 GuacamoleUI.buttons.touchShowClipboard.onclick = function() { 228 // FIXME: Implement 229 alert("Not yet implemented... Sorry."); 230 }; 217 231 218 232 // Show/Hide keyboard … … 229 243 window.clearInterval(keyboardResizeInterval); 230 244 } 231 232 // If not shown ... action depends on OSK mode.245 246 // Otherwise, show it 233 247 else { 234 235 // If we think the platform has a native OSK, use the event target to236 // cause it to display.237 if (GuacamoleUI.oskMode == GuacamoleUI.OSK_MODE_NATIVE) {238 239 // ...but use the Guac OSK if clicked again240 GuacamoleUI.oskMode = GuacamoleUI.OSK_MODE_GUAC;241 242 // Try to show native OSK by focusing eventTarget.243 GuacamoleUI.eventTarget.focus();244 return;245 246 }247 248 248 249 // Ensure event target is NOT focused if we are using the Guac OSK. … … 254 255 // Automatically update size 255 256 window.onresize = updateKeyboardSize; 256 keyboardResizeInterval = window.setInterval(updateKeyboardSize, GuacamoleUI.KEYBOARD_AUTO_RESIZE_INTERVAL); 257 keyboardResizeInterval = window.setInterval(updateKeyboardSize, 258 GuacamoleUI.KEYBOARD_AUTO_RESIZE_INTERVAL); 257 259 258 260 updateKeyboardSize(); 259 } 260 261 262 }; 261 262 } 263 264 }; 265 266 // Touch-specific keyboard show 267 GuacamoleUI.buttons.touchShowKeyboard.ontouchstart = 268 GuacamoleUI.buttons.touchShowKeyboard.onclick = 269 function(e) { 270 GuacamoleUI.eventTarget.focus(); 271 GuacamoleUI.hideTouchMenu(); 272 e.preventDefault(); 273 }; 263 274 264 275 // Logout 265 GuacamoleUI.buttons.logout.onclick = function() { 266 window.location.href = "logout"; 267 }; 276 GuacamoleUI.buttons.logout.onclick = 277 GuacamoleUI.buttons.touchLogout.onclick = 278 function() { 279 window.location.href = "logout"; 280 }; 268 281 269 282 // Timeouts for detecting if users wants menu to open or close … … 351 364 // Assume native OSK if menu shown via long-press 352 365 GuacamoleUI.oskMode = GuacamoleUI.OSK_MODE_NATIVE; 353 GuacamoleUI.show Menu();366 GuacamoleUI.showTouchMenu(); 354 367 355 368 }, GuacamoleUI.LONG_PRESS_DETECT_TIMEOUT); … … 368 381 // Close menu if shown 369 382 GuacamoleUI.shadeMenu(); 383 GuacamoleUI.hideTouchMenu(); 370 384 371 385 // Record touch location -
src/main/webapp/styles/client.css
r32a768a rad10112 257 257 overflow: hidden; 258 258 } 259 260 /* Touch-specific menu */ 261 262 div#touchMenu { 263 display: inline-block; 264 background: black; 265 border: 1px solid silver; 266 padding: 1em; 267 opacity: 0.8; 268 }
Note: See TracChangeset
for help on using the changeset viewer.
