Call move if object's location changed.
This commit is contained in:
1 parent
dd04d849d6
commit
4fc8daa916
1 file changed
+8
-5
@@ -900,8 +900,11 @@ GuacAdmin.ConnectionEditor = function(connection, parameters) {
|
|||||||
updated_connection.parent = location_value;
|
updated_connection.parent = location_value;
|
||||||
|
|
||||||
// Update connection if it exists
|
// Update connection if it exists
|
||||||
if (connection.id)
|
if (connection.id) {
|
||||||
GuacamoleService.Connections.update(updated_connection, parameters);
|
GuacamoleService.Connections.update(updated_connection, parameters);
|
||||||
|
if (location_value.id !== connection.parent.id)
|
||||||
|
GuacamoleService.Connections.move(updated_connection, location_value, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
// Otherwise, create
|
// Otherwise, create
|
||||||
else
|
else
|
||||||
@@ -1082,12 +1085,12 @@ GuacAdmin.ConnectionGroupEditor = function(group, parameters) {
|
|||||||
name_field.value
|
name_field.value
|
||||||
);
|
);
|
||||||
|
|
||||||
// Populate location
|
|
||||||
updated_group.parent = location_value;
|
|
||||||
|
|
||||||
// Update group if provided
|
// Update group if provided
|
||||||
if (group.id)
|
if (group.id) {
|
||||||
GuacamoleService.ConnectionGroups.update(updated_group, parameters);
|
GuacamoleService.ConnectionGroups.update(updated_group, parameters);
|
||||||
|
if (location_value.id !== group.parent.id)
|
||||||
|
GuacamoleService.ConnectionGroups.move(updated_group, location_value, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
// Otherwise, create
|
// Otherwise, create
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user