From: Alexander Ebert Date: Thu, 29 Jan 2015 17:15:00 +0000 (+0100) Subject: Improved handling of static dropdowns X-Git-Tag: 2.1.0_Beta_4~35 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d46544b2cdb2620157240e7943a304bd5b36c041;p=GitHub%2FWoltLab%2FWCF.git Improved handling of static dropdowns --- diff --git a/wcfsetup/install/files/js/WCF.User.js b/wcfsetup/install/files/js/WCF.User.js index daa00fd557..bc309779b7 100644 --- a/wcfsetup/install/files/js/WCF.User.js +++ b/wcfsetup/install/files/js/WCF.User.js @@ -172,6 +172,7 @@ WCF.User.Panel.Abstract = Class.extend({ */ init: function(triggerElement, identifier, options) { this._dropdown = null; + this._loadData = true; this._identifier = identifier; this._triggerElement = triggerElement; this._options = options; @@ -186,9 +187,14 @@ WCF.User.Panel.Abstract = Class.extend({ this._triggerElement.dblclick($.proxy(this._dblClick, this)); } - var $badge = this._triggerElement.find('span.badge'); - if ($badge.length) { - this._badge = $badge; + if (this._options.staticDropdown === true) { + this._loadData = false; + } + else { + var $badge = this._triggerElement.find('span.badge'); + if ($badge.length) { + this._badge = $badge; + } } },