mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
Remove unused GuacUI utility functions.
This commit is contained in:
parent
3acda2fa28
commit
d7006264ad
@ -45,23 +45,6 @@ GuacUI.createChildElement = function(parent, tagname, classname) {
|
||||
return element;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a new row within the given table having a single header cell
|
||||
* with the given title, and a single value cell. The value cell is returned.
|
||||
*/
|
||||
GuacUI.createTabulatedContainer = function(table, title) {
|
||||
|
||||
// Create elements
|
||||
var row = GuacUI.createChildElement(table, "tr");
|
||||
var header = GuacUI.createChildElement(row, "th");
|
||||
var cell = GuacUI.createChildElement(row, "td");
|
||||
|
||||
// Set title, return cell
|
||||
header.textContent = title;
|
||||
return cell;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds the given CSS class to the given element.
|
||||
*/
|
||||
@ -107,55 +90,6 @@ GuacUI.removeClass = function(element, classname) {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Opens the connection group having the given ID in a new tab/window.
|
||||
*
|
||||
* @param {String} id The ID of the connection group to open.
|
||||
* @param {String} parameters Any parameters that should be added to the URL,
|
||||
* for sake of authentication.
|
||||
*/
|
||||
GuacUI.openConnectionGroup = function(id, parameters) {
|
||||
GuacUI.openObject("g/" + id, parameters);
|
||||
};
|
||||
|
||||
/**
|
||||
* Opens the connection having the given ID in a new tab/window.
|
||||
*
|
||||
* @param {String} id The ID of the connection to open.
|
||||
* @param {String} parameters Any parameters that should be added to the URL,
|
||||
* for sake of authentication.
|
||||
*/
|
||||
GuacUI.openConnection = function(id, parameters) {
|
||||
GuacUI.openObject("c/" + id, parameters);
|
||||
};
|
||||
|
||||
/**
|
||||
* Opens the object having the given ID in a new tab/window. The ID must
|
||||
* include the relevant prefix.
|
||||
*
|
||||
* @param {String} id The ID of the object to open, including prefix.
|
||||
* @param {String} parameters Any parameters that should be added to the URL,
|
||||
* for sake of authentication.
|
||||
*/
|
||||
GuacUI.openObject = function(id, parameters) {
|
||||
|
||||
// Get URL
|
||||
var url = "client.xhtml?id=" + encodeURIComponent(id);
|
||||
|
||||
// Add parameters, if given
|
||||
if (parameters)
|
||||
url += "&" + parameters;
|
||||
|
||||
// Attempt to focus existing window
|
||||
var current = window.open(null, id);
|
||||
|
||||
// If window did not already exist, set up as
|
||||
// Guacamole client
|
||||
if (!current.GuacUI)
|
||||
window.open(url, id);
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Object describing the UI's level of audio support. If the user has request
|
||||
* that audio be disabled, this object will pretend that audio is not
|
||||
|
Loading…
Reference in New Issue
Block a user