Merge pull request #594 from omab/master
Results sorting on populateResults function
This commit is contained in:
commit
df5a03f0b6
@ -705,6 +705,9 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
populate=function(results, container, depth) {
|
populate=function(results, container, depth) {
|
||||||
|
|
||||||
var i, l, result, selectable, compound, node, label, innerContainer, formatted;
|
var i, l, result, selectable, compound, node, label, innerContainer, formatted;
|
||||||
|
|
||||||
|
results = opts.sortResults(results, container, query);
|
||||||
|
|
||||||
for (i = 0, l = results.length; i < l; i = i + 1) {
|
for (i = 0, l = results.length; i < l; i = i + 1) {
|
||||||
|
|
||||||
result=results[i];
|
result=results[i];
|
||||||
@ -2402,6 +2405,9 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
formatSelection: function (data, container) {
|
formatSelection: function (data, container) {
|
||||||
return data ? data.text : undefined;
|
return data ? data.text : undefined;
|
||||||
},
|
},
|
||||||
|
sortResults: function (results, container, query) {
|
||||||
|
return results;
|
||||||
|
},
|
||||||
formatResultCssClass: function(data) {return undefined;},
|
formatResultCssClass: function(data) {return undefined;},
|
||||||
formatNoMatches: function () { return "No matches found"; },
|
formatNoMatches: function () { return "No matches found"; },
|
||||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " more character" + (n == 1? "" : "s"); },
|
formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " more character" + (n == 1? "" : "s"); },
|
||||||
|
Loading…
Reference in New Issue
Block a user