Commit d2940d04 authored by Romain Loth's avatar Romain Loth

fix autocompletion limit

parent c6c30856
...@@ -202,9 +202,10 @@ TW.conf = (function(TW){ ...@@ -202,9 +202,10 @@ TW.conf = (function(TW){
// Full-text search // Full-text search
// ---------------- // ----------------
TWConf.maxSearchResults = 10; // how many "top papers" to display TWConf.maxSearchResults = 10 // how many "top papers" to display
TWConf.minLengthAutoComplete = 1; // how many chars to type for autocomp TWConf.minLengthAutoComplete = 1 // how many chars to type for autocomp
TWConf.strSearchBar = "Select topics"; TWConf.maxSuggestionsAutoComplete = 10 // how many suggestions by autocomp
TWConf.strSearchBar = "Select topics"
// =================== // ===================
......
...@@ -507,7 +507,7 @@ var TinaWebJS = function ( sigmacanvas ) { ...@@ -507,7 +507,7 @@ var TinaWebJS = function ( sigmacanvas ) {
} else { } else {
$("#noresults").empty(); $("#noresults").empty();
} }
matches = results.slice(0, TW.conf.minLengthAutoComplete); matches = results.slice(0, TW.conf.maxSuggestionsAutoComplete);
response(matches); response(matches);
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment