Changeset 2760 for package_branches/invirt-web/ajaxterm-rebased/code
- Timestamp:
- Dec 21, 2009, 1:12:01 AM (15 years ago)
- Location:
- package_branches/invirt-web/ajaxterm-rebased/code
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
package_branches/invirt-web/ajaxterm-rebased/code/static/ajaxterm/ajaxterm.js
r2759 r2760 254 254 opt_paste.attachEvent("onclick", do_paste); 255 255 } 256 $('term').onkeypress=keypress; 257 $('term').onkeydown=keydown; 256 // If tabIndex works, only grab keyboard events when terminal is focused 257 // Otherwise, grab from whole document (e.g. in Safari). 258 var focus_element = document; 259 if(typeof $('term').tabIndex != "undefined") { 260 focus_element = $('term'); 261 focus_element.focus(); 262 } 263 focus_element.onkeypress=keypress; 264 focus_element.onkeydown=keydown; 258 265 force=true; 259 266 timeout=window.setTimeout(update,100); -
package_branches/invirt-web/ajaxterm-rebased/code/templates/terminal.mako
r2758 r2760 22 22 window.onload=function() { 23 23 t=ajaxterm.Terminal("term", ${machine.machine_id}); 24 $('term').focus();25 24 } 26 25 </script>
Note: See TracChangeset
for help on using the changeset viewer.