volt-select2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.rspec +2 -0
  4. data/CODE_OF_CONDUCT.md +13 -0
  5. data/Gemfile +12 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +39 -0
  8. data/Rakefile +1 -0
  9. data/app/select2/assets/css/select2-bootstrap.css +87 -0
  10. data/app/select2/assets/css/select2.css.scss +692 -0
  11. data/app/select2/assets/images/select2-spinner.gif +0 -0
  12. data/app/select2/assets/images/select2.png +0 -0
  13. data/app/select2/assets/images/select2x2.png +0 -0
  14. data/app/select2/assets/js/select2.min.js +23 -0
  15. data/app/select2/config/dependencies.rb +1 -0
  16. data/app/select2/config/initializers/boot.rb +10 -0
  17. data/app/select2/config/routes.rb +1 -0
  18. data/app/select2/controllers/field_controller.rb +52 -0
  19. data/app/select2/controllers/main_controller.rb +4 -0
  20. data/app/select2/views/field/index.html +22 -0
  21. data/app/select2/views/field/multiple.html +14 -0
  22. data/app/select2/views/main/index.html +2 -0
  23. data/lib/volt/select2.rb +18 -0
  24. data/lib/volt/select2/version.rb +5 -0
  25. data/spec/app/main/integration/fields_spec.rb +5 -0
  26. data/spec/app/main/integration/multiples_spec.rb +5 -0
  27. data/spec/app/main/integration/simples_spec.rb +5 -0
  28. data/spec/dummy/.gitignore +9 -0
  29. data/spec/dummy/README.md +4 -0
  30. data/spec/dummy/app/main/assets/css/app.css.scss +1 -0
  31. data/spec/dummy/app/main/config/dependencies.rb +11 -0
  32. data/spec/dummy/app/main/config/initializers/boot.rb +10 -0
  33. data/spec/dummy/app/main/config/routes.rb +7 -0
  34. data/spec/dummy/app/main/controllers/main_controller.rb +27 -0
  35. data/spec/dummy/app/main/models/user.rb +12 -0
  36. data/spec/dummy/app/main/views/main/about.html +7 -0
  37. data/spec/dummy/app/main/views/main/index.html +10 -0
  38. data/spec/dummy/app/main/views/main/main.html +24 -0
  39. data/spec/dummy/config.ru +4 -0
  40. data/spec/dummy/config/app.rb +147 -0
  41. data/spec/dummy/config/base/index.html +15 -0
  42. data/spec/dummy/config/initializers/boot.rb +4 -0
  43. data/spec/integration/sample_integration_spec.rb +11 -0
  44. data/spec/sample_spec.rb +7 -0
  45. data/spec/spec_helper.rb +18 -0
  46. data/volt-select2.gemspec +39 -0
  47. metadata +292 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 02a4a637cf43a89c1e230d9b187d0b0421d4f6dc
4
+ data.tar.gz: ececd0f31466fba8485a531493d2c8dcc2816b83
5
+ SHA512:
6
+ metadata.gz: dc04732242efb410b74b48dc67051fb4a850796b52b614b33905b978bdbebf405b87e31c4ebe26e4d13cc50eed7d83902585606f0c4559cccf82957db2a1a50c
7
+ data.tar.gz: d24b1f1ea96cf3bdb254a8add05bc1fc1d0f48e88f1c78f75ef2dab57f7471627069ea080f756281222ccea96b490b6a6b3dc772211a61245d48724af18662b2
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in volt-select2.gemspec
4
+ gemspec
5
+
6
+ # Optional Gems for testing/dev
7
+
8
+ # The implementation of ReadWriteLock in Volt uses concurrent ruby and ext helps performance.
9
+ gem 'concurrent-ruby-ext', '~> 0.8.0'
10
+
11
+ # Gems you use for development should be added to the gemspec file as
12
+ # development dependencies.
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Julian Fahrer
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,39 @@
1
+ # Volt::Select2
2
+
3
+ Simple wrapper to use select2 with Volt
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'volt-select2'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install volt-select2
18
+
19
+ ## Usage
20
+
21
+ Initilize an select2 field:
22
+ ```
23
+ <:select2:field include_blank="true" placeholder="Some placeholder" options="{{ ['test', 'test2'] }}" value="{{ params._selected }}" html_class="form-control">
24
+ ```
25
+ * You can add a placeholder via the `placeholder` attr.
26
+ * The `include_blank` attr includes a blank field and adds the `allowClear` option to the select2 field
27
+ * `options` can either be an array or a hash (`Volt::Model`)
28
+ * `value` will be set to the selected option
29
+
30
+ For a select2 field with multiple option you can use the follow tag
31
+ <:select2:field:multiple placeholder="Some placeholder" options="{{ ['test', 'test2'] }}" value="{{ params._selected }}" html_class="form-control" />
32
+
33
+ ## Contributing
34
+
35
+ 1. Fork it ( http://github.com/[my-github-username]/volt-select2/fork )
36
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
37
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
38
+ 4. Push to the branch (`git push origin my-new-feature`)
39
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,87 @@
1
+ .form-control .select2-choice {
2
+ border: 0;
3
+ border-radius: 2px;
4
+ }
5
+
6
+ .form-control .select2-choice .select2-arrow {
7
+ border-radius: 0 2px 2px 0;
8
+ }
9
+
10
+ .form-control.select2-container {
11
+ height: auto !important;
12
+ padding: 0;
13
+ }
14
+
15
+ .form-control.select2-container.select2-dropdown-open {
16
+ border-color: #5897FB;
17
+ border-radius: 3px 3px 0 0;
18
+ }
19
+
20
+ .form-control .select2-container.select2-dropdown-open .select2-choices {
21
+ border-radius: 3px 3px 0 0;
22
+ }
23
+
24
+ .form-control.select2-container .select2-choices {
25
+ border: 0 !important;
26
+ border-radius: 3px;
27
+ }
28
+
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;
37
+ }
38
+
39
+ .control-group.warning .select2-container .select2-choice div {
40
+ border-left: 1px solid #C09853 !important;
41
+ background: #FCF8E3 !important;
42
+ }
43
+
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;
52
+ }
53
+
54
+ .control-group.error .select2-container .select2-choice div {
55
+ border-left: 1px solid #B94A48 !important;
56
+ background: #F2DEDE !important;
57
+ }
58
+
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;
67
+ }
68
+
69
+ .control-group.info .select2-container .select2-choice div {
70
+ border-left: 1px solid #3A87AD !important;
71
+ background: #D9EDF7 !important;
72
+ }
73
+
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;
82
+ }
83
+
84
+ .control-group.success .select2-container .select2-choice div {
85
+ border-left: 1px solid #468847 !important;
86
+ background: #DFF0D8 !important;
87
+ }
@@ -0,0 +1,692 @@
1
+ /*
2
+ Version: 3.5.4 Timestamp: Sun Aug 30 13:30:32 EDT 2015
3
+ */
4
+ .select2-container {
5
+ margin: 0;
6
+ position: relative;
7
+ display: inline-block;
8
+ vertical-align: middle;
9
+ }
10
+
11
+ .select2-container,
12
+ .select2-drop,
13
+ .select2-search,
14
+ .select2-search input {
15
+ /*
16
+ Force border-box so that % widths fit the parent
17
+ container without overlap because of margin/padding.
18
+ More Info : http://www.quirksmode.org/css/box.html
19
+ */
20
+ -webkit-box-sizing: border-box; /* webkit */
21
+ -moz-box-sizing: border-box; /* firefox */
22
+ box-sizing: border-box; /* css3 */
23
+ }
24
+
25
+ .select2-container .select2-choice {
26
+ display: block;
27
+ height: 26px;
28
+ padding: 0 0 0 8px;
29
+ overflow: hidden;
30
+ position: relative;
31
+
32
+ border: 1px solid #aaa;
33
+ white-space: nowrap;
34
+ line-height: 26px;
35
+ color: #444;
36
+ text-decoration: none;
37
+
38
+ border-radius: 4px;
39
+
40
+ background-clip: padding-box;
41
+
42
+ -webkit-touch-callout: none;
43
+ -webkit-user-select: none;
44
+ -moz-user-select: none;
45
+ -ms-user-select: none;
46
+ user-select: none;
47
+
48
+ background-color: #fff;
49
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff));
50
+ background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%);
51
+ background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%);
52
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0);
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;
58
+ }
59
+
60
+ .select2-container.select2-drop-above .select2-choice {
61
+ border-bottom-color: #aaa;
62
+
63
+ border-radius: 0 0 4px 4px;
64
+
65
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.9, #fff));
66
+ background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 90%);
67
+ background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 90%);
68
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
69
+ background-image: linear-gradient(to bottom, #eee 0%, #fff 90%);
70
+ }
71
+
72
+ .select2-container.select2-allowclear .select2-choice .select2-chosen {
73
+ margin-right: 42px;
74
+ }
75
+
76
+ .select2-container .select2-choice > .select2-chosen {
77
+ margin-right: 26px;
78
+ display: block;
79
+ overflow: hidden;
80
+
81
+ white-space: nowrap;
82
+
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;
91
+ }
92
+
93
+ .select2-container .select2-choice abbr {
94
+ display: none;
95
+ width: 12px;
96
+ height: 12px;
97
+ position: absolute;
98
+ right: 24px;
99
+ top: 8px;
100
+
101
+ font-size: 1px;
102
+ text-decoration: none;
103
+
104
+ border: 0;
105
+ background: asset-url('../images/select2.png') right top no-repeat;
106
+ cursor: pointer;
107
+ outline: 0;
108
+ }
109
+
110
+ .select2-container.select2-allowclear .select2-choice abbr {
111
+ display: inline-block;
112
+ }
113
+
114
+ .select2-container .select2-choice abbr:hover {
115
+ background-position: right -11px;
116
+ cursor: pointer;
117
+ }
118
+
119
+ .select2-drop-mask {
120
+ border: 0;
121
+ margin: 0;
122
+ padding: 0;
123
+ position: fixed;
124
+ left: 0;
125
+ top: 0;
126
+ min-height: 100%;
127
+ min-width: 100%;
128
+ height: auto;
129
+ width: auto;
130
+ opacity: 0;
131
+ z-index: 9998;
132
+ /* styles required for IE to work */
133
+ background-color: #fff;
134
+ filter: alpha(opacity=0);
135
+ }
136
+
137
+ .select2-drop {
138
+ width: 100%;
139
+ margin-top: -1px;
140
+ position: absolute;
141
+ z-index: 9999;
142
+ top: 100%;
143
+
144
+ background: #fff;
145
+ color: #000;
146
+ border: 1px solid #aaa;
147
+ border-top: 0;
148
+
149
+ border-radius: 0 0 4px 4px;
150
+
151
+ -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
152
+ box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
153
+ }
154
+
155
+ .select2-drop.select2-drop-above {
156
+ margin-top: 1px;
157
+ border-top: 1px solid #aaa;
158
+ border-bottom: 0;
159
+
160
+ border-radius: 4px 4px 0 0;
161
+
162
+ -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
163
+ box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
164
+ }
165
+
166
+ .select2-drop-active {
167
+ border: 1px solid #5897fb;
168
+ border-top: none;
169
+ }
170
+
171
+ .select2-drop.select2-drop-above.select2-drop-active {
172
+ border-top: 1px solid #5897fb;
173
+ }
174
+
175
+ .select2-drop-auto-width {
176
+ border-top: 1px solid #aaa;
177
+ width: auto;
178
+ }
179
+
180
+ .select2-container .select2-choice .select2-arrow {
181
+ display: inline-block;
182
+ width: 18px;
183
+ height: 100%;
184
+ position: absolute;
185
+ right: 0;
186
+ top: 0;
187
+
188
+ border-left: 1px solid #aaa;
189
+ border-radius: 0 4px 4px 0;
190
+
191
+ background-clip: padding-box;
192
+
193
+ background: #ccc;
194
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
195
+ background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
196
+ background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
197
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0);
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;
208
+ }
209
+
210
+ .select2-container .select2-choice .select2-arrow b {
211
+ display: block;
212
+ width: 100%;
213
+ height: 100%;
214
+ background: asset-url('../images/select2.png') no-repeat 0 1px;
215
+ }
216
+
217
+ html[dir="rtl"] .select2-container .select2-choice .select2-arrow b {
218
+ background-position: 2px 1px;
219
+ }
220
+
221
+ .select2-search {
222
+ display: inline-block;
223
+ width: 100%;
224
+ min-height: 26px;
225
+ margin: 0;
226
+ padding: 4px 4px 0 4px;
227
+
228
+ position: relative;
229
+ z-index: 10000;
230
+
231
+ white-space: nowrap;
232
+ }
233
+
234
+ .select2-search input {
235
+ width: 100%;
236
+ height: auto !important;
237
+ min-height: 26px;
238
+ padding: 4px 20px 4px 5px;
239
+ margin: 0;
240
+
241
+ outline: 0;
242
+ font-family: sans-serif;
243
+ font-size: 1em;
244
+
245
+ border: 1px solid #aaa;
246
+ border-radius: 0;
247
+
248
+ -webkit-box-shadow: none;
249
+ box-shadow: none;
250
+
251
+ background: #fff asset-url('../images/select2.png') no-repeat 100% -22px;
252
+ background: asset-url('../images/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: asset-url('../images/select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
254
+ background: asset-url('../images/select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
255
+ background: asset-url('../images/select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
256
+ }
257
+
258
+ html[dir="rtl"] .select2-search input {
259
+ padding: 4px 5px 4px 20px;
260
+
261
+ background: #fff asset-url('../images/select2.png') no-repeat -37px -22px;
262
+ background: asset-url('../images/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: asset-url('../images/select2.png') no-repeat -37px -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
264
+ background: asset-url('../images/select2.png') no-repeat -37px -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
265
+ background: asset-url('../images/select2.png') no-repeat -37px -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
266
+ }
267
+
268
+ .select2-search input.select2-active {
269
+ background: #fff asset-url('../images/select2-spinner.gif') no-repeat 100%;
270
+ background: asset-url('../images/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: asset-url('../images/select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
272
+ background: asset-url('../images/select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
273
+ background: asset-url('../images/select2-spinner.gif') no-repeat 100%, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
274
+ }
275
+
276
+ .select2-container-active .select2-choice,
277
+ .select2-container-active .select2-choices {
278
+ border: 1px solid #5897fb;
279
+ outline: none;
280
+
281
+ -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
282
+ box-shadow: 0 0 5px rgba(0, 0, 0, .3);
283
+ }
284
+
285
+ .select2-dropdown-open .select2-choice {
286
+ border-bottom-color: transparent;
287
+ -webkit-box-shadow: 0 1px 0 #fff inset;
288
+ box-shadow: 0 1px 0 #fff inset;
289
+
290
+ border-bottom-left-radius: 0;
291
+ border-bottom-right-radius: 0;
292
+
293
+ background-color: #eee;
294
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(0.5, #eee));
295
+ background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee 50%);
296
+ background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee 50%);
297
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
298
+ background-image: linear-gradient(to top, #fff 0%, #eee 50%);
299
+ }
300
+
301
+ .select2-dropdown-open.select2-drop-above .select2-choice,
302
+ .select2-dropdown-open.select2-drop-above .select2-choices {
303
+ border: 1px solid #5897fb;
304
+ border-top-color: transparent;
305
+
306
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #eee));
307
+ background-image: -webkit-linear-gradient(center top, #fff 0%, #eee 50%);
308
+ background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%);
309
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
310
+ background-image: linear-gradient(to bottom, #fff 0%, #eee 50%);
311
+ }
312
+
313
+ .select2-dropdown-open .select2-choice .select2-arrow {
314
+ background: transparent;
315
+ border-left: none;
316
+ filter: none;
317
+ }
318
+ html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow {
319
+ border-right: none;
320
+ }
321
+
322
+ .select2-dropdown-open .select2-choice .select2-arrow b {
323
+ background-position: -18px 1px;
324
+ }
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
+
341
+ /* results */
342
+ .select2-results {
343
+ max-height: 200px;
344
+ padding: 0 0 0 4px;
345
+ margin: 4px 4px 4px 0;
346
+ position: relative;
347
+ overflow-x: hidden;
348
+ overflow-y: auto;
349
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
350
+ }
351
+
352
+ html[dir="rtl"] .select2-results {
353
+ padding: 0 4px 0 0;
354
+ margin: 4px 0 4px 4px;
355
+ }
356
+
357
+ .select2-results ul.select2-result-sub {
358
+ margin: 0;
359
+ padding-left: 0;
360
+ }
361
+
362
+ .select2-results li {
363
+ list-style: none;
364
+ display: list-item;
365
+ background-image: none;
366
+ }
367
+
368
+ .select2-results li.select2-result-with-children > .select2-result-label {
369
+ font-weight: bold;
370
+ }
371
+
372
+ .select2-results .select2-result-label {
373
+ padding: 3px 7px 4px;
374
+ margin: 0;
375
+ cursor: pointer;
376
+
377
+ min-height: 1em;
378
+
379
+ -webkit-touch-callout: none;
380
+ -webkit-user-select: none;
381
+ -moz-user-select: none;
382
+ -ms-user-select: none;
383
+ user-select: none;
384
+ }
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
+
394
+ .select2-results .select2-highlighted {
395
+ background: #3875d7;
396
+ color: #fff;
397
+ }
398
+
399
+ .select2-results li em {
400
+ background: #feffde;
401
+ font-style: normal;
402
+ }
403
+
404
+ .select2-results .select2-highlighted em {
405
+ background: transparent;
406
+ }
407
+
408
+ .select2-results .select2-highlighted ul {
409
+ background: #fff;
410
+ color: #000;
411
+ }
412
+
413
+ .select2-results .select2-no-results,
414
+ .select2-results .select2-searching,
415
+ .select2-results .select2-ajax-error,
416
+ .select2-results .select2-selection-limit {
417
+ background: #f4f4f4;
418
+ display: list-item;
419
+ padding-left: 5px;
420
+ }
421
+
422
+ /*
423
+ disabled look for disabled choices in the results dropdown
424
+ */
425
+ .select2-results .select2-disabled.select2-highlighted {
426
+ color: #666;
427
+ background: #f4f4f4;
428
+ display: list-item;
429
+ cursor: default;
430
+ }
431
+ .select2-results .select2-disabled {
432
+ background: #f4f4f4;
433
+ display: list-item;
434
+ cursor: default;
435
+ }
436
+
437
+ .select2-results .select2-selected {
438
+ display: none;
439
+ }
440
+
441
+ .select2-more-results.select2-active {
442
+ background: #f4f4f4 asset-url('../images/select2-spinner.gif') no-repeat 100%;
443
+ }
444
+
445
+ .select2-results .select2-ajax-error {
446
+ background: rgba(255, 50, 50, .2);
447
+ }
448
+
449
+ .select2-more-results {
450
+ background: #f4f4f4;
451
+ display: list-item;
452
+ }
453
+
454
+ /* disabled styles */
455
+
456
+ .select2-container.select2-container-disabled .select2-choice {
457
+ background-color: #f4f4f4;
458
+ background-image: none;
459
+ border: 1px solid #ddd;
460
+ cursor: default;
461
+ }
462
+
463
+ .select2-container.select2-container-disabled .select2-choice .select2-arrow {
464
+ background-color: #f4f4f4;
465
+ background-image: none;
466
+ border-left: 0;
467
+ }
468
+
469
+ .select2-container.select2-container-disabled .select2-choice abbr {
470
+ display: none;
471
+ }
472
+
473
+
474
+ /* multiselect */
475
+
476
+ .select2-container-multi .select2-choices {
477
+ height: auto !important;
478
+ height: 1%;
479
+ margin: 0;
480
+ padding: 0 5px 0 0;
481
+ position: relative;
482
+
483
+ border: 1px solid #aaa;
484
+ cursor: text;
485
+ overflow: hidden;
486
+
487
+ background-color: #fff;
488
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff));
489
+ background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%);
490
+ background-image: -moz-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;
496
+ }
497
+
498
+ .select2-locked {
499
+ padding: 3px 5px 3px 5px !important;
500
+ }
501
+
502
+ .select2-container-multi .select2-choices {
503
+ min-height: 26px;
504
+ }
505
+
506
+ .select2-container-multi.select2-container-active .select2-choices {
507
+ border: 1px solid #5897fb;
508
+ outline: none;
509
+
510
+ -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
511
+ box-shadow: 0 0 5px rgba(0, 0, 0, .3);
512
+ }
513
+ .select2-container-multi .select2-choices li {
514
+ float: left;
515
+ list-style: none;
516
+ }
517
+ html[dir="rtl"] .select2-container-multi .select2-choices li
518
+ {
519
+ float: right;
520
+ }
521
+ .select2-container-multi .select2-choices .select2-search-field {
522
+ margin: 0;
523
+ padding: 0;
524
+ white-space: nowrap;
525
+ }
526
+
527
+ .select2-container-multi .select2-choices .select2-search-field input {
528
+ padding: 5px;
529
+ margin: 1px 0;
530
+
531
+ font-family: sans-serif;
532
+ font-size: 100%;
533
+ color: #666;
534
+ outline: 0;
535
+ border: 0;
536
+ -webkit-box-shadow: none;
537
+ box-shadow: none;
538
+ background: transparent !important;
539
+ }
540
+
541
+ .select2-container-multi .select2-choices .select2-search-field input.select2-active {
542
+ background: #fff asset-url('../images/select2-spinner.gif') no-repeat 100% !important;
543
+ }
544
+
545
+ .select2-default {
546
+ color: #999 !important;
547
+ }
548
+
549
+ .select2-container-multi .select2-choices .select2-search-choice {
550
+ padding: 3px 5px 3px 18px;
551
+ margin: 3px 0 3px 5px;
552
+ position: relative;
553
+
554
+ line-height: 13px;
555
+ color: #333;
556
+ cursor: default;
557
+ border: 1px solid #aaaaaa;
558
+
559
+ border-radius: 3px;
560
+
561
+ -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
562
+ box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
563
+
564
+ background-clip: padding-box;
565
+
566
+ -webkit-touch-callout: none;
567
+ -webkit-user-select: none;
568
+ -moz-user-select: none;
569
+ -ms-user-select: none;
570
+ user-select: none;
571
+
572
+ background-color: #e4e4e4;
573
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0);
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));
575
+ background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
576
+ background-image: -moz-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;
583
+ }
584
+ .select2-container-multi .select2-choices .select2-search-choice .select2-chosen {
585
+ cursor: default;
586
+ }
587
+ .select2-container-multi .select2-choices .select2-search-choice-focus {
588
+ background: #d4d4d4;
589
+ }
590
+
591
+ .select2-search-choice-close {
592
+ display: block;
593
+ width: 12px;
594
+ height: 13px;
595
+ position: absolute;
596
+ right: 3px;
597
+ top: 4px;
598
+
599
+ font-size: 1px;
600
+ outline: none;
601
+ background: asset-url('../images/select2.png') right top no-repeat;
602
+ }
603
+ html[dir="rtl"] .select2-search-choice-close {
604
+ right: auto;
605
+ left: 3px;
606
+ }
607
+
608
+ .select2-container-multi .select2-search-choice-close {
609
+ left: 3px;
610
+ }
611
+
612
+ html[dir="rtl"] .select2-container-multi .select2-search-choice-close {
613
+ left: auto;
614
+ right: 2px;
615
+ }
616
+
617
+ .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
618
+ background-position: right -11px;
619
+ }
620
+ .select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
621
+ background-position: right -11px;
622
+ }
623
+
624
+ /* disabled styles */
625
+ .select2-container-multi.select2-container-disabled .select2-choices {
626
+ background-color: #f4f4f4;
627
+ background-image: none;
628
+ border: 1px solid #ddd;
629
+ cursor: default;
630
+ }
631
+
632
+ .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
633
+ padding: 3px 5px 3px 5px;
634
+ border: 1px solid #ddd;
635
+ background-image: none;
636
+ background-color: #f4f4f4;
637
+ }
638
+
639
+ .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none;
640
+ background: none;
641
+ }
642
+ /* end multiselect */
643
+
644
+
645
+ .select2-result-selectable .select2-match,
646
+ .select2-result-unselectable .select2-match {
647
+ text-decoration: underline;
648
+ }
649
+
650
+ .select2-offscreen, .select2-offscreen:focus {
651
+ clip: rect(0 0 0 0) !important;
652
+ width: 1px !important;
653
+ height: 1px !important;
654
+ border: 0 !important;
655
+ margin: 0 !important;
656
+ padding: 0 !important;
657
+ overflow: hidden !important;
658
+ position: absolute !important;
659
+ outline: 0 !important;
660
+ left: 0px !important;
661
+ top: 0px !important;
662
+ }
663
+
664
+ .select2-display-none {
665
+ display: none;
666
+ }
667
+
668
+ .select2-measure-scrollbar {
669
+ position: absolute;
670
+ top: -10000px;
671
+ left: -10000px;
672
+ width: 100px;
673
+ height: 100px;
674
+ overflow: scroll;
675
+ }
676
+
677
+ /* Retina-ize icons */
678
+
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: asset-url('../images/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
+ }
692
+ }