summaryrefslogtreecommitdiff
path: root/resources/src/mediawiki/mediawiki.searchSuggest.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/src/mediawiki/mediawiki.searchSuggest.js')
-rw-r--r--resources/src/mediawiki/mediawiki.searchSuggest.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/resources/src/mediawiki/mediawiki.searchSuggest.js b/resources/src/mediawiki/mediawiki.searchSuggest.js
index a214cb3f..7b7ccf3f 100644
--- a/resources/src/mediawiki/mediawiki.searchSuggest.js
+++ b/resources/src/mediawiki/mediawiki.searchSuggest.js
@@ -41,10 +41,7 @@
baseHref = $form.attr( 'action' );
baseHref += baseHref.indexOf( '?' ) > -1 ? '&' : '?';
- linkParams = {};
- $.each( $form.serializeArray(), function ( idx, obj ) {
- linkParams[ obj.name ] = obj.value;
- } );
+ linkParams = $form.serializeObject();
return {
textParam: context.data.$textbox.attr( 'name' ),
@@ -122,7 +119,7 @@
];
$( searchboxesSelectors.join( ', ' ) )
.suggestions( {
- fetch: function ( query, response ) {
+ fetch: function ( query, response, maxRows ) {
var node = this[0];
api = api || new mw.Api();
@@ -131,6 +128,7 @@
action: 'opensearch',
search: query,
namespace: 0,
+ limit: maxRows,
suggest: ''
} ).done( function ( data ) {
response( data[ 1 ] );