select2-rails 3.5.4 → 3.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -6
  3. data/Rakefile +0 -1
  4. data/lib/select2-rails/engine.rb +5 -1
  5. data/lib/select2-rails/source_file.rb +13 -32
  6. data/lib/select2-rails/version.rb +1 -1
  7. data/{app → vendor}/assets/images/select2-spinner.gif +0 -0
  8. data/{app → vendor}/assets/images/select2.png +0 -0
  9. data/{app → vendor}/assets/images/select2x2.png +0 -0
  10. data/{app → vendor}/assets/javascripts/select2.js +735 -261
  11. data/vendor/assets/javascripts/select2_locale_ar.js +19 -0
  12. data/vendor/assets/javascripts/select2_locale_az.js +20 -0
  13. data/{app → vendor}/assets/javascripts/select2_locale_bg.js +12 -9
  14. data/{app → vendor}/assets/javascripts/select2_locale_ca.js +6 -4
  15. data/{app → vendor}/assets/javascripts/select2_locale_cs.js +6 -4
  16. data/{app → vendor}/assets/javascripts/select2_locale_da.js +4 -2
  17. data/{app → vendor}/assets/javascripts/select2_locale_de.js +7 -4
  18. data/{app → vendor}/assets/javascripts/select2_locale_el.js +11 -9
  19. data/{app → vendor}/assets/javascripts/select2_locale_es.js +10 -6
  20. data/{app → vendor}/assets/javascripts/select2_locale_et.js +4 -2
  21. data/{app → vendor}/assets/javascripts/select2_locale_eu.js +6 -4
  22. data/vendor/assets/javascripts/select2_locale_fa.js +21 -0
  23. data/{app → vendor}/assets/javascripts/select2_locale_fi.js +6 -4
  24. data/{app → vendor}/assets/javascripts/select2_locale_fr.js +9 -6
  25. data/{app → vendor}/assets/javascripts/select2_locale_gl.js +6 -4
  26. data/{app → vendor}/assets/javascripts/select2_locale_he.js +6 -4
  27. data/vendor/assets/javascripts/select2_locale_hr.js +24 -0
  28. data/{app → vendor}/assets/javascripts/select2_locale_hu.js +7 -5
  29. data/vendor/assets/javascripts/select2_locale_id.js +21 -0
  30. data/{app → vendor}/assets/javascripts/select2_locale_is.js +8 -7
  31. data/{app → vendor}/assets/javascripts/select2_locale_it.js +6 -4
  32. data/{app → vendor}/assets/javascripts/select2_locale_ja.js +4 -2
  33. data/vendor/assets/javascripts/select2_locale_ka.js +19 -0
  34. data/{app → vendor}/assets/javascripts/select2_locale_ko.js +6 -4
  35. data/vendor/assets/javascripts/select2_locale_lt.js +26 -0
  36. data/{app → vendor}/assets/javascripts/select2_locale_lv.js +12 -9
  37. data/{app → vendor}/assets/javascripts/select2_locale_mk.js +6 -4
  38. data/{app → vendor}/assets/javascripts/select2_locale_ms.js +8 -4
  39. data/vendor/assets/javascripts/select2_locale_nb.js +22 -0
  40. data/{app → vendor}/assets/javascripts/select2_locale_nl.js +9 -7
  41. data/{app → vendor}/assets/javascripts/select2_locale_no.js +6 -4
  42. data/vendor/assets/javascripts/select2_locale_pl.js +54 -0
  43. data/{app → vendor}/assets/javascripts/select2_locale_pt-BR.js +9 -6
  44. data/{app → vendor}/assets/javascripts/select2_locale_pt-PT.js +6 -4
  45. data/{app → vendor}/assets/javascripts/select2_locale_ro.js +6 -4
  46. data/vendor/assets/javascripts/select2_locale_rs.js +19 -0
  47. data/vendor/assets/javascripts/select2_locale_ru.js +23 -0
  48. data/{app → vendor}/assets/javascripts/select2_locale_sk.js +15 -13
  49. data/{app → vendor}/assets/javascripts/select2_locale_sv.js +6 -4
  50. data/{app → vendor}/assets/javascripts/select2_locale_th.js +6 -4
  51. data/{app → vendor}/assets/javascripts/select2_locale_tr.js +7 -4
  52. data/vendor/assets/javascripts/select2_locale_ug-CN.js +16 -0
  53. data/vendor/assets/javascripts/select2_locale_uk.js +25 -0
  54. data/{app → vendor}/assets/javascripts/select2_locale_vi.js +10 -8
  55. data/{app → vendor}/assets/javascripts/select2_locale_zh-CN.js +6 -4
  56. data/{app → vendor}/assets/javascripts/select2_locale_zh-TW.js +6 -4
  57. data/{app → vendor}/assets/stylesheets/select2-bootstrap.css +1 -1
  58. data/{app/assets/stylesheets/select2.css.erb → vendor/assets/stylesheets/select2.scss} +136 -62
  59. metadata +66 -61
  60. data/app/assets/javascripts/select2_locale_ar.js +0 -17
  61. data/app/assets/javascripts/select2_locale_fa.js +0 -17
  62. data/app/assets/javascripts/select2_locale_hr.js +0 -42
  63. data/app/assets/javascripts/select2_locale_id.js +0 -17
  64. data/app/assets/javascripts/select2_locale_lt.js +0 -29
  65. data/app/assets/javascripts/select2_locale_pl.js +0 -37
  66. data/app/assets/javascripts/select2_locale_ru.js +0 -15
  67. data/app/assets/javascripts/select2_locale_uk.js +0 -17
@@ -6,12 +6,14 @@
6
6
  (function ($) {
7
7
  "use strict";
8
8
 
9
- $.extend($.fn.select2.defaults, {
9
+ $.fn.select2.locales['sv'] = {
10
10
  formatNoMatches: function () { return "Inga träffar"; },
11
11
  formatInputTooShort: function (input, min) { var n = min - input.length; return "Var god skriv in " + n + (n>1 ? " till tecken" : " tecken till"); },
12
12
  formatInputTooLong: function (input, max) { var n = input.length - max; return "Var god sudda ut " + n + " tecken"; },
13
13
  formatSelectionTooBig: function (limit) { return "Du kan max välja " + limit + " element"; },
14
- formatLoadMore: function (pageNumber) { return "Laddar fler resultat..."; },
15
- formatSearching: function () { return "Söker..."; }
16
- });
14
+ formatLoadMore: function (pageNumber) { return "Laddar fler resultat"; },
15
+ formatSearching: function () { return "Söker"; }
16
+ };
17
+
18
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['sv']);
17
19
  })(jQuery);
@@ -6,12 +6,14 @@
6
6
  (function ($) {
7
7
  "use strict";
8
8
 
9
- $.extend($.fn.select2.defaults, {
9
+ $.fn.select2.locales['th'] = {
10
10
  formatNoMatches: function () { return "ไม่พบข้อมูล"; },
11
11
  formatInputTooShort: function (input, min) { var n = min - input.length; return "โปรดพิมพ์เพิ่มอีก " + n + " ตัวอักษร"; },
12
12
  formatInputTooLong: function (input, max) { var n = input.length - max; return "โปรดลบออก " + n + " ตัวอักษร"; },
13
13
  formatSelectionTooBig: function (limit) { return "คุณสามารถเลือกได้ไม่เกิน " + limit + " รายการ"; },
14
- formatLoadMore: function (pageNumber) { return "กำลังค้นข้อมูลเพิ่ม..."; },
15
- formatSearching: function () { return "กำลังค้นข้อมูล..."; }
16
- });
14
+ formatLoadMore: function (pageNumber) { return "กำลังค้นข้อมูลเพิ่ม…"; },
15
+ formatSearching: function () { return "กำลังค้นข้อมูล…"; }
16
+ };
17
+
18
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['th']);
17
19
  })(jQuery);
@@ -6,12 +6,15 @@
6
6
  (function ($) {
7
7
  "use strict";
8
8
 
9
- $.extend($.fn.select2.defaults, {
9
+ $.fn.select2.locales['tr'] = {
10
+ formatMatches: function (matches) { if (matches === 1) { return "Sadece bir sonuç bulundu, seçmek için enter tuşuna basabilirsiniz."; } return matches + " sonuç bulundu, yukarı ve aşağı tuşları ile seçebilirsiniz."; },
10
11
  formatNoMatches: function () { return "Sonuç bulunamadı"; },
11
12
  formatInputTooShort: function (input, min) { var n = min - input.length; return "En az " + n + " karakter daha girmelisiniz"; },
12
13
  formatInputTooLong: function (input, max) { var n = input.length - max; return n + " karakter azaltmalısınız"; },
13
14
  formatSelectionTooBig: function (limit) { return "Sadece " + limit + " seçim yapabilirsiniz"; },
14
- formatLoadMore: function (pageNumber) { return "Daha fazla..."; },
15
- formatSearching: function () { return "Aranıyor..."; }
16
- });
15
+ formatLoadMore: function (pageNumber) { return "Daha fazla"; },
16
+ formatSearching: function () { return "Aranıyor"; }
17
+ };
18
+
19
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['tr']);
17
20
  })(jQuery);
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Select2 Uyghur translation
3
+ */
4
+ (function ($) {
5
+ "use strict";
6
+ $.fn.select2.locales['ug-CN'] = {
7
+ formatNoMatches: function () { return "ماس كېلىدىغان ئۇچۇر تېپىلمىدى"; },
8
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "يەنە " + n + " ھەرپ كىرگۈزۈڭ";},
9
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "" + n + "ھەرپ ئۆچۈرۈڭ";},
10
+ formatSelectionTooBig: function (limit) { return "ئەڭ كۆپ بولغاندا" + limit + " تال ئۇچۇر تاللىيالايسىز"; },
11
+ formatLoadMore: function (pageNumber) { return "ئۇچۇرلار ئوقۇلىۋاتىدۇ…"; },
12
+ formatSearching: function () { return "ئىزدەۋاتىدۇ…"; }
13
+ };
14
+
15
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['ug-CN']);
16
+ })(jQuery);
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Select2 Ukrainian translation.
3
+ *
4
+ * @author bigmihail <bigmihail@bigmir.net>
5
+ * @author Uriy Efremochkin <efremochkin@uriy.me>
6
+ */
7
+ (function ($) {
8
+ "use strict";
9
+
10
+ $.fn.select2.locales['uk'] = {
11
+ formatMatches: function (matches) { return character(matches, "результат") + " знайдено, використовуйте клавіші зі стрілками вверх та вниз для навігації."; },
12
+ formatNoMatches: function () { return "Нічого не знайдено"; },
13
+ formatInputTooShort: function (input, min) { return "Введіть буль ласка ще " + character(min - input.length, "символ"); },
14
+ formatInputTooLong: function (input, max) { return "Введіть буль ласка на " + character(input.length - max, "символ") + " менше"; },
15
+ formatSelectionTooBig: function (limit) { return "Ви можете вибрати лише " + character(limit, "елемент"); },
16
+ formatLoadMore: function (pageNumber) { return "Завантаження даних…"; },
17
+ formatSearching: function () { return "Пошук…"; }
18
+ };
19
+
20
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['uk']);
21
+
22
+ function character (n, word) {
23
+ return n + " " + word + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "и" : "" : "ів");
24
+ }
25
+ })(jQuery);
@@ -1,18 +1,20 @@
1
1
  /**
2
2
  * Select2 Vietnamese translation.
3
3
  *
4
- * Author: Long Nguyen <olragon@gmail.com>
4
+ * Author: Long Nguyen <olragon@gmail.com>, Nguyen Chien Cong
5
5
  */
6
6
  (function ($) {
7
7
  "use strict";
8
8
 
9
- $.extend($.fn.select2.defaults, {
9
+ $.fn.select2.locales['vi'] = {
10
10
  formatNoMatches: function () { return "Không tìm thấy kết quả"; },
11
- formatInputTooShort: function (input, min) { var n = min - input.length; return "Vui lòng nhập nhiều hơn " + n + " ký tự" + (n == 1 ? "" : "s"); },
12
- formatInputTooLong: function (input, max) { var n = input.length - max; return "Vui lòng nhập ít hơn " + n + " ký tự" + (n == 1? "" : "s"); },
13
- formatSelectionTooBig: function (limit) { return "Chỉ có thể chọn được " + limit + " tùy chọn" + (limit == 1 ? "" : "s"); },
14
- formatLoadMore: function (pageNumber) { return "Đang lấy thêm kết quả..."; },
15
- formatSearching: function () { return "Đang tìm..."; }
16
- });
11
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "Vui lòng nhập nhiều hơn " + n + " ký tự"; },
12
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "Vui lòng nhập ít hơn " + n + " ký tự"; },
13
+ formatSelectionTooBig: function (limit) { return "Chỉ có thể chọn được " + limit + " lựa chọn"; },
14
+ formatLoadMore: function (pageNumber) { return "Đang lấy thêm kết quả…"; },
15
+ formatSearching: function () { return "Đang tìm"; }
16
+ };
17
+
18
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['vi']);
17
19
  })(jQuery);
18
20
 
@@ -3,12 +3,14 @@
3
3
  */
4
4
  (function ($) {
5
5
  "use strict";
6
- $.extend($.fn.select2.defaults, {
6
+ $.fn.select2.locales['zh-CN'] = {
7
7
  formatNoMatches: function () { return "没有找到匹配项"; },
8
8
  formatInputTooShort: function (input, min) { var n = min - input.length; return "请再输入" + n + "个字符";},
9
9
  formatInputTooLong: function (input, max) { var n = input.length - max; return "请删掉" + n + "个字符";},
10
10
  formatSelectionTooBig: function (limit) { return "你只能选择最多" + limit + "项"; },
11
- formatLoadMore: function (pageNumber) { return "加载结果中..."; },
12
- formatSearching: function () { return "搜索中..."; }
13
- });
11
+ formatLoadMore: function (pageNumber) { return "加载结果中…"; },
12
+ formatSearching: function () { return "搜索中…"; }
13
+ };
14
+
15
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['zh-CN']);
14
16
  })(jQuery);
@@ -3,12 +3,14 @@
3
3
  */
4
4
  (function ($) {
5
5
  "use strict";
6
- $.extend($.fn.select2.defaults, {
6
+ $.fn.select2.locales['zh-TW'] = {
7
7
  formatNoMatches: function () { return "沒有找到相符的項目"; },
8
8
  formatInputTooShort: function (input, min) { var n = min - input.length; return "請再輸入" + n + "個字元";},
9
9
  formatInputTooLong: function (input, max) { var n = input.length - max; return "請刪掉" + n + "個字元";},
10
10
  formatSelectionTooBig: function (limit) { return "你只能選擇最多" + limit + "項"; },
11
- formatLoadMore: function (pageNumber) { return "載入中..."; },
12
- formatSearching: function () { return "搜尋中..."; }
13
- });
11
+ formatLoadMore: function (pageNumber) { return "載入中…"; },
12
+ formatSearching: function () { return "搜尋中…"; }
13
+ };
14
+
15
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['zh-TW']);
14
16
  })(jQuery);
@@ -9,7 +9,7 @@
9
9
 
10
10
  .form-control.select2-container {
11
11
  height: auto !important;
12
- padding: 0px;
12
+ padding: 0;
13
13
  }
14
14
 
15
15
  .form-control.select2-container.select2-dropdown-open {
@@ -1,16 +1,10 @@
1
- //= depend_on_asset "select2.png"
2
- //= depend_on_asset "select2-spinner.gif"
3
- //= depend_on_asset "select2x2.png"
4
1
  /*
5
- Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
2
+ Version: 3.5.4 Timestamp: Sun Aug 30 13:30:32 EDT 2015
6
3
  */
7
4
  .select2-container {
8
5
  margin: 0;
9
6
  position: relative;
10
7
  display: inline-block;
11
- /* inline-block for ie7 */
12
- zoom: 1;
13
- *display: inline;
14
8
  vertical-align: middle;
15
9
  }
16
10
 
@@ -21,7 +15,6 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
21
15
  /*
22
16
  Force border-box so that % widths fit the parent
23
17
  container without overlap because of margin/padding.
24
-
25
18
  More Info : http://www.quirksmode.org/css/box.html
26
19
  */
27
20
  -webkit-box-sizing: border-box; /* webkit */
@@ -57,7 +50,11 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
57
50
  background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%);
58
51
  background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%);
59
52
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0);
60
- background-image: linear-gradient(top, #fff 0%, #eee 50%);
53
+ background-image: linear-gradient(to top, #eee 0%, #fff 50%);
54
+ }
55
+
56
+ html[dir="rtl"] .select2-container .select2-choice {
57
+ padding: 0 8px 0 0;
61
58
  }
62
59
 
63
60
  .select2-container.select2-drop-above .select2-choice {
@@ -69,7 +66,7 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
69
66
  background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 90%);
70
67
  background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 90%);
71
68
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
72
- background-image: linear-gradient(top, #eee 0%, #fff 90%);
69
+ background-image: linear-gradient(to bottom, #eee 0%, #fff 90%);
73
70
  }
74
71
 
75
72
  .select2-container.select2-allowclear .select2-choice .select2-chosen {
@@ -84,6 +81,13 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
84
81
  white-space: nowrap;
85
82
 
86
83
  text-overflow: ellipsis;
84
+ float: none;
85
+ width: auto;
86
+ }
87
+
88
+ html[dir="rtl"] .select2-container .select2-choice > .select2-chosen {
89
+ margin-left: 26px;
90
+ margin-right: 0;
87
91
  }
88
92
 
89
93
  .select2-container .select2-choice abbr {
@@ -98,7 +102,7 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
98
102
  text-decoration: none;
99
103
 
100
104
  border: 0;
101
- background: url(<%= asset_path('select2.png') %>) right top no-repeat;
105
+ background: image-url('select2.png') right top no-repeat;
102
106
  cursor: pointer;
103
107
  outline: 0;
104
108
  }
@@ -148,15 +152,6 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
148
152
  box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
149
153
  }
150
154
 
151
- .select2-drop-auto-width {
152
- border-top: 1px solid #aaa;
153
- width: auto;
154
- }
155
-
156
- .select2-drop-auto-width .select2-search {
157
- padding-top: 4px;
158
- }
159
-
160
155
  .select2-drop.select2-drop-above {
161
156
  margin-top: 1px;
162
157
  border-top: 1px solid #aaa;
@@ -177,6 +172,11 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
177
172
  border-top: 1px solid #5897fb;
178
173
  }
179
174
 
175
+ .select2-drop-auto-width {
176
+ border-top: 1px solid #aaa;
177
+ width: auto;
178
+ }
179
+
180
180
  .select2-container .select2-choice .select2-arrow {
181
181
  display: inline-block;
182
182
  width: 18px;
@@ -195,14 +195,27 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
195
195
  background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
196
196
  background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
197
197
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0);
198
- background-image: linear-gradient(top, #ccc 0%, #eee 60%);
198
+ background-image: linear-gradient(to top, #ccc 0%, #eee 60%);
199
+ }
200
+
201
+ html[dir="rtl"] .select2-container .select2-choice .select2-arrow {
202
+ left: 0;
203
+ right: auto;
204
+
205
+ border-left: none;
206
+ border-right: 1px solid #aaa;
207
+ border-radius: 4px 0 0 4px;
199
208
  }
200
209
 
201
210
  .select2-container .select2-choice .select2-arrow b {
202
211
  display: block;
203
212
  width: 100%;
204
213
  height: 100%;
205
- background: url(<%= asset_path('select2.png') %>) no-repeat 0 1px;
214
+ background: image-url('select2.png') no-repeat 0 1px;
215
+ }
216
+
217
+ html[dir="rtl"] .select2-container .select2-choice .select2-arrow b {
218
+ background-position: 2px 1px;
206
219
  }
207
220
 
208
221
  .select2-search {
@@ -210,8 +223,7 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
210
223
  width: 100%;
211
224
  min-height: 26px;
212
225
  margin: 0;
213
- padding-left: 4px;
214
- padding-right: 4px;
226
+ padding: 4px 4px 0 4px;
215
227
 
216
228
  position: relative;
217
229
  z-index: 10000;
@@ -236,23 +248,29 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
236
248
  -webkit-box-shadow: none;
237
249
  box-shadow: none;
238
250
 
239
- background: #fff url(<%= asset_path('select2.png') %>) no-repeat 100% -22px;
240
- background: url(<%= asset_path('select2.png') %>) no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
241
- background: url(<%= asset_path('select2.png') %>) no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
242
- background: url(<%= asset_path('select2.png') %>) no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
243
- background: url(<%= asset_path('select2.png') %>) no-repeat 100% -22px, linear-gradient(top, #fff 85%, #eee 99%);
251
+ background: #fff image-url('select2.png') no-repeat 100% -22px;
252
+ background: image-url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
253
+ background: image-url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
254
+ background: image-url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
255
+ background: image-url('select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
244
256
  }
245
257
 
246
- .select2-drop.select2-drop-above .select2-search input {
247
- margin-top: 4px;
258
+ html[dir="rtl"] .select2-search input {
259
+ padding: 4px 5px 4px 20px;
260
+
261
+ background: #fff image-url('select2.png') no-repeat -37px -22px;
262
+ background: image-url('select2.png') no-repeat -37px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
263
+ background: image-url('select2.png') no-repeat -37px -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
264
+ background: image-url('select2.png') no-repeat -37px -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
265
+ background: image-url('select2.png') no-repeat -37px -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
248
266
  }
249
267
 
250
268
  .select2-search input.select2-active {
251
- background: #fff url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100%;
252
- background: url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
253
- background: url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
254
- background: url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
255
- background: url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100%, linear-gradient(top, #fff 85%, #eee 99%);
269
+ background: #fff image-url('select2-spinner.gif') no-repeat 100%;
270
+ background: image-url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
271
+ background: image-url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
272
+ background: image-url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
273
+ background: image-url('select2-spinner.gif') no-repeat 100%, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
256
274
  }
257
275
 
258
276
  .select2-container-active .select2-choice,
@@ -277,7 +295,7 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
277
295
  background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee 50%);
278
296
  background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee 50%);
279
297
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
280
- background-image: linear-gradient(top, #fff 0%, #eee 50%);
298
+ background-image: linear-gradient(to top, #fff 0%, #eee 50%);
281
299
  }
282
300
 
283
301
  .select2-dropdown-open.select2-drop-above .select2-choice,
@@ -289,7 +307,7 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
289
307
  background-image: -webkit-linear-gradient(center top, #fff 0%, #eee 50%);
290
308
  background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%);
291
309
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
292
- background-image: linear-gradient(bottom, #fff 0%, #eee 50%);
310
+ background-image: linear-gradient(to bottom, #fff 0%, #eee 50%);
293
311
  }
294
312
 
295
313
  .select2-dropdown-open .select2-choice .select2-arrow {
@@ -297,10 +315,29 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
297
315
  border-left: none;
298
316
  filter: none;
299
317
  }
318
+ html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow {
319
+ border-right: none;
320
+ }
321
+
300
322
  .select2-dropdown-open .select2-choice .select2-arrow b {
301
323
  background-position: -18px 1px;
302
324
  }
303
325
 
326
+ html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow b {
327
+ background-position: -16px 1px;
328
+ }
329
+
330
+ .select2-hidden-accessible {
331
+ border: 0;
332
+ clip: rect(0 0 0 0);
333
+ height: 1px;
334
+ margin: -1px;
335
+ overflow: hidden;
336
+ padding: 0;
337
+ position: absolute;
338
+ width: 1px;
339
+ }
340
+
304
341
  /* results */
305
342
  .select2-results {
306
343
  max-height: 200px;
@@ -312,19 +349,16 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
312
349
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
313
350
  }
314
351
 
352
+ html[dir="rtl"] .select2-results {
353
+ padding: 0 4px 0 0;
354
+ margin: 4px 0 4px 4px;
355
+ }
356
+
315
357
  .select2-results ul.select2-result-sub {
316
358
  margin: 0;
317
359
  padding-left: 0;
318
360
  }
319
361
 
320
- .select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px }
321
- .select2-results ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 40px }
322
- .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 60px }
323
- .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 80px }
324
- .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 100px }
325
- .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 110px }
326
- .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 120px }
327
-
328
362
  .select2-results li {
329
363
  list-style: none;
330
364
  display: list-item;
@@ -349,6 +383,14 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
349
383
  user-select: none;
350
384
  }
