Bug 25727: Adjust translations
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / select2.inc
1 [% USE raw %]
2 [% USE Asset %]
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 %]
6 <!-- select2.inc -->
7 <script>
8   jQuery.extend($.fn.select2.defaults, {
9     allowClear: true,
10     width: function() {
11       var width = this.element.outerWidth();
12
13       // 18 is the width of .select2-arrow
14       width -= 18;
15
16       if (this.allowClear) {
17         // 42 is the margin-right of .select2-chosen when allowClear is true
18         width += 42;
19       } else {
20         // 26 is the margin-right of .select2-chosen when allowClear is false
21         width += 26;
22       }
23
24       return width;
25     },
26
27     // Internationalization
28     language: {
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);
33       },
34       inputTooShort:function(e){
35           var n = e.min - e.input.length;
36           return _("Please enter %n or more characters").format(n);
37       },
38       formatResult: function(item) {
39           return $('<div>', {title: item.element[0].title}).text(item.text);
40       },
41       loadingMore:function(){return"Loading more results…"},
42       maximumSelected:function(e){
43           return _("You can only select %s item(s)").format(e.max);
44       },
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")}
49     }
50   });
51 </script>
52 <!-- / select2.inc -->