Note that the :disabled selector only works on inputs, buttons and the
like.
The current method of applying .noVNC_disabled to the settings
labels is still used. This support is added mostly for completeness.
Note that when a label wraps an input, only the label should have the
disabled attribute. Otherwise the effect applies twice to the input.
By applying the rule to the button within the input, we effectively
applied the opacity twice - making the button almost disappear. Applying
the opacity to the input element is enough.
Gives a more clean look that fits well with the new checkboxes and
radios. The old border was mostly used to contribute to a 3d-effect,
that was used for :active. That :active-styling has been replaced by
activation levels.
Instead of having two different types of effects (hover had a different
color, and active had a 3d-effect simulating a pressed button), we now
have an increasing activation-level. That means the button goes a bit
dark for hover, and then even darker when pressed.
There is also a variant that goes lighter for each activation level,
that can be used when the initial color is dark.
With this change, we can get rid of special :hover and :active styling
for the connect button and the control bar buttons. We can use the same
activation level principle for all buttons.
This results in a few things becoming slighly more rounded, for example
the controlbar, the settings panel and buttons/inputs. Increased
rounding gives a more friendly feel.
To make stuff feel less cramped, lets add some margin here.
As of comitting this, it only affects the logging-level select dropdown
in the settings, but this is a general rule of thumb. It doesn't apply
to checkboxes or radios since they have a margin by default, and their
label to the left.
This is what we use in every other file in noVNC. It also much more
common for a CSS file in general. By standardizing on 4 spaces we can
avoid indentation mistakes.
Try to be more consistent in how we capitalize things. Both the "Title
Case" and "Sentence case" styles are popular, so either would work.
Google and Mozilla both prefer "Sentence case", so let's follow them.
We need to call initSetting() even if we don't have any interesting
default to set, as that is what checks if values have been provided as a
query string.
Fixes 96c76f7.
This can be very useful if you have multiple instances of noVNC, and you
want to redirect them to different VNC servers.
The new default settings will have the same behaviour as before for
systems where noVNC is deployed in the root web folder.
As browsers are placing more and more new functionality as
secure-context only, we need to prepare users for more problems. I find
it likely that we will disable non-HTTPS connections in the future.
The browser might throw an exception right away if there is something it
doesn't like with our connect attempt. E.g. using a non-TLS WebSocket
from a TLS web page.
Our settings are not a fatal requirement, we can fall back on the
default values if they can't be accessed. A scenario where we've seen
this happen is when cookies are disabled in the browser. It seems
localStorage is disabled along with cookies in these settings.
So, lets log a message about the failure and otherwise silently
continue in this case.
Fixes issue #1577.
This is a revert of the code changes in commit
f796b05e42 as it served no functional
purpose.
Fragments were already respected for setting parameters, via a different
function. Thus it is unclear what that commit tried to fix. It also
complicated things by mixing the document location with the window
location.
The comment changes are useful, though, so those are kept.
We should not be listing this in LINGUAS as that gives the impression
that English has en explicit translation. Instead, it is a special case
that the code needs to be explicitly aware of.
This reverts 9a06058 in favour of a more robust fix.
Using <length> type values for line-height can give unexpected
inheritance behaviors. If using <length> values, the inherited
line-height on children is calculated using the font-size of the parent.
What we want is for the line-height of children to be calculated using
it's own font-size.
By instead using a unitless number, we get the behavior we want. Note
that this bug has no effects right now since no children to any of the
related elements have different font-sizes.
Changing the ::after element to be displayed as 'block' lets it be
positioned using relative. This means we can remove the confusing
"position: relative" from the checkbox.