From b593d06d588a0e418ef2ce0fefe2233f8690ef73 Mon Sep 17 00:00:00 2001 From: bhoop Date: Mon, 6 Aug 2012 17:42:05 -0300 Subject: [PATCH] Update select2.js Add a "Searching" label state for AJAX data --- select2.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/select2.js b/select2.js index 083f70f1..8af19ce8 100755 --- a/select2.js +++ b/select2.js @@ -1081,6 +1081,9 @@ render("
  • " + opts.formatInputTooShort(search.val(), opts.minimumInputLength) + "
  • "); return; } + else { + render("
  • " + opts.formatSearching() + "
  • "); + } this.resultsPage = 1; opts.query({ @@ -2193,6 +2196,7 @@ formatInputTooShort: function (input, min) { return "Please enter " + (min - input.length) + " more characters"; }, formatSelectionTooBig: function (limit) { return "You can only select " + limit + " items"; }, formatLoadMore: function (pageNumber) { return "Loading more results..."; }, + formatSearch: function () { return "Searching..."; }, minimumResultsForSearch: 0, minimumInputLength: 0, maximumSelectionSize: 0,