Add GuacamoleService.Connection.open()
This commit is contained in:
1 parent
ab74d341b8
commit
4e5e401168
1 file changed
+18
@@ -155,6 +155,24 @@ GuacamoleService.Connection = function(protocol, id, name) {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Opens this connection in a new tab/window.
|
||||
*/
|
||||
this.open = function() {
|
||||
|
||||
// Get URL
|
||||
var url = "client.xhtml?id=" + encodeURIComponent(guac_connection.id);
|
||||
|
||||
// Attempt to focus existing window
|
||||
var current = window.open(null, guac_connection.id);
|
||||
|
||||
// If window did not already exist, set up as
|
||||
// Guacamole client
|
||||
if (!current.GuacUI)
|
||||
window.open(url, guac_connection.id);
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user