From: Matthias Schmidt Date: Mon, 5 Aug 2013 09:28:14 +0000 (+0200) Subject: Adds possibility to remove dropdowns X-Git-Tag: 2.0.0_Beta_7~62^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a203335d279323918ab8bfeb9df550d6c6337430;p=GitHub%2FWoltLab%2FWCF.git Adds possibility to remove dropdowns Fixes #1426 --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 75bca5ae7e..e05b5107a6 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -831,6 +831,19 @@ WCF.Dropdown = { } }, + /** + * Removes the dropdown with the given container id. + * + * @param string containerID + */ + removeDropdown: function(containerID) { + if (this._menus[containerID]) { + $(this._menus[containerID]).remove(); + delete this._menus[containerID]; + delete this._dropdowns[containerID]; + } + }, + /** * Initializes a dropdown fragment which behaves like a usual dropdown * but is not controlled by a trigger element.