From: Matthias Schmidt Date: Sat, 5 Aug 2017 13:56:04 +0000 (+0200) Subject: Merge branch '3.0' X-Git-Tag: 3.1.0_Alpha_1~83 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=86b76fba7e906a4757348bec375fa33edd66c738;p=GitHub%2FWoltLab%2FWCF.git Merge branch '3.0' # Conflicts: # wcfsetup/install/files/js/WoltLabSuite/Core/Media/Manager/Search.js --- 86b76fba7e906a4757348bec375fa33edd66c738 diff --cc wcfsetup/install/files/js/WoltLabSuite/Core/Media/Manager/Search.js index 8936933d6e,624560f3d1..b347c07875 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Manager/Search.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Manager/Search.js @@@ -111,20 -96,18 +111,22 @@@ define(['Ajax', 'Core', 'Dom/Traverse' }, /** - * Sends an AJAX request to fetch search results. + * Shows the search string threshold error. */ - _search: function() { - this._searchMode = true; - - Ajax.api(this, { - parameters: { - imagesOnly: this._mediaManager.getOption('imagesOnly'), - mode: this._mediaManager.getMode(), - searchString: this._input.value - } - }); + _showStringThresholdError: function() { + var innerInfo = DomTraverse.childByClass(this._input.parentNode.parentNode, 'innerInfo'); + if (innerInfo) { + elShow(innerInfo); + } + else { + innerInfo = elCreate('p'); + innerInfo.className = 'innerInfo'; - innerInfo.textContent = Language.get('wcf.media.search.info.searchStringThreshold'); ++ innerInfo.textContent = Language.get('wcf.media.search.info.searchStringThreshold', { ++ minSearchLength: this._mediaManager.getOption('minSearchLength') ++ }); + + DomUtil.insertAfter(innerInfo, this._input.parentNode); + } }, /**