From: Alexander Ebert Date: Tue, 17 Jul 2012 18:35:58 +0000 (+0200) Subject: Fixed WCF.InlineEditor divider behavior X-Git-Tag: 2.0.0_Beta_1~984 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b3524514d34156df661718b546d6edd3fb0f2a0a;p=GitHub%2FWoltLab%2FWCF.git Fixed WCF.InlineEditor divider behavior The InlineEditor now longer appends divider if no previous items exist or the previous item was a divider. --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index d7889adc0e..29e23db4f1 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -4534,17 +4534,22 @@ WCF.InlineEditor = Class.extend({ // validate options var $hasOptions = false; + var $lastElementType = ''; for (var $i = 0, $length = this._options.length; $i < $length; $i++) { var $option = this._options[$i]; if ($option.optionName === 'divider') { - $('
  • ' + $option.label + '
  • ').appendTo(this._dropdowns[$elementID]); $listItem.data('elementID', $elementID).data('optionName', $option.optionName).click($.proxy(this._click, this)); $hasOptions = true; + $lastElementType = $option.optionName; } }