From 46e3e97d87b82360460316beee16bf9633550ad7 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 8 Feb 2013 00:03:22 -0800 Subject: [PATCH] #268: Implement UserManager.remove(). --- guacamole/src/main/webapp/scripts/admin.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/guacamole/src/main/webapp/scripts/admin.js b/guacamole/src/main/webapp/scripts/admin.js index 6d0a0f4bc..667f8790c 100644 --- a/guacamole/src/main/webapp/scripts/admin.js +++ b/guacamole/src/main/webapp/scripts/admin.js @@ -355,6 +355,11 @@ GuacAdmin.UserManager = function() { */ this.selected = null; + /** + * Set of all user GuacAdmin.ListItems. + */ + this.items = {}; + /** * Returns the DOM element representing this UserManager. */ @@ -452,6 +457,7 @@ GuacAdmin.UserManager = function() { // Append item element.appendChild(item_element); + user_manager.items[username] = item; }; @@ -459,7 +465,14 @@ GuacAdmin.UserManager = function() { * Removes the given username from the users visible within this UserManager. */ this.remove = function(username) { - /* STUB */ + + // If user exists, remove corresponding element and item entry + var item = user_manager.items[username]; + if (item) { + element.removeChild(item.getElement()); + delete user_manager.items[username]; + } + }; /**