From 5dc81a07be4e949503d7dec92b3ea2b7838417e1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 19 Jan 2018 16:03:49 +0100 Subject: [PATCH] Suppress visibility filter for the FontAwesome selection tool --- .../WoltLabSuite/Core/Ui/ItemList/Filter.js | 21 +++++++++++-------- .../WoltLabSuite/Core/Ui/Style/FontAwesome.js | 3 ++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Filter.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Filter.js index ffcb607df6..4eb7f67b55 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Filter.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Filter.js @@ -42,7 +42,8 @@ define(['Core', 'EventKey', 'Language', 'List', 'StringUtil', 'Dom/Util', 'Ui/Si this._value = ''; this._options = Core.extend({ - callbackPrepareItem: undefined + callbackPrepareItem: undefined, + enableVisibilityFilter: true }, options); var element = elById(elementId); @@ -86,16 +87,18 @@ define(['Core', 'EventKey', 'Language', 'List', 'StringUtil', 'Dom/Util', 'Ui/Si this.reset(); }).bind(this)); - var visibilityButton = elCreate('a'); - visibilityButton.href = '#'; - visibilityButton.className = 'button inputSuffix jsTooltip'; - visibilityButton.title = Language.get('wcf.global.filter.button.visibility'); - visibilityButton.innerHTML = ''; - visibilityButton.addEventListener(WCF_CLICK_EVENT, this._toggleVisibility.bind(this)); - inputAddon.appendChild(input); inputAddon.appendChild(clearButton); - inputAddon.appendChild(visibilityButton); + + if (this._options.enableVisibilityFilter) { + var visibilityButton = elCreate('a'); + visibilityButton.href = '#'; + visibilityButton.className = 'button inputSuffix jsTooltip'; + visibilityButton.title = Language.get('wcf.global.filter.button.visibility'); + visibilityButton.innerHTML = ''; + visibilityButton.addEventListener(WCF_CLICK_EVENT, this._toggleVisibility.bind(this)); + inputAddon.appendChild(visibilityButton); + } container.appendChild(inputAddon); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Style/FontAwesome.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Style/FontAwesome.js index e77213bb8c..9e833ea17f 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Style/FontAwesome.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Style/FontAwesome.js @@ -98,7 +98,8 @@ define(['Language', 'Ui/Dialog', 'WoltLabSuite/Core/Ui/ItemList/Filter'], functi span: small, text: text }; - } + }, + enableVisibilityFilter: false }); }).bind(this), onShow: function () { -- 2.20.1