Commit Graph

71 Commits

Author SHA1 Message Date
samhed fdedbafb1d * Don't check specific html elements from the display code (Fixes #446)
* Renamed and reworked fbuClip to clippingDisplay
* Added tests for clippingDisplay
* Use the a noVNC_container which covers the entire page to get the full size
  (Fixes #463)
* Added maxWidth and maxHeight to the canvas which can limit the viewport size
* Only show either the canvas or the logo, hide one when the other is shown
* Always center the canvas (previously it was only centered when not clipping)
* Removed iOS specific "position-fixed" fixes and start calling setBarPosition
  on every resize
* Removed the noVNC_screen_pad
2015-03-09 14:30:56 +01:00
samhed 3b8ec46fd2 Make the touch-keyboard code more robust through verifying that global variables are set before use. 2015-03-05 09:54:56 +01:00
Solly Ross 72747869a7 Support local scaling
This commit adds two new addition scaling options.  Both options do
local scaling.  The first "Local Scaling", does both upscaling and
downscaling.  The second option, "Local Downscaling", only downscales.

This is based on work by @mightypenguin (with an additional bug
reported by @glazik12).
2015-03-03 13:15:49 -05:00
Solly Ross 8b46c0deb0 Update UI to allow for different scaling modes
This commit updates the UI to allow for different
scaling modes.  The "resize" option was changed to
be a dropdown with the following options: "None" (nothing),
"Remote Resizing" (SetDesktopSize).
2015-02-27 17:13:51 -05:00
Solly Ross e543525faa Fix disconnect/reconnect issues
Commit 155d78b399 prevented reconnections
from working properly.  This fixes that by creating a new RFB object
after disconnecting or failing.

Furthermore, this ensures that a new connection cannot be opened util
we've actually disconnected (either by timer or by receiving a `close`
event).

Closes #452
2015-02-25 11:01:18 -05:00
samhed f8b399d7df Support automatic resize [Part 3/4]: ui.js
* Added a resize request (setDesktopSize) triggered when connecting and by
  changes to the browser window's size.
* Hid the view-drag-hand when the display area is the same or smaller than the
  remote session size.
* Added a setting for the automatic resize feature.
* Updated vnc.html and vnc_auto.html to reflect the changes to the UI.
2015-02-10 17:05:58 +01:00
samhed 5b7598ac6b Use our own event registration function for keyboardinputReset. 2015-02-06 15:53:10 +01:00
samhed bd6874e087 We should use the globally declared UI variable 2014-11-13 17:22:48 +01:00
Solly Ross bbbf42bb5a Cleanup: UI code
File: ui.js
Tests Added: False

Changes:
- Fix JSHint errors
- add some curly braces to improve clarity
- move variable declarations to relevant locations instead of at the top
  of methods
2014-09-15 16:46:02 -04:00
samhed 0bb6a8c50e Fixes issue 344 - problem with backspace on Android. 2014-04-04 17:45:04 +02:00
samhed df0ee70e36 Make sure that the default value of the hidden input field is a space. 2014-03-28 08:54:49 +01:00
Malcolm Scott fb35d50f6a Implement XVP UI in HTML 2014-02-17 17:55:28 -05:00
samhed 20074a49eb Removes the connection timeouts to enable slower clients, connections or servers. 2014-02-06 16:08:00 +01:00
jalf 2ea40fdf9a Keyboard Handling [6/8]: Update everything to include the new keyboard handling scripts 2013-12-05 12:31:48 -05:00
Joel Martin 75d69b9f62 Fix to relfect new github.io page base URL. 2013-10-29 14:38:24 -05:00
samhed f4f72e9db9 Merge branch 'master' of https://github.com/kanaka/noVNC into ctrlalttabesc
Conflicts:
	include/ui.js
	vnc.html
