Add GuacamoleService.Connection.open()

This commit is contained in:
Michael Jumper
2013-08-13 15:08:32 -07:00
parent ab74d341b8
commit 4e5e401168

View File

@@ -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);
};
};
/**