Commit Graph

99 Commits

Author SHA1 Message Date
samhed cd611a5326 Renamed showExtraKeys to toggleExtraKeys 2016-05-12 16:56:50 +02:00
samhed 4e471b5b55 Moved and split the popupStatus function
Now if popupStatus is called twice it will refresh the duration of
the popup. If you want to wait 1.5 seconds and close the popup you
can click the popup itself.
2016-05-12 16:56:50 +02:00
samhed 45c70c9e23 Moved and changed order of the setting-functions 2016-05-12 16:56:50 +02:00
samhed 0bd2cbacaa Remove whitespace from function definitions 2016-05-12 16:56:50 +02:00
samhed 29475d7728 Moved UpdateState and UpdateVisualState 2016-05-12 16:56:49 +02:00
samhed 777cb7a0c5 Cleanup for the resize related functions
Renamed functions, added clarifying comments and moved the resize
related functions closer to the other viewport functions.
2016-05-12 16:56:49 +02:00
samhed 553864e858 Switch names between the container and the screen
The noVNC_container now contains the logo and the screen. While the
noVNC_screen in turn contains the canvas.
2016-05-12 16:56:49 +02:00
samhed f620259bc5 Force clipping mode in Safari on all platforms 2016-04-25 16:38:23 +02:00
samhed 529c64e103 Re-arrange global UI variables 2016-04-25 16:35:49 +02:00
Miguel Xavier Penha Neto c55f05f619 Pass token into the path variable
If a token is already present in the path, the new variable
is ignored.  In order to properly manipulate the path,
a new method, `WebUtil.injectParamIfMissing` was introduced.

Fixes #536

[@directxman12: fix up path manipulation logic]
2016-01-06 15:56:28 -05:00
Ganesh Varadarajan 494b407a0a Add hash fragment as an optional method to supply config variables.
Any config variable like host, port, password, token may be
specified either in the query string (like now), or in the URL hash
fragment. In case a given variable is present in both, the value in the
fragment takes precedence. Supplying variables in the fragment avoids
leaking them to the web server hosting the noVNC viewer HTML.
2015-10-23 18:54:08 +05:30
samhed 045d922406 Moved resizeTimout to the UI object, no reason to have it outside anymore.. 2015-09-22 14:59:44 +02:00
Solly Ross 340290fa1d UI: Fix typo preventing reconnect after password
There was a typo in ui.js preventing the use of the connect button
after a password was entered.
2015-08-24 16:41:00 -04:00
Solly Ross 6940936ffc WIP: Switch to Pako for zlib
This commit introduces an alternate implementation of the zlib
decompressor based on Pako (https://github.com/nodeca/pako).
2015-08-06 14:47:03 -04:00
samhed a6357e8276 * Hide the fullscreen toggle button on Safari since alphanumerical
keyboard input doesn't work in fullscreen.
* Force clipping mode in Internet Explorer while in fullscreen since
  scrollbars doesn't work in fullscreen.
2015-06-25 22:37:05 +02:00
samhed 7d1dc09ad0 Fixes #498 - Add the ability to toggle fullscreen mode 2015-06-25 22:37:05 +02:00
samhed b098afc234 Fix error from a previous commit, there is no data type called 'text'.. 2015-06-25 22:34:44 +02:00
samhed 74f2ac968d Renamed popupStatusPanel to popupStatus and removed the global variable
which kept track on if it was open or not (it automatically closes after
1.5 seconds anyway).
2015-06-25 17:04:55 +02:00
samhed 30bfff81d9 Clarified enableDisableClip (now called enableDisableViewClip) and
moved it to where the other clipping functions are.
2015-06-25 15:29:23 +02:00
samhed 4f19e5c697 Allow the popupStatusPanel to show any text but close it on a 1.5 second timer. 2015-06-25 15:22:53 +02:00
samhed 31ddaa1c7a Clarify code with regards to the viewport drag functionality
* Fixes #502 so that the viewport drag functionality can't get stuck
2015-06-24 16:20:03 +02:00
samhed 29a0e6a8a3 Always show the viewport drag button on touch devices to keep the GUI from
"jumping around". Enable/disable the button instead of show/hide on these
devices.
2015-06-16 22:41:29 +02:00
samhed 1138bdd4b7 Reverting most of commit cb3e4de. The issue was not related to using keyboardinputReset.. the issue was infact a typo which was introduced in 3b8ec46. I must be too tired.. 2015-05-19 13:34:50 +02:00
samhed cb3e4deb73 Stop using keyboardinputReset at the start of keyInput
* This fixes backspace when using the on-screen keyboard on Android
2015-05-19 12:44:30 +02:00
Fabian Zaremba 48d26b2d47 Move #keyboardinput declarations to base.css/ui.js 2015-05-04 12:11:30 +02:00
Solly Ross d9fc1c7be4 Throw exceptions from RFB constructor
Previously, if an error was thrown from the Display constructor
in the RFB constructor, we would attempt to use `RFB#updateState`
to handle this.  However, `RFB#updateState` attempts to close
the WebSocket connection, which doesn't exist at this point.

In the constructor, it's probably just better to raise an exception
instead (making sure to clean up anything relevant).

Fixes #460
2015-03-26 17:10:24 -04:00
Solly Ross 58ded70d15 Create RFB object on connect
In e543525faa, we switched to creating
a new RFB object on disconnect.  This caused issues, however, since
any errors were only displayed briefly before the new "loaded" text
was displayed instead.

Now, we create the RFB object on connect.  This essentially removes
the usefulness of the "loaded" state, but prevents the aforementioned
problem.

To facilitate this, the code which does detection of cursor URI support
was moved from this Display constructor (which now calls the new
function) into its own function, `Util.browserSupportsCursorURIs()`.

Fixes #467
2015-03-26 17:09:05 -04:00
samhed 16b3ef77d1 Make getCanvasLimit more efficient by only calling getPosition once. 2015-03-11 07:29:30 +01:00
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