},
/**
- * 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);
+ }
},
/**