Bug 22090: Add missing information to cash register CSV file
[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 <script>
7   jQuery.extend($.fn.select2.defaults, {
8     allowClear: true,
9     width: function() {
10       var width = this.element.outerWidth();
11
12       // 18 is the width of .select2-arrow
13       width -= 18;
14
15       if (this.allowClear) {
16         // 42 is the margin-right of .select2-chosen when allowClear is true
17         width += 42;
18       } else {
19         // 26 is the margin-right of .select2-chosen when allowClear is false
20         width += 26;
21       }
22
23       return width;
24     },
25
26     // Internationalization
27     formatMatches: function (matches) {
28       if (matches === 1) {
29         return _("One result is available, press enter to select it.");
30       }
31       return _("%s results are available, use up and down arrow keys to navigate.").format(matches);
32     },
33     formatNoMatches: function () {
34       return _("No matches found");
35     },
36     formatInputTooShort: function (input, min) {
37       var n = min - input.length;
38       return _("Please enter %n or more characters").format(n);
39     },
40     formatInputTooLong: function (input, max) {
41       var n = input.length - max;
42       return _("Please delete %d character(s)").format(n);
43     },
44     formatSelectionTooBig: function (limit) {
45       return _("You can only select %s item(s)").format(limit);
46     },
47     formatLoadMore: function (pageNumber) {
48       return _("Loading more results…");
49     },
50     formatSearching: function () {
51       return _("Searching…");
52     }
53   });
54 </script>