2013-10-11 17:20:49 +02:00
Samuel 270ae2f9f5 Merge pull request #304 from samhed/localcursor
Enables local cursor by default
2013-10-09 01:44:41 -07:00
Joel Martin 7c76fd32a1 Merge pull request #308 from samhed/autoconnect
Autoconnect option as URL query
2013-10-04 13:29:24 -07:00
samhed f8ddfc732d Autoconnect option as URL query 2013-10-04 17:59:03 +02:00
samhed 9b9e741b8c On touch devices the default should be to use a remote cursor. 2013-09-24 11:19:17 +02:00
samhed 97aefe5f83 Enables local cursor by default. 2013-09-23 11:48:16 +02:00
samhed 968431dd46 Catch input events to make the onscreen keyboard work in chrome on android. 2013-09-17 15:01:52 +02:00
samhed b4a979a07e Added a new file for the key symbols, using the well recognized names for the constants from X11:
* The list is found in /usr/include/X11/keysymdef.h
* I did only include the most common symbols for now..
2013-08-30 15:41:46 +02:00
samhed 04d6a8347f Added variables for the keysums to make the code easier to read. 2013-08-29 17:35:22 +02:00
samhed 53c01a2353 Added the extra keys Ctrl, Alt, Tab and Esc to the control bar. 2013-07-25 12:49:37 +02:00
Joel Martin 0e3d505e54 Merge pull request #276 from samhed/screenrealestate
Improved use of screen real estate
2013-07-18 09:58:02 -07:00
samhed 406a8b4e96 Display the desktop name in the document title 2013-07-18 15:51:23 +02:00
samhed 35b29c98ea * On low resolution devices the status text is now justified to the left
button group instead of centered.
* On low resolution devices the padding towards the edges of the screen of
  the left and right button groups are now removed.
* Since the status_bar was merged into the control-bar the actual status_bar
  element became redundant and was therefor removed.
* Improved the style of the control-bar when there is an error or a warning.
* Implemented a fix so that vnc_auto.html works as intended with the improved
  screen real estate patch.
2013-07-17 16:11:19 +02:00
Samuel Mannehed 0fa4e0a90a Merged the control-bar and the status-bar together.
Also added a popup with the status text.
2013-06-28 15:13:20 +02:00
Peter Åstrand (astrand) b66ffcddcf Re-fix pull req #245:
* Must declare port variable.

* Must look for https first, then http.
2013-04-25 09:07:09 +02:00
Will Rouesnel 58873b3222 Use port in UI.initSetting in include/ui.js
Because apparently it is simple enough for me to forget to include in the previous commit.
2013-04-23 14:32:02 +10:00
Will Rouesnel c42136d537 Add default port logic to include/ui.js
Correctly identifies the use of http/https and forces the value of port to 80 and 443
respectively, as in this situation window.location.port is blank.

This is patch includes the same changes as made in vnc_auto.html
2013-04-22 20:07:20 +10:00
Joel Martin 57430b8c12 ui.js: fix drag button so it can be toggled off. 2012-10-19 12:18:21 -05:00
Joel Martin 6f4b1e4071 Refactor dynamic script loading. Add util.js:load_scripts()
Related to issue/pulls:
https://github.com/kanaka/noVNC/issues/194
https://github.com/kanaka/noVNC/pull/201
https://github.com/kanaka/noVNC/pull/202

In IE9, the window.onload event can fire before dynamically loaded
scripts have finished loading. This can result in either WebSocket (in
the case of vnc_auto.html) or RFB (in the case of vnc.html) not being
defined at the point when window.onload is called.

- Move the load_scripts routine from vnc.js to util.js (so that
  websockify can use it too). Also, refactor to work when load_scripts
  is called by a script that itself uses load_scripts. When the whole
  chain of dynamically loaded scripts is finished then call
  window.onscriptsload. Use this mechanism in all the places that
  depend on dynamic loading of scripts: vnc.html, vnc_auto.html,
  websock.js, tests/vnc_playback.html, and tests/vnc_perf.html.

- Use the new window.onscriptsload handler instead of window.onload.

- Remove include/start.js and do the script loading and startup event
  handling in include/ui.js instead.
2012-10-17 11:58:12 -05:00
Joel Martin 1d728ace69 Change noVNC license to from LGPLv3 to MPL 2.0
The MPL 2.0 license is a "file-level" copyleft license vs the
"project-level" nature of the L/GPL. The intention of noVNC has
always been that it should be easy to incorporate into existing
projects and sites whether free/open or proprietary/commercial. The MPL
2.0 is designed for this sort of combination project but still
requires that any distributed modifications to noVNC source files must
also be published under the same license.

In addition, the MPL 2.0 allows the code to be used in L/GPL projects
(the secondary license clause). This means that any projects that are
already incorporating noVNC should not be impacted by this change and
in fact it should clarify the licensing situation (the exact
application of the L/GPL to web applications and interpreted code is
somewhat ambiguous).

The HTML, CSS, image and font files continue to be under more
permissive licenses (see LICENSE.txt). The included websockify python
code remains under a LGPLv3 license although the include/websock.js
file from the websockify component is now under MPL 2.0 as well.

Permission was received from other noVNC authors to make this change to their
code license on the following dates:

    - Chris Gordon (UI): Jun 24, 2012
    - Antoine Mercadal (DOM,*util.js): Oct 10, 2012
    - William Lightning (UltraVNC repeater): Oct 10, 2012
    - Mike Tinglof (tight encoding): Oct 15, 2012
