From: Alexander Ebert Date: Sun, 17 Jul 2016 13:12:30 +0000 (+0200) Subject: Improved inline editing checks X-Git-Tag: 3.0.0_Beta_1~1072 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=22919e43bb6e4da87de9d4e1ec2bbca85166838b;p=GitHub%2FWoltLab%2FWCF.git Improved inline editing checks --- diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js index 236de58d4c..93b531be25 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js @@ -68,7 +68,7 @@ define( if (button !== null) { canEdit = elDataBool(element, 'can-edit'); - if (this._options.canEditInline) { + if (this._options.canEditInline || elDataBool(element, 'can-edit-inline')) { button.addEventListener(WCF_CLICK_EVENT, this._clickDropdown.bind(this, element)); button.classList.add('jsDropdownEnabled'); @@ -248,6 +248,13 @@ define( else { if (objOwns(visibility, item) && visibility[item] === false) { elHide(listItem); + + // check if previous item was a divider + if (i > 0 && i + 1 === this._dropdownMenu.childElementCount) { + if (elData(listItem.previousElementSibling, 'item') === 'divider') { + elHide(listItem.previousElementSibling); + } + } } else { elShow(listItem);