From d46544b2cdb2620157240e7943a304bd5b36c041 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 29 Jan 2015 18:15:00 +0100 Subject: [PATCH] Improved handling of static dropdowns --- wcfsetup/install/files/js/WCF.User.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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; + } } }, -- 2.20.1