From: Matthias Schmidt Date: Sun, 31 Jul 2016 11:18:10 +0000 (+0200) Subject: Resolve media search threshold todo X-Git-Tag: 3.0.0_Beta_1~851 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a308057bf359a4c74272d4284f7b8406dfc5793b;p=GitHub%2FWoltLab%2FWCF.git Resolve media search threshold todo --- diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Base.js b/wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Base.js index b06dafb645..c51c51d816 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Base.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Base.js @@ -28,7 +28,8 @@ define( function MediaManagerBase(options) { this._options = Core.extend({ dialogTitle: Language.get('wcf.media.manager'), - fileTypeFilters: {} + fileTypeFilters: {}, + minSearchLength: 3 }, options); this._media = new Dictionary(); diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Search.js b/wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Search.js index d2b362d8a4..a8dd5045eb 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Search.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Search.js @@ -80,8 +80,7 @@ define(['Ajax', 'Core', 'Dom/Traverse', 'Dom/Util', 'Language', 'WoltLab/WCF/Med var innerInfo = DomTraverse.childByClass(this._input.parentNode.parentNode, 'innerInfo'); - // TODO: threshold option? - if (this._input.value.length >= 3) { + if (this._input.value.length >= this._mediaManager.getOption('minSearchLength')) { if (innerInfo) { elHide(innerInfo); }