Remove connection name textbox. Add separate buttons for connection and group creation.

This commit is contained in:
Michael Jumper
2013-08-14 13:43:45 -07:00
parent 63288f45ee
commit 18ef0d2f77
3 changed files with 24 additions and 7 deletions

View File

@@ -29,14 +29,14 @@ var GuacAdmin = {
},
"buttons" : {
"back" : document.getElementById("back"),
"logout" : document.getElementById("logout"),
"add_connection" : document.getElementById("add-connection"),
"add_user" : document.getElementById("add-user")
"back" : document.getElementById("back"),
"logout" : document.getElementById("logout"),
"add_connection" : document.getElementById("add-connection"),
"add_connection_group" : document.getElementById("add-connection-group"),
"add_user" : document.getElementById("add-user")
},
"fields" : {
"connection_name" : document.getElementById("connection-name"),
"username" : document.getElementById("username")
},
@@ -1149,6 +1149,21 @@ GuacAdmin.reset = function() {
}
// Connection group creation
if (GuacAdmin.cached_permissions.administer
|| GuacAdmin.cached_permissions.create_connection_group) {
GuacUI.addClass(document.body, "add-connection-groups");
GuacAdmin.buttons.add_connection_group.onclick = function() {
// Open group creation dialog
var group_dialog = new GuacAdmin.ConnectionGroupEditor(null, parameters);
document.body.appendChild(group_dialog.getElement());
};
}
// User creation
if (GuacAdmin.cached_permissions.administer
|| GuacAdmin.cached_permissions.create_user) {