3 [% Asset.js("lib/select2/js/select2.min.js") | $raw %]
4 [% Asset.css("lib/select2/css/select2.min.css") | $raw %]
5 [% Asset.css("css/select2.css") | $raw %]
8 jQuery.extend($.fn.select2.defaults, {
11 var width = this.element.outerWidth();
13 // 18 is the width of .select2-arrow
16 if (this.allowClear) {
17 // 42 is the margin-right of .select2-chosen when allowClear is true
20 // 26 is the margin-right of .select2-chosen when allowClear is false
27 // Internationalization
28 formatMatches: function (matches) {
30 return _("One result is available, press enter to select it.");
32 return _("%s results are available, use up and down arrow keys to navigate.").format(matches);
34 formatNoMatches: function () {
35 return _("No matches found");
37 formatInputTooShort: function (input, min) {
38 var n = min - input.length;
39 return _("Please enter %n or more characters").format(n);
41 formatInputTooLong: function (input, max) {
42 var n = input.length - max;
43 return _("Please delete %d character(s)").format(n);
45 formatSelectionTooBig: function (limit) {
46 return _("You can only select %s item(s)").format(limit);
48 formatLoadMore: function (pageNumber) {
49 return _("Loading more results…");
51 formatSearching: function () {
52 return _("Searching…");
56 <!-- / select2.inc -->