mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
Support for user-defined classes in keyboard XML.
This commit is contained in:
@@ -170,11 +170,16 @@ Guacamole.OnScreenKeyboard = function(url) {
|
||||
|
||||
// Get attributes
|
||||
var key_size = e.attributes["size"];
|
||||
var key_class = e.attributes["class"];
|
||||
|
||||
// Create element
|
||||
var key_element = document.createElement("div");
|
||||
key_element.className = "guac-keyboard-key";
|
||||
|
||||
// Append class if specified
|
||||
if (key_class)
|
||||
key_element.className += " " + key_class.value;
|
||||
|
||||
// Position keys using container div
|
||||
var key_container_element = document.createElement("div");
|
||||
key_container_element.className = "guac-keyboard-key-container";
|
||||
@@ -198,6 +203,7 @@ Guacamole.OnScreenKeyboard = function(url) {
|
||||
var modifier = e.attributes["modifier"];
|
||||
var keysym = e.attributes["keysym"];
|
||||
var sticky = e.attributes["sticky"];
|
||||
var cap_class = e.attributes["class"];
|
||||
|
||||
// Get content of key cap
|
||||
var content = e.textContent;
|
||||
@@ -215,6 +221,10 @@ Guacamole.OnScreenKeyboard = function(url) {
|
||||
cap_element.textContent = content;
|
||||
key_element.appendChild(cap_element);
|
||||
|
||||
// Append class if specified
|
||||
if (cap_class)
|
||||
cap_element.className += " " + cap_class.value;
|
||||
|
||||
// Get modifier value
|
||||
var modifierValue = 0;
|
||||
if (required) {
|
||||
|
Reference in New Issue
Block a user