From 4fc8daa916d82763d834902edf641d013495e02c Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 14 Aug 2013 18:12:44 -0700 Subject: [PATCH] Call move if object's location changed. --- guacamole/src/main/webapp/scripts/admin-ui.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/guacamole/src/main/webapp/scripts/admin-ui.js b/guacamole/src/main/webapp/scripts/admin-ui.js index 48a4ae90e..d38ed4b43 100644 --- a/guacamole/src/main/webapp/scripts/admin-ui.js +++ b/guacamole/src/main/webapp/scripts/admin-ui.js @@ -900,8 +900,11 @@ GuacAdmin.ConnectionEditor = function(connection, parameters) { updated_connection.parent = location_value; // Update connection if it exists - if (connection.id) + if (connection.id) { GuacamoleService.Connections.update(updated_connection, parameters); + if (location_value.id !== connection.parent.id) + GuacamoleService.Connections.move(updated_connection, location_value, parameters); + } // Otherwise, create else @@ -1082,12 +1085,12 @@ GuacAdmin.ConnectionGroupEditor = function(group, parameters) { name_field.value ); - // Populate location - updated_group.parent = location_value; - // Update group if provided - if (group.id) + if (group.id) { GuacamoleService.ConnectionGroups.update(updated_group, parameters); + if (location_value.id !== group.parent.id) + GuacamoleService.ConnectionGroups.move(updated_group, location_value, parameters); + } // Otherwise, create else