Lines 6-25
$.fn.select2.defaults.set("width", "element" );
Link Here
|
6 |
// Internationalization |
6 |
// Internationalization |
7 |
$.fn.select2.defaults.set("language", { |
7 |
$.fn.select2.defaults.set("language", { |
8 |
errorLoading:function(){ return __("The results could not be loaded"); }, |
8 |
errorLoading:function(){ return __("The results could not be loaded"); }, |
9 |
inputTooLong:function(e){ |
9 |
inputTooLong:function(args){ |
10 |
var n = e.input.length - e.max; |
10 |
var n = args.input.length - args.maximum; |
11 |
return __("Please delete %d character(s)").format(n); |
11 |
return __("Please delete %s character(s)").format(n); |
12 |
}, |
12 |
}, |
13 |
inputTooShort:function(e){ |
13 |
inputTooShort:function(e){ |
14 |
var n = e.min - e.input.length; |
14 |
var n = e.minimum - args.input.length; |
15 |
return __("Please enter %n or more characters").format(n); |
15 |
return __("Please enter %s or more characters").format(n); |
16 |
}, |
16 |
}, |
17 |
formatResult: function(item) { |
17 |
formatResult: function(item) { |
18 |
return $('<div>', {title: item.element[0].title}).text(item.text); |
18 |
return $('<div>', {title: item.element[0].title}).text(item.text); |
19 |
}, |
19 |
}, |
20 |
loadingMore:function(){ return __("Loading more results…"); }, |
20 |
loadingMore:function(){ return __("Loading more results…"); }, |
21 |
maximumSelected:function(e){ |
21 |
maximumSelected:function(args){ |
22 |
return __("You can only select %s item(s)").format(e.max); |
22 |
return __("You can only select %s item(s)").format(args.maximum); |
23 |
}, |
23 |
}, |
24 |
noResults:function(){return __("No results found"); }, |
24 |
noResults:function(){return __("No results found"); }, |
25 |
searching:function(){return __("Searching…"); }, |
25 |
searching:function(){return __("Searching…"); }, |
26 |
- |
|
|