From 386c56840ba952f58782a9bb68476c4125738605 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 14 Aug 2013 14:33:29 -0700 Subject: [PATCH] Ensure parent is set for newly-created connections and groups (for now). Need to actually implement connection/group move. --- guacamole/src/main/webapp/scripts/admin-ui.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/guacamole/src/main/webapp/scripts/admin-ui.js b/guacamole/src/main/webapp/scripts/admin-ui.js index fd9c8eab2..a5ba46c78 100644 --- a/guacamole/src/main/webapp/scripts/admin-ui.js +++ b/guacamole/src/main/webapp/scripts/admin-ui.js @@ -882,8 +882,11 @@ GuacAdmin.ConnectionEditor = function(connection, parameters) { GuacamoleService.Connections.update(updated_connection, parameters); // Otherwise, create - else + else { + // FIXME: Always saving to root. Remove line below when move implemented. + updated_connection.parent = GuacAdmin.cached_root_group; GuacamoleService.Connections.create(updated_connection, parameters); + } // Hide dialog and reset UI dialog.getElement().parentNode.removeChild(dialog.getElement()); @@ -1035,8 +1038,11 @@ GuacAdmin.ConnectionGroupEditor = function(group, parameters) { GuacamoleService.ConnectionGroups.update(updated_group, parameters); // Otherwise, create - else + else { + // FIXME: Always saving to root. Remove line below when move implemented. + updated_group.parent = GuacAdmin.cached_root_group; GuacamoleService.ConnectionGroups.create(updated_group, parameters); + } dialog.getElement().parentNode.removeChild(dialog.getElement()); GuacAdmin.reset();