select2-rails 3.5.10 → 4.0.13

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 (79) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +18 -2
  3. data/Rakefile +1 -2
  4. data/lib/select2-rails/engine.rb +0 -4
  5. data/lib/select2-rails/source_file.rb +13 -24
  6. data/lib/select2-rails/version.rb +1 -1
  7. data/select2-rails.gemspec +1 -1
  8. data/vendor/assets/javascripts/select2-full.js +6820 -0
  9. data/vendor/assets/javascripts/select2.js +5561 -3182
  10. data/vendor/assets/javascripts/select2_locale_af.js +3 -0
  11. data/vendor/assets/javascripts/select2_locale_ar.js +2 -18
  12. data/vendor/assets/javascripts/select2_locale_az.js +2 -19
  13. data/vendor/assets/javascripts/select2_locale_bg.js +2 -19
  14. data/vendor/assets/javascripts/select2_locale_bn.js +3 -0
  15. data/vendor/assets/javascripts/select2_locale_bs.js +3 -0
  16. data/vendor/assets/javascripts/select2_locale_ca.js +2 -18
  17. data/vendor/assets/javascripts/select2_locale_cs.js +2 -50
  18. data/vendor/assets/javascripts/select2_locale_da.js +2 -18
  19. data/vendor/assets/javascripts/select2_locale_de.js +2 -17
  20. data/vendor/assets/javascripts/select2_locale_dsb.js +3 -0
  21. data/vendor/assets/javascripts/select2_locale_el.js +2 -18
  22. data/vendor/assets/javascripts/select2_locale_en.js +3 -0
  23. data/vendor/assets/javascripts/select2_locale_es.js +2 -18
  24. data/vendor/assets/javascripts/select2_locale_et.js +2 -18
  25. data/vendor/assets/javascripts/select2_locale_eu.js +2 -44
  26. data/vendor/assets/javascripts/select2_locale_fa.js +2 -20
  27. data/vendor/assets/javascripts/select2_locale_fi.js +2 -29
  28. data/vendor/assets/javascripts/select2_locale_fr.js +2 -17
  29. data/vendor/assets/javascripts/select2_locale_gl.js +2 -44
  30. data/vendor/assets/javascripts/select2_locale_he.js +2 -18
  31. data/vendor/assets/javascripts/select2_locale_hi.js +3 -0
  32. data/vendor/assets/javascripts/select2_locale_hr.js +2 -23
  33. data/vendor/assets/javascripts/select2_locale_hsb.js +3 -0
  34. data/vendor/assets/javascripts/select2_locale_hu.js +2 -16
  35. data/vendor/assets/javascripts/select2_locale_hy.js +3 -0
  36. data/vendor/assets/javascripts/select2_locale_id.js +2 -20
  37. data/vendor/assets/javascripts/select2_locale_is.js +2 -16
  38. data/vendor/assets/javascripts/select2_locale_it.js +2 -16
  39. data/vendor/assets/javascripts/select2_locale_ja.js +2 -16
  40. data/vendor/assets/javascripts/select2_locale_ka.js +2 -18
  41. data/vendor/assets/javascripts/select2_locale_km.js +3 -0
  42. data/vendor/assets/javascripts/select2_locale_ko.js +2 -18
  43. data/vendor/assets/javascripts/select2_locale_lt.js +2 -25
  44. data/vendor/assets/javascripts/select2_locale_lv.js +2 -18
  45. data/vendor/assets/javascripts/select2_locale_mk.js +2 -18
  46. data/vendor/assets/javascripts/select2_locale_ms.js +2 -20
  47. data/vendor/assets/javascripts/select2_locale_nb.js +2 -21
  48. data/vendor/assets/javascripts/select2_locale_ne.js +3 -0
  49. data/vendor/assets/javascripts/select2_locale_nl.js +2 -16
  50. data/vendor/assets/javascripts/select2_locale_pl.js +2 -53
  51. data/vendor/assets/javascripts/select2_locale_ps.js +3 -0
  52. data/vendor/assets/javascripts/select2_locale_pt-BR.js +2 -17
  53. data/vendor/assets/javascripts/select2_locale_pt.js +3 -0
  54. data/vendor/assets/javascripts/select2_locale_ro.js +2 -16
  55. data/vendor/assets/javascripts/select2_locale_ru.js +2 -22
  56. data/vendor/assets/javascripts/select2_locale_sk.js +2 -49
  57. data/vendor/assets/javascripts/select2_locale_sl.js +3 -0
  58. data/vendor/assets/javascripts/select2_locale_sq.js +3 -0
  59. data/vendor/assets/javascripts/select2_locale_sr-Cyrl.js +3 -0
  60. data/vendor/assets/javascripts/select2_locale_sr.js +3 -0
  61. data/vendor/assets/javascripts/select2_locale_sv.js +2 -18
  62. data/vendor/assets/javascripts/select2_locale_th.js +2 -18
  63. data/vendor/assets/javascripts/select2_locale_tk.js +3 -0
  64. data/vendor/assets/javascripts/select2_locale_tr.js +2 -19
  65. data/vendor/assets/javascripts/select2_locale_uk.js +2 -24
  66. data/vendor/assets/javascripts/select2_locale_vi.js +2 -19
  67. data/vendor/assets/javascripts/select2_locale_zh-CN.js +2 -15
  68. data/vendor/assets/javascripts/select2_locale_zh-TW.js +2 -15
  69. data/vendor/assets/stylesheets/select2-bootstrap.css +587 -64
  70. data/vendor/assets/stylesheets/select2.css +481 -0
  71. metadata +25 -16
  72. data/vendor/assets/images/select2-spinner.gif +0 -0
  73. data/vendor/assets/images/select2.png +0 -0
  74. data/vendor/assets/images/select2x2.png +0 -0
  75. data/vendor/assets/javascripts/select2_locale_no.js +0 -20
  76. data/vendor/assets/javascripts/select2_locale_pt-PT.js +0 -17
  77. data/vendor/assets/javascripts/select2_locale_rs.js +0 -19
  78. data/vendor/assets/javascripts/select2_locale_ug-CN.js +0 -16
  79. data/vendor/assets/stylesheets/select2.scss +0 -692
