1 <script src="[% interface %]/lib/select2/js/select2.min.js"></script>
2 <link rel="stylesheet" type="text/css" href="[% interface %]/lib/select2/css/select2.min.css" />
4 jQuery.extend($.fn.select2.defaults, {
7 var width = this.element.outerWidth();
9 // 18 is the width of .select2-arrow
12 if (this.allowClear) {
13 // 42 is the margin-right of .select2-chosen when allowClear is true
16 // 26 is the margin-right of .select2-chosen when allowClear is false
23 // Internationalization
24 formatMatches: function (matches) {
26 return _("One result is available, press enter to select it.");
28 return _("%s results are available, use up and down arrow keys to navigate.").format(matches);
30 formatNoMatches: function () {
31 return _("No matches found");
33 formatInputTooShort: function (input, min) {
34 var n = min - input.length;
35 return _("Please enter %n or more characters").format(n);
37 formatInputTooLong: function (input, max) {
38 var n = input.length - max;
39 return _("Please delete %d character(s)").format(n);
41 formatSelectionTooBig: function (limit) {
42 return _("You can only select %s item(s)").format(limit);
44 formatLoadMore: function (pageNumber) {
45 return _("Loading more results…");
47 formatSearching: function () {
48 return _("Searching…");