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
29 errorLoading:function(){return"The results could not be loaded."},
30 inputTooLong:function(e){
31 var n = e.input.length - e.max;
32 return _("Please delete %d character(s)").format(n);
34 inputTooShort:function(e){
35 var n = e.min - e.input.length;
36 return _("Please enter %n or more characters").format(n);
38 formatResult: function(item) {
39 return $('<div>', {title: item.element[0].title}).text(item.text);
41 loadingMore:function(){return"Loading more results…"},
42 maximumSelected:function(e){
43 return _("You can only select %s item(s)").format(e.max);
45 noResults:function(){return _("No results found")},
46 searching:function(){return _("Searching…")},
47 removeAllItems:function(){return _("Remove all items")},
48 removeItem:function(){return _("Remove item")}
52 <!-- / select2.inc -->