1
0
mirror of synced 2024-11-22 21:16:10 +03:00

Loading next page message formatting implemented, so it could also have localization

Signed-off-by: Igor Vaynberg <igor.vaynberg@github.com>
This commit is contained in:
Aziz Gazanchiyan 2012-06-18 18:08:48 +03:00 committed by Igor Vaynberg
parent 1e2881d5d1
commit 663ba1215f

View File

@ -560,6 +560,7 @@
}, },
formatNoMatches: function () { return "No matches found"; }, formatNoMatches: function () { return "No matches found"; },
formatInputTooShort: function (input, min) { return "Please enter " + (min - input.length) + " more characters"; }, formatInputTooShort: function (input, min) { return "Please enter " + (min - input.length) + " more characters"; },
formatLoadingNextSet: function (pageNumber) { return "Loading more results..."; },
minimumResultsForSearch: 0, minimumResultsForSearch: 0,
minimumInputLength: 0, minimumInputLength: 0,
id: function (e) { return e.id; }, id: function (e) { return e.id; },
@ -888,7 +889,7 @@
postRender(); postRender();
if (data.more === true) { if (data.more === true) {
results.children().filter(":last").append("<li class='select2-more-results'>Loading more results...</li>"); results.children().filter(":last").append("<li class='select2-more-results'>" + opts.formatLoadingNextSet(this.resultsPage) + "</li>");
} }
this.postprocessResults(data, initial); this.postprocessResults(data, initial);