From: Matthias Schmidt Date: Tue, 5 Feb 2013 13:20:14 +0000 (+0100) Subject: Removes last child from inline editor dropdown if it is a divider X-Git-Tag: 2.0.0_Beta_1~503^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4c5cfd1ab61b45040c3b2141254963883a559f15;p=GitHub%2FWoltLab%2FWCF.git Removes last child from inline editor dropdown if it is a divider --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index ac0fde47d5..7c9637bdde 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -5608,6 +5608,12 @@ WCF.InlineEditor = Class.extend({ if ($hasOptions) { this._dropdowns[$elementID].parent('span').addClass('dropdownOpen'); + + // if last child is divider, remove it + var $lastChild = this._dropdowns[$elementID].children().last(); + if ($lastChild.hasClass('dropdownDivider')) { + $lastChild.remove(); + } } return false;