@@ -1,87 +1,610 @@
1
- .form-control .select2-choice {
2
- border: 0;
3
- border-radius: 2px;
1
+ /*! Select2 Bootstrap Theme v0.1.0-beta.7 | MIT License | github.com/select2/select2-bootstrap-theme */
2
+ .select2-container--bootstrap {
3
+ display: block;
4
+ /*------------------------------------*\
5
+ #COMMON STYLES
6
+ \*------------------------------------*/
7
+ /**
8
+ * Search field in the Select2 dropdown.
9
+ */
10
+ /**
11
+ * No outline for all search fields - in the dropdown
12
+ * and inline in multi Select2s.
13
+ */
14
+ /**
15
+ * Adjust Select2's choices hover and selected styles to match
16
+ * Bootstrap 3's default dropdown styles.
17
+ *
18
+ * @see http://getbootstrap.com/components/#dropdowns
19
+ */
20
+ /**
21
+ * Clear the selection.
22
+ */
23
+ /**
24
+ * Address disabled Select2 styles.
25
+ *
26
+ * @see https://select2.github.io/examples.html#disabled
27
+ * @see http://getbootstrap.com/css/#forms-control-disabled
28
+ */
29
+ /*------------------------------------*\
30
+ #DROPDOWN
31
+ \*------------------------------------*/
32
+ /**
33
+ * Dropdown border color and box-shadow.
34
+ */
35
+ /**
36
+ * Limit the dropdown height.
37
+ */
38
+ /*------------------------------------*\
39
+ #SINGLE SELECT2
40
+ \*------------------------------------*/
41
+ /*------------------------------------*\
42
+ #MULTIPLE SELECT2
43
+ \*------------------------------------*/
44
+ /**
45
+ * Address Bootstrap control sizing classes
46
+ *
47
+ * 1. Reset Bootstrap defaults.
48
+ * 2. Adjust the dropdown arrow button icon position.
49
+ *
50
+ * @see http://getbootstrap.com/css/#forms-control-sizes
51
+ */
52
+ /* 1 */
53
+ /*------------------------------------*\
54
+ #RTL SUPPORT
55
+ \*------------------------------------*/
4
56
  }
5
-
6
- .form-control .select2-choice .select2-arrow {
7
- border-radius: 0 2px 2px 0;
57
+ .select2-container--bootstrap .select2-selection {
58
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
59
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
60
+ background-color: #fff;
61
+ border: 1px solid #ccc;
62
+ border-radius: 4px;
63
+ color: #555555;
64
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
65
+ font-size: 14px;
66
+ outline: 0;
8
67
  }
9
-
10
- .form-control.select2-container {
11
- height: auto !important;
12
- padding: 0;
68
+ .select2-container--bootstrap .select2-selection.form-control {
69
+ border-radius: 4px;
13
70
  }
14
-
15
- .form-control.select2-container.select2-dropdown-open {
16
- border-color: #5897FB;
17
- border-radius: 3px 3px 0 0;
71
+ .select2-container--bootstrap .select2-search--dropdown .select2-search__field {
72
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
73
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
74
+ background-color: #fff;
75
+ border: 1px solid #ccc;
76
+ border-radius: 4px;
77
+ color: #555555;
78
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
79
+ font-size: 14px;
18
80
  }
19
-
20
- .form-control .select2-container.select2-dropdown-open .select2-choices {
21
- border-radius: 3px 3px 0 0;
81
+ .select2-container--bootstrap .select2-search__field {
82
+ outline: 0;
83
+ /* Firefox 18- */
84
+ /**
85
+ * Firefox 19+
86
+ *
87
+ * @see http://stackoverflow.com/questions/24236240/color-for-styled-placeholder-text-is-muted-in-firefox
88
+ */
89
+ }
90
+ .select2-container--bootstrap .select2-search__field::-webkit-input-placeholder {
91
+ color: #999;
92
+ }
93
+ .select2-container--bootstrap .select2-search__field:-moz-placeholder {
94
+ color: #999;
95
+ }
96
+ .select2-container--bootstrap .select2-search__field::-moz-placeholder {
97
+ color: #999;
98
+ opacity: 1;
99
+ }
100
+ .select2-container--bootstrap .select2-search__field:-ms-input-placeholder {
101
+ color: #999;
102
+ }
103
+ .select2-container--bootstrap .select2-results__option {
104
+ /**
105
+ * Disabled results.
106
+ *
107
+ * @see https://select2.github.io/examples.html#disabled-results
108
+ */
109
+ /**
110
+ * Hover state.
111
+ */
112
+ /**
113
+ * Selected state.
114
+ */
115
+ }
116
+ .select2-container--bootstrap .select2-results__option[role=group] {
117
+ padding: 0;
118
+ }
119
+ .select2-container--bootstrap .select2-results__option[aria-disabled=true] {
120
+ color: #777777;
121
+ cursor: not-allowed;
122
+ }
123
+ .select2-container--bootstrap .select2-results__option[aria-selected=true] {
124
+ background-color: #f5f5f5;
125
+ color: #262626;
126
+ }
127
+ .select2-container--bootstrap .select2-results__option--highlighted[aria-selected] {
128
+ background-color: #337ab7;
129
+ color: #fff;
130
+ }
131
+ .select2-container--bootstrap .select2-results__option .select2-results__option {
132
+ padding: 6px 12px;
133
+ }
134
+ .select2-container--bootstrap .select2-results__option .select2-results__option .select2-results__group {
135
+ padding-left: 0;
136
+ }
137
+ .select2-container--bootstrap .select2-results__option .select2-results__option .select2-results__option {
138
+ margin-left: -12px;
139
+ padding-left: 24px;
140
+ }
141
+ .select2-container--bootstrap .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
142
+ margin-left: -24px;
143
+ padding-left: 36px;
144
+ }
145
+ .select2-container--bootstrap .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
146
+ margin-left: -36px;
147
+ padding-left: 48px;
148
+ }
149
+ .select2-container--bootstrap .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
150
+ margin-left: -48px;
151
+ padding-left: 60px;
152
+ }
153
+ .select2-container--bootstrap .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
154
+ margin-left: -60px;
155
+ padding-left: 72px;
156
+ }
157
+ .select2-container--bootstrap .select2-results__group {
158
+ color: #777777;
159
+ display: block;
160
+ padding: 6px 12px;
161
+ font-size: 12px;
162
+ line-height: 1.428571429;
163
+ white-space: nowrap;
164
+ }
165
+ .select2-container--bootstrap.select2-container--focus .select2-selection, .select2-container--bootstrap.select2-container--open .select2-selection {
166
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
167
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
168
+ -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
169
+ -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
170
+ -webkit-transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
171
+ transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
172
+ transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
173
+ transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
174
+ border-color: #66afe9;
175
+ }
176
+ .select2-container--bootstrap.select2-container--open {
177
+ /**
178
+ * Make the dropdown arrow point up while the dropdown is visible.
179
+ */
180
+ /**
181
+ * Handle border radii of the container when the dropdown is showing.
182
+ */
183
+ }
184
+ .select2-container--bootstrap.select2-container--open .select2-selection .select2-selection__arrow b {
185
+ border-color: transparent transparent #999 transparent;
186
+ border-width: 0 4px 4px 4px;
187
+ }
188
+ .select2-container--bootstrap.select2-container--open.select2-container--below .select2-selection {
189
+ border-bottom-right-radius: 0;
190
+ border-bottom-left-radius: 0;
191
+ border-bottom-color: transparent;
192
+ }
193
+ .select2-container--bootstrap.select2-container--open.select2-container--above .select2-selection {
194
+ border-top-right-radius: 0;
195
+ border-top-left-radius: 0;
196
+ border-top-color: transparent;
197
+ }
198
+ .select2-container--bootstrap .select2-selection__clear {
199
+ color: #999;
200
+ cursor: pointer;
201
+ float: right;
202
+ font-weight: bold;
203
+ margin-right: 10px;
204
+ }
205
+ .select2-container--bootstrap .select2-selection__clear:hover {
206
+ color: #333;
207
+ }
208
+ .select2-container--bootstrap.select2-container--disabled .select2-selection {
209
+ border-color: #ccc;
210
+ -webkit-box-shadow: none;
211
+ box-shadow: none;
212
+ }
213
+ .select2-container--bootstrap.select2-container--disabled .select2-selection,
214
+ .select2-container--bootstrap.select2-container--disabled .select2-search__field {
215
+ cursor: not-allowed;
216
+ }
217
+ .select2-container--bootstrap.select2-container--disabled .select2-selection,
218
+ .select2-container--bootstrap.select2-container--disabled .select2-selection--multiple .select2-selection__choice {
219
+ background-color: #eeeeee;
220
+ }
221
+ .select2-container--bootstrap.select2-container--disabled .select2-selection__clear,
222
+ .select2-container--bootstrap.select2-container--disabled .select2-selection--multiple .select2-selection__choice__remove {
223
+ display: none;
224
+ }
225
+ .select2-container--bootstrap .select2-dropdown {
226
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
227
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
228
+ border-color: #66afe9;
229
+ overflow-x: hidden;
230
+ margin-top: -1px;
231
+ }
232
+ .select2-container--bootstrap .select2-dropdown--above {
233
+ margin-top: 1px;
234
+ }
235
+ .select2-container--bootstrap .select2-results > .select2-results__options {
236
+ max-height: 200px;
237
+ overflow-y: auto;
238
+ }
239
+ .select2-container--bootstrap .select2-selection--single {
240
+ height: 34px;
241
+ line-height: 1.428571429;
242
+ padding: 6px 24px 6px 12px;
243
+ /**
244
+ * Adjust the single Select2's dropdown arrow button appearance.
245
+ */
246
+ }
247
+ .select2-container--bootstrap .select2-selection--single .select2-selection__arrow {
248
+ position: absolute;
249
+ bottom: 0;
250
+ right: 12px;
251
+ top: 0;
252
+ width: 4px;
253
+ }
254
+ .select2-container--bootstrap .select2-selection--single .select2-selection__arrow b {
255
+ border-color: #999 transparent transparent transparent;
256
+ border-style: solid;
257
+ border-width: 4px 4px 0 4px;
258
+ height: 0;
259
+ left: 0;
260
+ margin-left: -4px;
261
+ margin-top: -2px;
262
+ position: absolute;
263
+ top: 50%;
264
+ width: 0;
265
+ }
266
+ .select2-container--bootstrap .select2-selection--single .select2-selection__rendered {
267
+ color: #555555;
268
+ padding: 0;
269
+ }
270
+ .select2-container--bootstrap .select2-selection--single .select2-selection__placeholder {
271
+ color: #999;
272
+ }
273
+ .select2-container--bootstrap .select2-selection--multiple {
274
+ min-height: 34px;
275
+ padding: 0;
276
+ height: auto;
277
+ /**
278
+ * Make Multi Select2's choices match Bootstrap 3's default button styles.
279
+ */
280
+ /**
281
+ * Minus 2px borders.
282
+ */
283
+ /**
284
+ * Clear the selection.
285
+ */
286
+ }
287
+ .select2-container--bootstrap .select2-selection--multiple .select2-selection__rendered {
288
+ -webkit-box-sizing: border-box;
289
+ -moz-box-sizing: border-box;
290
+ box-sizing: border-box;
291
+ display: block;
292
+ line-height: 1.428571429;
293
+ list-style: none;
294
+ margin: 0;
295
+ overflow: hidden;
296
+ padding: 0;
297
+ width: 100%;
298
+ text-overflow: ellipsis;
299
+ white-space: nowrap;
300
+ }
301
+ .select2-container--bootstrap .select2-selection--multiple .select2-selection__placeholder {
302
+ color: #999;
303
+ float: left;
304
+ margin-top: 5px;
305
+ }
306
+ .select2-container--bootstrap .select2-selection--multiple .select2-selection__choice {
307
+ color: #555555;
308
+ background: #fff;
309
+ border: 1px solid #ccc;
310
+ border-radius: 4px;
311
+ cursor: default;
312
+ float: left;
313
+ margin: 5px 0 0 6px;
314
+ padding: 0 6px;
315
+ }
316
+ .select2-container--bootstrap .select2-selection--multiple .select2-search--inline .select2-search__field {
317
+ background: transparent;
318
+ padding: 0 12px;
319
+ height: 32px;
320
+ line-height: 1.428571429;
321
+ margin-top: 0;
322
+ min-width: 5em;
323
+ }
324
+ .select2-container--bootstrap .select2-selection--multiple .select2-selection__choice__remove {
325
+ color: #999;
326
+ cursor: pointer;
327
+ display: inline-block;
328
+ font-weight: bold;
329
+ margin-right: 3px;
330
+ }
331
+ .select2-container--bootstrap .select2-selection--multiple .select2-selection__choice__remove:hover {
332
+ color: #333;
333
+ }
334
+ .select2-container--bootstrap .select2-selection--multiple .select2-selection__clear {
335
+ margin-top: 6px;
336
+ }
337
+ .select2-container--bootstrap .select2-selection--single.input-sm, .input-group-sm .select2-container--bootstrap .select2-selection--single, .form-group-sm .select2-container--bootstrap .select2-selection--single {
338
+ border-radius: 3px;
339
+ font-size: 12px;
340
+ height: 30px;
341
+ line-height: 1.5;
342
+ padding: 5px 22px 5px 10px;
343
+ /* 2 */
344
+ }
345
+ .select2-container--bootstrap .select2-selection--single.input-sm .select2-selection__arrow b, .input-group-sm .select2-container--bootstrap .select2-selection--single .select2-selection__arrow b, .form-group-sm .select2-container--bootstrap .select2-selection--single .select2-selection__arrow b {
346
+ margin-left: -5px;
347
+ }
348
+ .select2-container--bootstrap .select2-selection--multiple.input-sm, .input-group-sm .select2-container--bootstrap .select2-selection--multiple, .form-group-sm .select2-container--bootstrap .select2-selection--multiple {
349
+ min-height: 30px;
350
+ border-radius: 3px;
351
+ }
352
+ .select2-container--bootstrap .select2-selection--multiple.input-sm .select2-selection__choice, .input-group-sm .select2-container--bootstrap .select2-selection--multiple .select2-selection__choice, .form-group-sm .select2-container--bootstrap .select2-selection--multiple .select2-selection__choice {
353
+ font-size: 12px;
354
+ line-height: 1.5;
355
+ margin: 4px 0 0 5px;
356
+ padding: 0 5px;
357
+ }
358
+ .select2-container--bootstrap .select2-selection--multiple.input-sm .select2-search--inline .select2-search__field, .input-group-sm .select2-container--bootstrap .select2-selection--multiple .select2-search--inline .select2-search__field, .form-group-sm .select2-container--bootstrap .select2-selection--multiple .select2-search--inline .select2-search__field {
359
+ padding: 0 10px;
360
+ font-size: 12px;
361
+ height: 28px;
362
+ line-height: 1.5;
363
+ }
364
+ .select2-container--bootstrap .select2-selection--multiple.input-sm .select2-selection__clear, .input-group-sm .select2-container--bootstrap .select2-selection--multiple .select2-selection__clear, .form-group-sm .select2-container--bootstrap .select2-selection--multiple .select2-selection__clear {
365
+ margin-top: 5px;
366
+ }
367
+ .select2-container--bootstrap .select2-selection--single.input-lg, .input-group-lg .select2-container--bootstrap .select2-selection--single, .form-group-lg .select2-container--bootstrap .select2-selection--single {
368
+ border-radius: 6px;
369
+ font-size: 18px;
370
+ height: 46px;
371
+ line-height: 1.3333333;
372
+ padding: 10px 31px 10px 16px;
373
+ /* 1 */
374
+ }
375
+ .select2-container--bootstrap .select2-selection--single.input-lg .select2-selection__arrow, .input-group-lg .select2-container--bootstrap .select2-selection--single .select2-selection__arrow, .form-group-lg .select2-container--bootstrap .select2-selection--single .select2-selection__arrow {
376
+ width: 5px;
377
+ }
378
+ .select2-container--bootstrap .select2-selection--single.input-lg .select2-selection__arrow b, .input-group-lg .select2-container--bootstrap .select2-selection--single .select2-selection__arrow b, .form-group-lg .select2-container--bootstrap .select2-selection--single .select2-selection__arrow b {
379
+ border-width: 5px 5px 0 5px;
380
+ margin-left: -5px;
381
+ margin-left: -10px;
382
+ margin-top: -2.5px;
383
+ }
384
+ .select2-container--bootstrap .select2-selection--multiple.input-lg, .input-group-lg .select2-container--bootstrap .select2-selection--multiple, .form-group-lg .select2-container--bootstrap .select2-selection--multiple {
385
+ min-height: 46px;
386
+ border-radius: 6px;
387
+ }
388
+ .select2-container--bootstrap .select2-selection--multiple.input-lg .select2-selection__choice, .input-group-lg .select2-container--bootstrap .select2-selection--multiple .select2-selection__choice, .form-group-lg .select2-container--bootstrap .select2-selection--multiple .select2-selection__choice {
389
+ font-size: 18px;
390
+ line-height: 1.3333333;
391
+ border-radius: 4px;
392
+ margin: 9px 0 0 8px;
393
+ padding: 0 10px;
394
+ }
395
+ .select2-container--bootstrap .select2-selection--multiple.input-lg .select2-search--inline .select2-search__field, .input-group-lg .select2-container--bootstrap .select2-selection--multiple .select2-search--inline .select2-search__field, .form-group-lg .select2-container--bootstrap .select2-selection--multiple .select2-search--inline .select2-search__field {
396
+ padding: 0 16px;
397
+ font-size: 18px;
398
+ height: 44px;
399
+ line-height: 1.3333333;
400
+ }
401
+ .select2-container--bootstrap .select2-selection--multiple.input-lg .select2-selection__clear, .input-group-lg .select2-container--bootstrap .select2-selection--multiple .select2-selection__clear, .form-group-lg .select2-container--bootstrap .select2-selection--multiple .select2-selection__clear {
402
+ margin-top: 10px;
403
+ }
404
+ .select2-container--bootstrap .select2-selection.input-lg.select2-container--open .select2-selection--single {
405
+ /**
406
+ * Make the dropdown arrow point up while the dropdown is visible.
407
+ */
408
+ }
409
+ .select2-container--bootstrap .select2-selection.input-lg.select2-container--open .select2-selection--single .select2-selection__arrow b {
410
+ border-color: transparent transparent #999 transparent;
411
+ border-width: 0 5px 5px 5px;
412
+ }
413
+ .input-group-lg .select2-container--bootstrap .select2-selection.select2-container--open .select2-selection--single {
414
+ /**
415
+ * Make the dropdown arrow point up while the dropdown is visible.
416
+ */
417
+ }
418
+ .input-group-lg .select2-container--bootstrap .select2-selection.select2-container--open .select2-selection--single .select2-selection__arrow b {
419
+ border-color: transparent transparent #999 transparent;
420
+ border-width: 0 5px 5px 5px;
421
+ }
422
+ .select2-container--bootstrap[dir="rtl"] {
423
+ /**
424
+ * Single Select2
425
+ *
426
+ * 1. Makes sure that .select2-selection__placeholder is positioned
427
+ * correctly.
428
+ */
429
+ /**
430
+ * Multiple Select2
431
+ */
432
+ }
433
+ .select2-container--bootstrap[dir="rtl"] .select2-selection--single {
434
+ padding-left: 24px;
435
+ padding-right: 12px;
436
+ }
437
+ .select2-container--bootstrap[dir="rtl"] .select2-selection--single .select2-selection__rendered {
438
+ padding-right: 0;
439
+ padding-left: 0;
440
+ text-align: right;
441
+ /* 1 */
442
+ }
443
+ .select2-container--bootstrap[dir="rtl"] .select2-selection--single .select2-selection__clear {
444
+ float: left;
445
+ }
446
+ .select2-container--bootstrap[dir="rtl"] .select2-selection--single .select2-selection__arrow {
447
+ left: 12px;
448
+ right: auto;
449
+ }
450
+ .select2-container--bootstrap[dir="rtl"] .select2-selection--single .select2-selection__arrow b {
451
+ margin-left: 0;
452
+ }
453
+ .select2-container--bootstrap[dir="rtl"] .select2-selection--multiple .select2-selection__choice,
454
+ .select2-container--bootstrap[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder {
455
+ float: right;
456
+ }
457
+ .select2-container--bootstrap[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
458
+ margin-left: 0;
459
+ margin-right: 6px;
460
+ }
461
+ .select2-container--bootstrap[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
462
+ margin-left: 2px;
463
+ margin-right: auto;
22
464
  }
23
465
 
24
- .form-control.select2-container .select2-choices {
25
- border: 0 !important;
26
- border-radius: 3px;
466
+ /*------------------------------------*\
467
+ #ADDITIONAL GOODIES
468
+ \*------------------------------------*/
469
+ /**
470
+ * Address Bootstrap's validation states
471
+ *
472
+ * If a Select2 widget parent has one of Bootstrap's validation state modifier
473
+ * classes, adjust Select2's border colors and focus states accordingly.
474
+ * You may apply said classes to the Select2 dropdown (body > .select2-container)
475
+ * via JavaScript match Bootstraps' to make its styles match.
476
+ *
477
+ * @see http://getbootstrap.com/css/#forms-control-validation
478
+ */
479
+ .has-warning .select2-dropdown,
480
+ .has-warning .select2-selection {
481
+ border-color: #8a6d3b;
482
+ }
483
+ .has-warning .select2-container--focus .select2-selection,
484
+ .has-warning .select2-container--open .select2-selection {
485
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
486
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
487
+ border-color: #66512c;
488
+ }
489
+ .has-warning.select2-drop-active {
490
+ border-color: #66512c;
491
+ }
492
+ .has-warning.select2-drop-active.select2-drop.select2-drop-above {
493
+ border-top-color: #66512c;
27
494
  }
28
495
 
29
- .control-group.warning .select2-container .select2-choice,
30
- .control-group.warning .select2-container .select2-choices,
31
- .control-group.warning .select2-container-active .select2-choice,
32
- .control-group.warning .select2-container-active .select2-choices,
33
- .control-group.warning .select2-dropdown-open.select2-drop-above .select2-choice,
34
- .control-group.warning .select2-dropdown-open.select2-drop-above .select2-choices,
35
- .control-group.warning .select2-container-multi.select2-container-active .select2-choices {
36
- border: 1px solid #C09853 !important;
496
+ .has-error .select2-dropdown,
497
+ .has-error .select2-selection {
498
+ border-color: #a94442;
499
+ }
500
+ .has-error .select2-container--focus .select2-selection,
501
+ .has-error .select2-container--open .select2-selection {
502
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
503
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
504
+ border-color: #843534;
505
+ }
506
+ .has-error.select2-drop-active {
507
+ border-color: #843534;
508
+ }
509
+ .has-error.select2-drop-active.select2-drop.select2-drop-above {
510
+ border-top-color: #843534;
37
511
  }
38
512
 
39
- .control-group.warning .select2-container .select2-choice div {
40
- border-left: 1px solid #C09853 !important;
41
- background: #FCF8E3 !important;
513
+ .has-success .select2-dropdown,
514
+ .has-success .select2-selection {
515
+ border-color: #3c763d;
516
+ }
517
+ .has-success .select2-container--focus .select2-selection,
518
+ .has-success .select2-container--open .select2-selection {
519
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
520
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
521
+ border-color: #2b542c;
522
+ }
523
+ .has-success.select2-drop-active {
524
+ border-color: #2b542c;
525
+ }
526
+ .has-success.select2-drop-active.select2-drop.select2-drop-above {
527
+ border-top-color: #2b542c;
42
528
  }
43
529
 
44
- .control-group.error .select2-container .select2-choice,
45
- .control-group.error .select2-container .select2-choices,
46
- .control-group.error .select2-container-active .select2-choice,
47
- .control-group.error .select2-container-active .select2-choices,
48
- .control-group.error .select2-dropdown-open.select2-drop-above .select2-choice,
49
- .control-group.error .select2-dropdown-open.select2-drop-above .select2-choices,
50
- .control-group.error .select2-container-multi.select2-container-active .select2-choices {
51
- border: 1px solid #B94A48 !important;
530
+ /**
531
+ * Select2 widgets in Bootstrap Input Groups
532
+ *
533
+ * When Select2 widgets are combined with other elements using Bootstraps
534
+ * "Input Group" component, we don't want specific edges of the Select2
535
+ * container to have a border-radius.
536
+ *
537
+ * Use .select2-bootstrap-prepend and .select2-bootstrap-append on
538
+ * a Bootstrap 3 .input-group to let the contained Select2 widget know which
539
+ * edges should not be rounded as they are directly followed by another element.
540
+ *
541
+ * @see http://getbootstrap.com/components/#input-groups
542
+ */
543
+ /**
544
+ * Mimick Bootstraps .input-group .form-control styles.
545
+ *
546
+ * @see https://github.com/twbs/bootstrap/blob/master/less/input-groups.less
547
+ */
548
+ .input-group .select2-container--bootstrap {
549
+ display: table;
550
+ table-layout: fixed;
551
+ position: relative;
552
+ z-index: 2;
553
+ float: left;
554
+ width: 100%;
555
+ margin-bottom: 0;
556
+ /**
557
+ * Adjust z-index like Bootstrap does to show the focus-box-shadow
558
+ * above appended buttons in .input-group and .form-group.
559
+ */
560
+ }
561
+ .input-group .select2-container--bootstrap.select2-container--open, .input-group .select2-container--bootstrap.select2-container--focus {
562
+ z-index: 3;
52
563
  }
53
564
 
54
- .control-group.error .select2-container .select2-choice div {
55
- border-left: 1px solid #B94A48 !important;
56
- background: #F2DEDE !important;
565
+ .input-group.select2-bootstrap-prepend .select2-container--bootstrap .select2-selection {
566
+ border-bottom-left-radius: 0;
567
+ border-top-left-radius: 0;
57
568
  }
58
569
 
59
- .control-group.info .select2-container .select2-choice,
60
- .control-group.info .select2-container .select2-choices,
61
- .control-group.info .select2-container-active .select2-choice,
62
- .control-group.info .select2-container-active .select2-choices,
63
- .control-group.info .select2-dropdown-open.select2-drop-above .select2-choice,
64
- .control-group.info .select2-dropdown-open.select2-drop-above .select2-choices,
65
- .control-group.info .select2-container-multi.select2-container-active .select2-choices {
66
- border: 1px solid #3A87AD !important;
570
+ .input-group.select2-bootstrap-append .select2-container--bootstrap .select2-selection {
571
+ border-bottom-right-radius: 0;
572
+ border-top-right-radius: 0;
67
573
  }
68
574
 
69
- .control-group.info .select2-container .select2-choice div {
70
- border-left: 1px solid #3A87AD !important;
71
- background: #D9EDF7 !important;
575
+ /**
576
+ * Adjust alignment of Bootstrap buttons in Bootstrap Input Groups to address
577
+ * Multi Select2's height which - depending on how many elements have been selected -
578
+ * may grow taller than its initial size.
579
+ *
580
+ * @see http://getbootstrap.com/components/#input-groups
581
+ */
582
+ .select2-bootstrap-append .select2-container--bootstrap,
583
+ .select2-bootstrap-append .input-group-btn,
584
+ .select2-bootstrap-append .input-group-btn .btn,
585
+ .select2-bootstrap-prepend .select2-container--bootstrap,
586
+ .select2-bootstrap-prepend .input-group-btn,
587
+ .select2-bootstrap-prepend .input-group-btn .btn {
588
+ vertical-align: top;
72
589
  }
73
590
 
74
- .control-group.success .select2-container .select2-choice,
75
- .control-group.success .select2-container .select2-choices,
76
- .control-group.success .select2-container-active .select2-choice,
77
- .control-group.success .select2-container-active .select2-choices,
78
- .control-group.success .select2-dropdown-open.select2-drop-above .select2-choice,
79
- .control-group.success .select2-dropdown-open.select2-drop-above .select2-choices,
80
- .control-group.success .select2-container-multi.select2-container-active .select2-choices {
81
- border: 1px solid #468847 !important;
591
+ /**
592
+ * Temporary fix for https://github.com/select2/select2-bootstrap-theme/issues/9
593
+ *
594
+ * Provides `!important` for certain properties of the class applied to the
595
+ * original `<select>` element to hide it.
596
+ *
597
+ * @see https://github.com/select2/select2/pull/3301
598
+ * @see https://github.com/fk/select2/commit/31830c7b32cb3d8e1b12d5b434dee40a6e753ada
599
+ */
600
+ .form-control.select2-hidden-accessible {
601
+ position: absolute !important;
602
+ width: 1px !important;
82
603
  }
83
604
 
84
- .control-group.success .select2-container .select2-choice div {
85
- border-left: 1px solid #468847 !important;
86
- background: #DFF0D8 !important;
605
+ /**
606
+ * Display override for inline forms
607
+ */
608
+ .form-inline .select2-container--bootstrap {
609
+ display: inline-block;
87
610
  }