351
385
 
386
+ .select2-results-dept-1 .select2-result-label { padding-left: 20px }
387
+ .select2-results-dept-2 .select2-result-label { padding-left: 40px }
388
+ .select2-results-dept-3 .select2-result-label { padding-left: 60px }
389
+ .select2-results-dept-4 .select2-result-label { padding-left: 80px }
390
+ .select2-results-dept-5 .select2-result-label { padding-left: 100px }
391
+ .select2-results-dept-6 .select2-result-label { padding-left: 110px }
392
+ .select2-results-dept-7 .select2-result-label { padding-left: 120px }
393
+
352
394
  .select2-results .select2-highlighted {
353
395
  background: #3875d7;
354
396
  color: #fff;
@@ -368,12 +410,13 @@ Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
368
410
  color: #000;
369
411
  }
370
412
 
371
-
372
413
  .select2-results .select2-no-results,
373
414
  .select2-results .select2-searching,
415
+ .select2-results .select2-ajax-error,
374
416
  .select2-results .select2-selection-limit {
375
417
  background: #f4f4f4;
376
418
  display: list-item;
419
+ padding-left: 5px;
377
420
  }
378
421
 
379
422
  /*
@@ -396,7 +439,11 @@ disabled look for disabled choices in the results dropdown
396
439
  }
397
440
 
398
441
  .select2-more-results.select2-active {
399
- background: #f4f4f4 url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100%;
442
+ background: #f4f4f4 image-url('select2-spinner.gif') no-repeat 100%;
443
+ }
444
+
445
+ .select2-results .select2-ajax-error {
446
+ background: rgba(255, 50, 50, .2);
400
447
  }
401
448
 
402
449
  .select2-more-results {
@@ -430,7 +477,7 @@ disabled look for disabled choices in the results dropdown
430
477
  height: auto !important;
431
478
  height: 1%;
432
479
  margin: 0;
433
- padding: 0;
480
+ padding: 0 5px 0 0;
434
481
  position: relative;
435
482
 
436
483
  border: 1px solid #aaa;
@@ -441,7 +488,11 @@ disabled look for disabled choices in the results dropdown
441
488
  background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff));
442
489
  background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%);
443
490
  background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%);
444
- background-image: linear-gradient(top, #eee 1%, #fff 15%);
491
+ background-image: linear-gradient(to bottom, #eee 1%, #fff 15%);
492
+ }
493
+
494
+ html[dir="rtl"] .select2-container-multi .select2-choices {
495
+ padding: 0 0 0 5px;
445
496
  }
446
497
 
447
498
  .select2-locked {
@@ -463,6 +514,10 @@ disabled look for disabled choices in the results dropdown
463
514
  float: left;
464
515
  list-style: none;
465
516
  }
517
+ html[dir="rtl"] .select2-container-multi .select2-choices li
518
+ {
519
+ float: right;
520
+ }
466
521
  .select2-container-multi .select2-choices .select2-search-field {
467
522
  margin: 0;
468
523
  padding: 0;
@@ -484,7 +539,7 @@ disabled look for disabled choices in the results dropdown
484
539
  }
485
540
 
486
541
  .select2-container-multi .select2-choices .select2-search-field input.select2-active {
487
- background: #fff url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100% !important;
542
+ background: #fff image-url('select2-spinner.gif') no-repeat 100% !important;
488
543
  }
489
544
 
490
545
  .select2-default {
@@ -519,7 +574,12 @@ disabled look for disabled choices in the results dropdown
519
574
  background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee));
520
575
  background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
521
576
  background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
522
- background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
577
+ background-image: linear-gradient(to bottom, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
578
+ }
579
+ html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice
580
+ {
581
+ margin: 3px 5px 3px 0;
582
+ padding: 3px 18px 3px 5px;
523
583
  }
524
584
  .select2-container-multi .select2-choices .select2-search-choice .select2-chosen {
525
585
  cursor: default;
@@ -538,13 +598,22 @@ disabled look for disabled choices in the results dropdown
538
598
 
539
599
  font-size: 1px;
540
600
  outline: none;
541
- background: url(<%= asset_path('select2.png') %>) right top no-repeat;
601
+ background: image-url('select2.png') right top no-repeat;
602
+ }
603
+ html[dir="rtl"] .select2-search-choice-close {
604
+ right: auto;
605
+ left: 3px;
542
606
  }
543
607
 
544
608
  .select2-container-multi .select2-search-choice-close {
545
609
  left: 3px;
546
610
  }
547
611
 
612
+ html[dir="rtl"] .select2-container-multi .select2-search-choice-close {
613
+ left: auto;
614
+ right: 2px;
615
+ }
616
+
548
617
  .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
549
618
  background-position: right -11px;
550
619
  }
@@ -604,15 +673,20 @@ disabled look for disabled choices in the results dropdown
604
673
  height: 100px;
605
674
  overflow: scroll;
606
675
  }
676
+
607
677
  /* Retina-ize icons */
608
678
 
609
- @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) {
610
- .select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice .select2-arrow b {
611
- background-image: url(<%= asset_path('select2x2.png') %>) !important;
612
- background-repeat: no-repeat !important;
613
- background-size: 60px 40px !important;
614
- }
615
- .select2-search input {
616
- background-position: 100% -21px !important;
617
- }
679
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 2dppx) {
680
+ .select2-search input,
681
+ .select2-search-choice-close,
682
+ .select2-container .select2-choice abbr,
683
+ .select2-container .select2-choice .select2-arrow b {
684
+ background-image: image-url('select2x2.png') !important;
685
+ background-repeat: no-repeat !important;
686
+ background-size: 60px 40px !important;
687
+ }
688
+
689
+ .select2-search input {
690
+ background-position: 100% -21px !important;
691
+ }
618
692
  }