select2-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,382 @@
1
+ .select2-container
2
+ position: relative
3
+ display: inline-block
4
+ /* inline-block for ie7
5
+ zoom: 1
6
+ *display: inline
7
+ /*
8
+ *Force border-box so that % widths fit the parent
9
+ *container without overlap because of margin/padding.
10
+ *
11
+ *More Info : http://www.quirksmode.org/css/box.html
12
+ -moz-box-sizing: border-box
13
+ /* firefox
14
+ -ms-box-sizing: border-box
15
+ /* ie
16
+ -webkit-box-sizing: border-box
17
+ /* webkit
18
+ -khtml-box-sizing: border-box
19
+ /* konqueror
20
+ box-sizing: border-box
21
+ /* css3
22
+
23
+ .select2-drop, .select2-search
24
+ /*
25
+ *Force border-box so that % widths fit the parent
26
+ *container without overlap because of margin/padding.
27
+ *
28
+ *More Info : http://www.quirksmode.org/css/box.html
29
+ -moz-box-sizing: border-box
30
+ /* firefox
31
+ -ms-box-sizing: border-box
32
+ /* ie
33
+ -webkit-box-sizing: border-box
34
+ /* webkit
35
+ -khtml-box-sizing: border-box
36
+ /* konqueror
37
+ box-sizing: border-box
38
+ /* css3
39
+
40
+ .select2-container
41
+ .select2-search input
42
+ /*
43
+ *Force border-box so that % widths fit the parent
44
+ *container without overlap because of margin/padding.
45
+ *
46
+ *More Info : http://www.quirksmode.org/css/box.html
47
+ -moz-box-sizing: border-box
48
+ /* firefox
49
+ -ms-box-sizing: border-box
50
+ /* ie
51
+ -webkit-box-sizing: border-box
52
+ /* webkit
53
+ -khtml-box-sizing: border-box
54
+ /* konqueror
55
+ box-sizing: border-box
56
+ /* css3
57
+ .select2-choice
58
+ background-color: #fff
59
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white))
60
+ background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%)
61
+ background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%)
62
+ background-image: -o-linear-gradient(bottom, #eeeeee 0%, white 50%)
63
+ background-image: -ms-linear-gradient(top, #eeeeee 0%, white 50%)
64
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#ffffff', GradientType = 0)
65
+ background-image: linear-gradient(top, #eeeeee 0%, white 50%)
66
+ -webkit-border-radius: 4px
67
+ -moz-border-radius: 4px
68
+ border-radius: 4px
69
+ -moz-background-clip: padding
70
+ -webkit-background-clip: padding-box
71
+ background-clip: padding-box
72
+ border: 1px solid #aaa
73
+ display: block
74
+ overflow: hidden
75
+ white-space: nowrap
76
+ position: relative
77
+ height: 26px
78
+ line-height: 26px
79
+ padding: 0 0 0 8px
80
+ color: #444
81
+ text-decoration: none
82
+ span
83
+ margin-right: 26px
84
+ display: block
85
+ overflow: hidden
86
+ white-space: nowrap
87
+ -o-text-overflow: ellipsis
88
+ -ms-text-overflow: ellipsis
89
+ text-overflow: ellipsis
90
+ abbr
91
+ display: block
92
+ position: absolute
93
+ right: 26px
94
+ top: 8px
95
+ width: 12px
96
+ height: 12px
97
+ font-size: 1px
98
+ background: image-url('select2.png') right top no-repeat
99
+ cursor: pointer
100
+ text-decoration: none
101
+ border: 0
102
+ outline: 0
103
+ &:hover
104
+ background-position: right -11px
105
+ cursor: pointer
106
+ .select2-drop
107
+ background: #fff
108
+ border: 1px solid #aaa
109
+ border-top: 0
110
+ position: absolute
111
+ top: 100%
112
+ -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
113
+ -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
114
+ -o-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
115
+ box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
116
+ z-index: 999
117
+ width: 100%
118
+ margin-top: -1px
119
+ -webkit-border-radius: 0 0 4px 4px
120
+ -moz-border-radius: 0 0 4px 4px
121
+ border-radius: 0 0 4px 4px
122
+ .select2-choice div
123
+ -webkit-border-radius: 0 4px 4px 0
124
+ -moz-border-radius: 0 4px 4px 0
125
+ border-radius: 0 4px 4px 0
126
+ -moz-background-clip: padding
127
+ -webkit-background-clip: padding-box
128
+ background-clip: padding-box
129
+ background: #ccc
130
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #cccccc), color-stop(0.6, #eeeeee))
131
+ background-image: -webkit-linear-gradient(center bottom, #cccccc 0%, #eeeeee 60%)
132
+ background-image: -moz-linear-gradient(center bottom, #cccccc 0%, #eeeeee 60%)
133
+ background-image: -o-linear-gradient(bottom, #cccccc 0%, #eeeeee 60%)
134
+ background-image: -ms-linear-gradient(top, #cccccc 0%, #eeeeee 60%)
135
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#cccccc', endColorstr = '#eeeeee', GradientType = 0)
136
+ background-image: linear-gradient(top, #cccccc 0%, #eeeeee 60%)
137
+ border-left: 1px solid #aaa
138
+ position: absolute
139
+ right: 0
140
+ top: 0
141
+ display: block
142
+ height: 100%
143
+ width: 18px
144
+ b
145
+ background: image-url('select2.png') no-repeat 0 1px
146
+ display: block
147
+ width: 100%
148
+ height: 100%
149
+ .select2-search
150
+ display: inline-block
151
+ white-space: nowrap
152
+ z-index: 1010
153
+ min-height: 26px
154
+ width: 100%
155
+ margin: 0
156
+ padding-left: 4px
157
+ padding-right: 4px
158
+ input
159
+ background: white image-url('select2.png') no-repeat 100% -22px
160
+ background: image-url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee))
161
+ background: image-url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%)
162
+ background: image-url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%)
163
+ background: image-url('select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%)
164
+ background: image-url('select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, white 85%, #eeeeee 99%)
165
+ background: image-url('select2.png') no-repeat 100% -22px, linear-gradient(top, white 85%, #eeeeee 99%)
166
+ padding: 4px 20px 4px 5px
167
+ outline: 0
168
+ border: 1px solid #aaa
169
+ font-family: sans-serif
170
+ font-size: 1em
171
+ width: 100%
172
+ margin: 0
173
+ height: auto !important
174
+ min-height: 26px
175
+ -webkit-box-shadow: none
176
+ -moz-box-shadow: none
177
+ box-shadow: none
178
+ border-radius: 0
179
+ -moz-border-radius: 0
180
+ -webkit-border-radius: 0
181
+ &.select2-active
182
+ background: white image-url('spinner.gif') no-repeat 100%
183
+ background: image-url('spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee))
184
+ background: image-url('spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%)
185
+ background: image-url('spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%)
186
+ background: image-url('spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, white 85%, #eeeeee 99%)
187
+ background: image-url('spinner.gif') no-repeat 100%, -ms-linear-gradient(top, white 85%, #eeeeee 99%)
188
+ background: image-url('spinner.gif') no-repeat 100%, linear-gradient(top, white 85%, #eeeeee 99%)
189
+
190
+ .select2-container-active
191
+ .select2-choice, .select2-choices
192
+ -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
193
+ -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
194
+ -o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
195
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
196
+ border: 1px solid #5897fb
197
+ outline: none
198
+
199
+ .select2-dropdown-open .select2-choice
200
+ border: 1px solid #aaa
201
+ border-bottom-color: transparent
202
+ -webkit-box-shadow: 0 1px 0 #fff inset
203
+ -moz-box-shadow: 0 1px 0 #fff inset
204
+ -o-box-shadow: 0 1px 0 #fff inset
205
+ box-shadow: 0 1px 0 #fff inset
206
+ background-color: #eee
207
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee))
208
+ background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%)
209
+ background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%)
210
+ background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%)
211
+ background-image: -ms-linear-gradient(top, white 0%, #eeeeee 50%)
212
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 )
213
+ background-image: linear-gradient(top, white 0%, #eeeeee 50%)
214
+ -webkit-border-bottom-left-radius: 0
215
+ -webkit-border-bottom-right-radius: 0
216
+ -moz-border-radius-bottomleft: 0
217
+ -moz-border-radius-bottomright: 0
218
+ border-bottom-left-radius: 0
219
+ border-bottom-right-radius: 0
220
+ div
221
+ background: transparent
222
+ border-left: none
223
+ b
224
+ background-position: -18px 1px
225
+
226
+ /* results
227
+
228
+ .select2-container .select2-results
229
+ margin: 4px 4px 4px 0
230
+ padding: 0 0 0 4px
231
+ position: relative
232
+ overflow-x: hidden
233
+ overflow-y: auto
234
+ max-height: 200px
235
+ li
236
+ line-height: 80%
237
+ padding: 7px 7px 8px
238
+ margin: 0
239
+ list-style: none
240
+ cursor: pointer
241
+ display: list-item
242
+ .select2-highlighted
243
+ background: #3875d7
244
+ color: #fff
245
+ li em
246
+ background: #feffde
247
+ font-style: normal
248
+ .select2-highlighted em
249
+ background: transparent
250
+ .select2-no-results
251
+ background: #f4f4f4
252
+ display: list-item
253
+ .select2-disabled
254
+ display: none
255
+
256
+ /*
257
+ *disabled look for already selected choices in the results dropdown
258
+ *.select2-container .select2-results .select2-disabled.select2-highlighted {
259
+ * color: #666;
260
+ * background: #f4f4f4;
261
+ * display: list-item;
262
+ * cursor: default;
263
+ *}
264
+ *.select2-container .select2-results .select2-disabled {
265
+ * background: #f4f4f4;
266
+ * display: list-item;
267
+ * cursor: default;
268
+ *}
269
+
270
+ .select2-more-results
271
+ &.select2-active
272
+ background: #f4f4f4 image-url('spinner.gif') no-repeat 100%
273
+ background: #f4f4f4
274
+ display: list-item
275
+
276
+ /* multiselect
277
+
278
+ .select2-container-multi
279
+ .select2-choices
280
+ background-color: #fff
281
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, white))
282
+ background-image: -webkit-linear-gradient(top, #eeeeee 1%, white 15%)
283
+ background-image: -moz-linear-gradient(top, #eeeeee 1%, white 15%)
284
+ background-image: -o-linear-gradient(top, #eeeeee 1%, white 15%)
285
+ background-image: -ms-linear-gradient(top, #eeeeee 1%, white 15%)
286
+ background-image: linear-gradient(top, #eeeeee 1%, white 15%)
287
+ border: 1px solid #aaa
288
+ margin: 0
289
+ padding: 0
290
+ cursor: text
291
+ overflow: hidden
292
+ height: auto !important
293
+ height: 1%
294
+ position: relative
295
+ .select2-drop
296
+ margin-top: 0
297
+ &.select2-container-active .select2-choices
298
+ -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
299
+ -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
300
+ -o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
301
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
302
+ border: 1px solid #5897fb
303
+ outline: none
304
+ .select2-choices
305
+ li
306
+ float: left
307
+ list-style: none
308
+ .select2-search-field
309
+ white-space: nowrap
310
+ margin: 0
311
+ padding: 0
312
+ input
313
+ color: #666
314
+ background: transparent !important
315
+ font-family: sans-serif
316
+ font-size: 100%
317
+ height: 15px
318
+ padding: 5px
319
+ margin: 1px 0
320
+ outline: 0
321
+ border: 0
322
+ -webkit-box-shadow: none
323
+ -moz-box-shadow: none
324
+ -o-box-shadow: none
325
+ box-shadow: none
326
+
327
+ .select2-default
328
+ color: #999 !important
329
+
330
+ .select2-container-multi .select2-choices
331
+ .select2-search-choice
332
+ -webkit-border-radius: 3px
333
+ -moz-border-radius: 3px
334
+ border-radius: 3px
335
+ -moz-background-clip: padding
336
+ -webkit-background-clip: padding-box
337
+ background-clip: padding-box
338
+ background-color: #e4e4e4
339
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 )
340
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee))
341
+ background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
342
+ background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
343
+ background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
344
+ background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
345
+ background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
346
+ -webkit-box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05)
347
+ -moz-box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05)
348
+ box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05)
349
+ color: #333
350
+ border: 1px solid #aaaaaa
351
+ line-height: 13px
352
+ padding: 3px 5px 3px 18px
353
+ margin: 3px 0 3px 5px
354
+ position: relative
355
+ cursor: default
356
+ span
357
+ cursor: default
358
+ .select2-search-choice-focus
359
+ background: #d4d4d4
360
+
361
+ .select2-search-choice-close
362
+ display: block
363
+ position: absolute
364
+ right: 3px
365
+ top: 4px
366
+ width: 12px
367
+ height: 13px
368
+ font-size: 1px
369
+ background: image-url('select2.png') right top no-repeat
370
+ outline: none
371
+
372
+ .select2-container-multi
373
+ .select2-search-choice-close
374
+ left: 3px
375
+ .select2-choices
376
+ .select2-search-choice .select2-search-choice-close:hover, .select2-search-choice-focus .select2-search-choice-close
377
+ background-position: right -11px
378
+ .select2-results
379
+ margin: -1px 0 0
380
+ padding: 0
381
+
382
+ /* end multiselect
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: select2-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Rogerio Medeiros
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-05-08 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: thor
16
+ requirement: &81107730 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '0.14'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *81107730
25
+ - !ruby/object:Gem::Dependency
26
+ name: bundler
27
+ requirement: &81107440 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: '1.0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *81107440
36
+ - !ruby/object:Gem::Dependency
37
+ name: rails
38
+ requirement: &81107190 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: '3.0'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *81107190
47
+ - !ruby/object:Gem::Dependency
48
+ name: sass
49
+ requirement: &81106920 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '3.1'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *81106920
58
+ description: Select2 is a jQuery based replacement for select boxes. It supports searching,
59
+ remote data sets, and infinite scrolling of results. This gem integrates Select2
60
+ with Rails asset pipeline for easy of use.
61
+ email:
62
+ - argerim@gmail.com
63
+ executables: []
64
+ extensions: []
65
+ extra_rdoc_files: []
66
+ files:
67
+ - .gitignore
68
+ - Gemfile
69
+ - LICENSE
70
+ - README.md
71
+ - Rakefile
72
+ - lib/select2-rails.rb
73
+ - lib/select2-rails/engine.rb
74
+ - lib/select2-rails/source_file.rb
75
+ - lib/select2-rails/version.rb
76
+ - select2-rails.gemspec
77
+ - vendor/assets/images/select2.png
78
+ - vendor/assets/images/spinner.gif
79
+ - vendor/assets/javascripts/select2.js
80
+ - vendor/assets/stylesheets/select2.css.sass
81
+ homepage: ''
82
+ licenses: []
83
+ post_install_message:
84
+ rdoc_options: []
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - ! '>='
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ requirements: []
100
+ rubyforge_project:
101
+ rubygems_version: 1.8.15
102
+ signing_key:
103
+ specification_version: 3
104
+ summary: Integrate Select2 javascript library with Rails asset pipeline
105
+ test_files: []