mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
Use yui-compressor to combine JS into one file. Rename super to hyper to satisfy yui-compressor.
This commit is contained in:
@@ -49,8 +49,8 @@
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
@@ -70,8 +70,33 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>net.alchim31.maven</groupId>
|
||||
<artifactId>yuicompressor-maven-plugin</artifactId>
|
||||
<version>1.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compress</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<nosuffix>true</nosuffix>
|
||||
<aggregations>
|
||||
<aggregation>
|
||||
<output>${project.build.directory}/guacamole.js</output>
|
||||
<includes>
|
||||
<include>${basedir}/src/main/resources/common/license.js</include>
|
||||
<include>**/*.js</include>
|
||||
</includes>
|
||||
</aggregation>
|
||||
</aggregations>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
21
guacamole-common-js/src/main/resources/common/license.js
Normal file
21
guacamole-common-js/src/main/resources/common/license.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Glyptodon LLC
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
@@ -88,7 +88,7 @@ Guacamole.Keyboard = function(element) {
|
||||
40: [0xFF54], // down arrow
|
||||
45: [0xFF63], // insert
|
||||
46: [0xFFFF], // delete
|
||||
91: [0xFFEB], // left window key (super_l)
|
||||
91: [0xFFEB], // left window key (hyper_l)
|
||||
92: [0xFF67], // right window key (menu key?)
|
||||
93: null, // select key
|
||||
112: [0xFFBE], // f1
|
||||
@@ -242,8 +242,8 @@ Guacamole.Keyboard = function(element) {
|
||||
0xFFE8: true, // Right meta
|
||||
0xFFE9: true, // Left alt
|
||||
0xFFEA: true, // Right alt (or AltGr)
|
||||
0xFFEB: true, // Left super
|
||||
0xFFEC: true // Right super
|
||||
0xFFEB: true, // Left hyper
|
||||
0xFFEC: true // Right hyper
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -467,10 +467,10 @@ Guacamole.Keyboard = function(element) {
|
||||
release_key(0xFFE8); // Right meta
|
||||
}
|
||||
|
||||
// Release super if implicitly released
|
||||
if (guac_keyboard.modifiers.super && state.super === false) {
|
||||
release_key(0xFFEB); // Left super
|
||||
release_key(0xFFEC); // Right super
|
||||
// Release hyper if implicitly released
|
||||
if (guac_keyboard.modifiers.hyper && state.hyper === false) {
|
||||
release_key(0xFFEB); // Left hyper
|
||||
release_key(0xFFEC); // Right hyper
|
||||
}
|
||||
|
||||
// Update state
|
||||
@@ -514,7 +514,7 @@ Guacamole.Keyboard = function(element) {
|
||||
var keypress_unlikely = guac_keyboard.modifiers.ctrl
|
||||
|| guac_keyboard.modifiers.alt
|
||||
|| guac_keyboard.modifiers.meta
|
||||
|| guac_keyboard.modifiers.super;
|
||||
|| guac_keyboard.modifiers.hyper;
|
||||
|
||||
if (keypress_unlikely && e.keyIdentifier)
|
||||
keysym = keysym || keysym_from_key_identifier(
|
||||
@@ -630,10 +630,10 @@ Guacamole.Keyboard.ModifierState = function() {
|
||||
this.meta = false;
|
||||
|
||||
/**
|
||||
* Whether super (windows key) is currently pressed.
|
||||
* Whether hyper (windows key) is currently pressed.
|
||||
* @type Boolean
|
||||
*/
|
||||
this.super = false;
|
||||
this.hyper = false;
|
||||
|
||||
};
|
||||
|
||||
@@ -656,7 +656,7 @@ Guacamole.Keyboard.ModifierState.fromKeyboardEvent = function(e) {
|
||||
|
||||
// Use DOM3 getModifierState() for others
|
||||
if (e.getModifierState) {
|
||||
state.super = e.getModifierState("OS")
|
||||
state.hyper = e.getModifierState("OS")
|
||||
|| e.getModifierState("Super")
|
||||
|| e.getModifierState("Hyper")
|
||||
|| e.getModifierState("Win");
|
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Namespace for all Guacamole JavaScript objects.
|
||||
* @ignore
|
||||
* @namespace
|
||||
*/
|
||||
var Guacamole = Guacamole || {};
|
@@ -6,7 +6,10 @@
|
||||
</formats>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>src/main/resources</directory>
|
||||
<directory>target/</directory>
|
||||
<includes>
|
||||
<include>*.js</include>
|
||||
</includes>
|
||||
<outputDirectory></outputDirectory>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
|
Reference in New Issue
Block a user