forked from shaba/openuds
Fixed index.xhtml to work on be compatible with uds 1.5 (needs a minor change to client-ui.js to get paramaters from "query.ui" instead of from document.location.search
This commit is contained in:
parent
0643e44125
commit
04135b14c9
@ -177,13 +177,15 @@
|
||||
|
||||
var params = {}, re=/[^?]*\?([^&]*)&(.*)/;
|
||||
|
||||
params.data = res[1]
|
||||
params.data = res[2]
|
||||
var res = re.exec(qs);
|
||||
|
||||
params.data = res[1];
|
||||
params.exit = res[2];
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
window.query = getQueryParams(document.location);
|
||||
window.query = getQueryParams(document.location.href);
|
||||
|
||||
// Sanity check Guacamole JavaScript API version
|
||||
// if (Guacamole.API_VERSION !== "0.9.1")
|
||||
|
@ -998,8 +998,13 @@ GuacUI.Client.connect = function() {
|
||||
// all parameters should be preserved and passed on for
|
||||
// the sake of authentication.
|
||||
|
||||
var queryArr = [];
|
||||
for( k in window.query ) {
|
||||
queryArr.push(k+"="+window.query[k])
|
||||
}
|
||||
|
||||
var connect_string =
|
||||
window.location.search.substring(1)
|
||||
queryArr.join('&')
|
||||
+ "&width=" + Math.floor(optimal_width)
|
||||
+ "&height=" + Math.floor(optimal_height)
|
||||
+ "&dpi=" + Math.floor(optimal_dpi);
|
||||
@ -1028,6 +1033,7 @@ GuacUI.Client.connect = function() {
|
||||
window.location = window.query.exit;
|
||||
};
|
||||
|
||||
console.log(connect_string);
|
||||
// Connect
|
||||
guac.connect(connect_string);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user