1
0
mirror of synced 2025-02-04 06:09:23 +03:00

Merge pull request #1685 from jdecuyper/feature-enable-formatResultCssClass

Enable function formatResultCssClass.
This commit is contained in:
Igor Vaynberg 2013-11-07 09:51:38 -08:00
commit 50698fd51c

View File

@ -956,7 +956,6 @@ the specific language governing permissions and limitations under the Apache Lic
}); });
// this is needed because inside val() we construct choices from options and there id is hardcoded // this is needed because inside val() we construct choices from options and there id is hardcoded
opts.id=function(e) { return e.id; }; opts.id=function(e) { return e.id; };
opts.formatResultCssClass = function(data) { return data.css; };
} else { } else {
if (!("query" in opts)) { if (!("query" in opts)) {
@ -3219,7 +3218,7 @@ the specific language governing permissions and limitations under the Apache Lic
sortResults: function (results, container, query) { sortResults: function (results, container, query) {
return results; return results;
}, },
formatResultCssClass: function(data) {return undefined;}, formatResultCssClass: function(data) {return data.css;},
formatSelectionCssClass: function(data, container) {return undefined;}, formatSelectionCssClass: function(data, container) {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"); },