Browse Source

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

Signed-off-by: Igor Vaynberg <[email protected]>
Aziz Gazanchiyan 13 years ago
parent
commit
663ba1215f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      select2.js

+ 2 - 1
select2.js

@@ -560,6 +560,7 @@
                 },
                 formatNoMatches: function () { return "No matches found"; },
                 formatInputTooShort: function (input, min) { return "Please enter " + (min - input.length) + " more characters"; },
+                formatLoadingNextSet: function (pageNumber) { return "Loading more results..."; },
                 minimumResultsForSearch: 0,
                 minimumInputLength: 0,
                 id: function (e) { return e.id; },
@@ -888,7 +889,7 @@
                 postRender();
 
                 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);