From: Alexander Ebert Date: Mon, 22 Jul 2019 16:33:07 +0000 (+0200) Subject: Moved the filter input for FontAwesome icons to the top X-Git-Tag: 5.2.0_Alpha_3~18 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7308a8fa1a28ea6515f3656a5356d895b1a5c042;p=GitHub%2FWoltLab%2FWCF.git Moved the filter input for FontAwesome icons to the top --- 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 e45c816442..599fabcf1c 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Filter.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Filter.js @@ -43,9 +43,14 @@ define(['Core', 'EventKey', 'Language', 'List', 'StringUtil', 'Dom/Util', 'Ui/Si this._options = Core.extend({ callbackPrepareItem: undefined, - enableVisibilityFilter: true + enableVisibilityFilter: true, + filterPosition: 'bottom' }, options); + if (this._options.filterPosition !== 'top') { + this._options.filterPosition = 'bottom'; + } + var element = elById(elementId); if (element === null) { throw new Error("Expected a valid element id, '" + elementId + "' does not match anything."); @@ -100,7 +105,12 @@ define(['Core', 'EventKey', 'Language', 'List', 'StringUtil', 'Dom/Util', 'Ui/Si inputAddon.appendChild(visibilityButton); } - container.appendChild(inputAddon); + if (this._options.filterPosition === 'bottom') { + container.appendChild(inputAddon); + } + else { + container.insertBefore(inputAddon, element); + } this._container = container; this._dropdown = null; 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 71e7ee3c27..d62f00d8a2 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Style/FontAwesome.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Style/FontAwesome.js @@ -99,7 +99,8 @@ define(['Language', 'Ui/Dialog', 'WoltLabSuite/Core/Ui/ItemList/Filter'], functi text: text }; }, - enableVisibilityFilter: false + enableVisibilityFilter: false, + filterPosition: 'top' }); }).bind(this), onShow: function () { @@ -111,4 +112,4 @@ define(['Language', 'Ui/Dialog', 'WoltLabSuite/Core/Ui/ItemList/Filter'], functi }; } } -}); \ No newline at end of file +});