2012-10-15 13:35:00 -05:00
Joel Martin 6f955236e6 include/ui.js: call setBarPosition on initial load.
Call setBarPosition on initial load and not just when the window size
changes or scrolling happens.
2012-09-17 17:15:50 -05:00
Joel Martin 26945049be vnc.html, ui.js: move all Javascript to ui.js.
Move all the inline Javascript event handlers from vnc.html to
include/ui.js except the load handler which is moved to
include/start.js). This is on the path towards a Chrome
extension/packaged app since inline Javascript is prohibited in that
situation.
2012-09-17 17:15:49 -05:00
Joel Martin ee1af44161 ui.js: use localStorage/chrome.storage for settings.
Switch from using cookies to store setting to using localStorage (or
chrome.storage.sync if available in extension/app mode) for the
settings. Also refactor to make the initializing of the setting and
and loading of the UI to be more asynchronous.
2012-09-17 17:15:49 -05:00
Joel Martin d58f8b5144 License clarification: HTML,CSS,images,fonts under permissive licenses.
Clarify in LICENSE.txt that the noVNC core library is the part that is
LGPLv3 licensed. The HTML, CSS, images and fonts are separate from the
core library and can be modified and distributed with the noVNC core
but under their own license conditions.

HTML and CSS: 2-Clause BSD
Fonts: SIL OFL 1.1
Images: CC BY SA 3.0

In other words, you can modify the layout and appearance of of noVNC
to integrate with an existing or new web site or application without
having to publish the source for those modifications under the LGPLv3.
However, use of and modification of the noVNC core library (i.e. the
core Javascript that makes up noVNC) must still be according to the
LGPLv3.

Chris Gordon was the other contributor to the HTML, CSS, and images
included with noVNC and gave permission for this license clarification
on June 23, 2012.
2012-06-24 16:29:44 -05:00
Joel Martin b50f340674 UltraVNC repeaterID cleanup.
https://github.com/kanaka/noVNC/issues/103
https://github.com/kanaka/noVNC/pull/170
2012-06-23 14:22:47 -05:00
William Lightning a997c5fd94 Make repeaterID show up in config options on vnc.html 2012-06-22 22:30:57 -07:00
Joel Martin bd96e91932 Use page host:port as default for WebSocket host/port. 2012-04-03 16:58:21 -05:00
Joel Martin 0ce93900ae Add message panel when hosted at kanaka.github.com.
Add a helpful popup/panel message for when noVNC is used at
kanaka.github.com (e.g. where novnc.com redirects).
2012-02-15 14:12:27 -06:00
Joel Martin 1af3e54bef Make WebSocket encrypt setting default to page protocol.
I.e. if the page is https:// then the WebSocket encrypt setting will
default to wss:// (TLS encryption).

Note that since noVNC settings are saved in cookies, this will only
affect first load. If you have already loaded the page, then the
encrypt setting will be whatever you last set it to.
2012-02-02 09:29:02 -06:00
Joel Martin 6a02f88e4d Default path to 'websockify' in include/ui.js 2012-01-31 13:37:20 -06:00
Joel Martin ff4bfcb773 Linting.
Switched to using: http://www.jshint.com/
2012-01-12 12:38:55 -06:00
Joel Martin 06a9ef0c6c Add View Only mode setting.
Resolve issue: https://github.com/kanaka/noVNC/pull/101

Based on proposal from @mightpenguin:
Matthew Balman <emperor@mightypenguin.org>

If view_only option is set then do not send mouse and keyboard events.
This is not a secure/enforced way to make a client view only. To
enforce view only at the server, most VNC servers support setting
a view only password.
2011-12-01 09:05:16 -06:00
Joel Martin 5299db1a00 Formatting. Image renames/cleanup.
- Remove the images using the old font.

- Simplify the naming of the new control bar icon images.

- Change keyboard input type to 'email'. 'url' type doesn't have
  a space bar.

- Some clarifications to main LICENSE.txt file.
2011-09-29 09:32:09 -05:00
Chris Gordon 938daad1c9 Mobile icons.
- CSS highlighting of buttons when selected.
- Keyboard button tweaked to allow show/hide toggle of keyboard.

Signed-off-by: Chris Gordon <snorkeyg@gmail.com>
2011-09-29 09:05:15 -05:00
Joel Martin 6209639f2c Add WebSocket URL path to UI settings. 2011-09-27 12:36:06 -05:00