select2_rails 4.0.1

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