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 $.fn.select2.defaults.set("allowClear", true);
9 $.fn.select2.defaults.set("placeholder", "");
11 // Internationalization
12 $.fn.select2.defaults.set("language", {
13 errorLoading:function(){return"The results could not be loaded."},
14 inputTooLong:function(e){
15 var n = e.input.length - e.max;
16 return _("Please delete %d character(s)").format(n);
18 inputTooShort:function(e){
19 var n = e.min - e.input.length;
20 return _("Please enter %n or more characters").format(n);
22 formatResult: function(item) {
23 return $('<div>', {title: item.element[0].title}).text(item.text);
25 loadingMore:function(){return"Loading more results…"},
26 maximumSelected:function(e){
27 return _("You can only select %s item(s)").format(e.max);
29 noResults:function(){return _("No results found")},
30 searching:function(){return _("Searching…")},
31 removeAllItems:function(){return _("Remove all items")},
32 removeItem:function(){return _("Remove item")}
35 <!-- / select2.inc -->