chosen-rails 0.9.5.1 → 0.9.7
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.
- data/lib/chosen-rails/version.rb +2 -2
- data/vendor/assets/images/chosen-sprite.png +0 -0
- data/vendor/assets/javascripts/chosen.jquery.coffee +2 -0
- data/vendor/assets/javascripts/chosen.proto.coffee +2 -0
- data/vendor/assets/javascripts/lib/abstract-chosen.coffee +1 -0
- data/vendor/assets/stylesheets/chosen.css.sass +76 -59
- metadata +56 -95
data/lib/chosen-rails/version.rb
CHANGED
Binary file
|
@@ -90,6 +90,8 @@ class Chosen extends AbstractChosen
|
|
90
90
|
if @is_multiple
|
91
91
|
@search_choices.click (evt) => this.choices_click(evt)
|
92
92
|
@search_field.focus (evt) => this.input_focus(evt)
|
93
|
+
else
|
94
|
+
@container.click (evt) => evt.preventDefault() # gobble click of anchor
|
93
95
|
|
94
96
|
search_field_disabled: ->
|
95
97
|
@is_disabled = @form_field_jq[0].disabled
|
@@ -83,6 +83,8 @@ class Chosen extends AbstractChosen
|
|
83
83
|
if @is_multiple
|
84
84
|
@search_choices.observe "click", (evt) => this.choices_click(evt)
|
85
85
|
@search_field.observe "focus", (evt) => this.input_focus(evt)
|
86
|
+
else
|
87
|
+
@container.observe "click", (evt) => evt.preventDefault() # gobble click of anchor
|
86
88
|
|
87
89
|
search_field_disabled: ->
|
88
90
|
@is_disabled = @form_field.disabled
|
@@ -25,29 +25,32 @@
|
|
25
25
|
|
26
26
|
.chzn-container-single
|
27
27
|
.chzn-single
|
28
|
-
background-color: #
|
29
|
-
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white))
|
30
|
-
background-image: -webkit-linear-gradient(center bottom, #
|
31
|
-
background-image: -moz-linear-gradient(center bottom, #
|
32
|
-
background-image: -o-linear-gradient(top, #
|
33
|
-
background-image: -ms-linear-gradient(top, #
|
28
|
+
background-color: #ffffff
|
29
|
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #f4f4f4), color-stop(0.48, #eeeeee), color-stop(0.5, #f6f6f6), color-stop(0.8, white))
|
30
|
+
background-image: -webkit-linear-gradient(center bottom, #f4f4f4 0%, #eeeeee 48%, #f6f6f6 50%, white 80%)
|
31
|
+
background-image: -moz-linear-gradient(center bottom, #f4f4f4 0%, #eeeeee 48%, #f6f6f6 50%, white 80%)
|
32
|
+
background-image: -o-linear-gradient(top, #f4f4f4 0%, #eeeeee 48%, #f6f6f6 50%, white 80%)
|
33
|
+
background-image: -ms-linear-gradient(top, #f4f4f4 0%, #eeeeee 48%, #f6f6f6 50%, white 80%)
|
34
34
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 )
|
35
|
-
background-image: linear-gradient(top, #
|
36
|
-
-webkit-border-radius:
|
37
|
-
-moz-border-radius:
|
38
|
-
border-radius:
|
35
|
+
background-image: linear-gradient(top, #f4f4f4 0%, #eeeeee 48%, #f6f6f6 50%, white 80%)
|
36
|
+
-webkit-border-radius: 5px
|
37
|
+
-moz-border-radius: 5px
|
38
|
+
border-radius: 5px
|
39
39
|
-moz-background-clip: padding
|
40
40
|
-webkit-background-clip: padding-box
|
41
41
|
background-clip: padding-box
|
42
|
-
border: 1px solid #
|
42
|
+
border: 1px solid #aaaaaa
|
43
|
+
-webkit-box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1)
|
44
|
+
-moz-box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1)
|
45
|
+
box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1)
|
43
46
|
display: block
|
44
47
|
overflow: hidden
|
45
48
|
white-space: nowrap
|
46
49
|
position: relative
|
47
|
-
height:
|
48
|
-
line-height:
|
50
|
+
height: 23px
|
51
|
+
line-height: 24px
|
49
52
|
padding: 0 0 0 8px
|
50
|
-
color: #
|
53
|
+
color: #444444
|
51
54
|
text-decoration: none
|
52
55
|
span
|
53
56
|
margin-right: 26px
|
@@ -61,7 +64,7 @@
|
|
61
64
|
display: block
|
62
65
|
position: absolute
|
63
66
|
right: 26px
|
64
|
-
top:
|
67
|
+
top: 6px
|
65
68
|
width: 12px
|
66
69
|
height: 13px
|
67
70
|
font-size: 1px
|
@@ -69,21 +72,6 @@
|
|
69
72
|
&:hover
|
70
73
|
background-position: right -11px
|
71
74
|
div
|
72
|
-
-webkit-border-radius: 0 4px 4px 0
|
73
|
-
-moz-border-radius: 0 4px 4px 0
|
74
|
-
border-radius: 0 4px 4px 0
|
75
|
-
-moz-background-clip: padding
|
76
|
-
-webkit-background-clip: padding-box
|
77
|
-
background-clip: padding-box
|
78
|
-
background: #ccc
|
79
|
-
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #cccccc), color-stop(0.6, #eeeeee))
|
80
|
-
background-image: -webkit-linear-gradient(center bottom, #cccccc 0%, #eeeeee 60%)
|
81
|
-
background-image: -moz-linear-gradient(center bottom, #cccccc 0%, #eeeeee 60%)
|
82
|
-
background-image: -o-linear-gradient(bottom, #cccccc 0%, #eeeeee 60%)
|
83
|
-
background-image: -ms-linear-gradient(top, #cccccc 0%, #eeeeee 60%)
|
84
|
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#eeeeee',GradientType=0 )
|
85
|
-
background-image: linear-gradient(top, #cccccc 0%, #eeeeee 60%)
|
86
|
-
border-left: 1px solid #aaa
|
87
75
|
position: absolute
|
88
76
|
right: 0
|
89
77
|
top: 0
|
@@ -91,7 +79,7 @@
|
|
91
79
|
height: 100%
|
92
80
|
width: 18px
|
93
81
|
b
|
94
|
-
background: image-url('chosen-sprite.png') no-repeat 0
|
82
|
+
background: image-url('chosen-sprite.png') no-repeat 0 0
|
95
83
|
display: block
|
96
84
|
width: 100%
|
97
85
|
height: 100%
|
@@ -159,6 +147,9 @@
|
|
159
147
|
color: #666
|
160
148
|
background: transparent !important
|
161
149
|
border: 0 !important
|
150
|
+
font-family: sans-serif
|
151
|
+
font-size: 100%
|
152
|
+
height: 15px
|
162
153
|
padding: 5px
|
163
154
|
margin: 1px 0
|
164
155
|
outline: 0
|
@@ -176,17 +167,20 @@
|
|
176
167
|
-webkit-background-clip: padding-box
|
177
168
|
background-clip: padding-box
|
178
169
|
background-color: #e4e4e4
|
179
|
-
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #
|
180
|
-
background-image: -webkit-linear-gradient(center bottom, #
|
181
|
-
background-image: -moz-linear-gradient(center bottom, #
|
182
|
-
background-image: -o-linear-gradient(
|
183
|
-
background-image: -ms-linear-gradient(top, #
|
184
|
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#
|
185
|
-
background-image: linear-gradient(top, #
|
170
|
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.48, #e8e8e8), color-stop(0.5, #f0f0f0), color-stop(0.8, #f4f4f4))
|
171
|
+
background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, #e8e8e8 48%, #f0f0f0 50%, #f4f4f4 80%)
|
172
|
+
background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, #e8e8e8 48%, #f0f0f0 50%, #f4f4f4 80%)
|
173
|
+
background-image: -o-linear-gradient(top, #eeeeee 0%, #e8e8e8 48%, #f0f0f0 50%, #f4f4f4 80%)
|
174
|
+
background-image: -ms-linear-gradient(top, #eeeeee 0%, #e8e8e8 48%, #f0f0f0 50%, #f4f4f4 80%)
|
175
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4',GradientType=0 )
|
176
|
+
background-image: linear-gradient(top, #eeeeee 0%, #e8e8e8 48%, #f0f0f0 50%, #f4f4f4 80%)
|
177
|
+
-webkit-box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05)
|
178
|
+
-moz-box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05)
|
179
|
+
box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05)
|
186
180
|
color: #333
|
187
|
-
border: 1px solid #
|
181
|
+
border: 1px solid #aaaaaa
|
188
182
|
line-height: 13px
|
189
|
-
padding: 3px
|
183
|
+
padding: 3px 20px 3px 5px
|
190
184
|
margin: 3px 0 3px 5px
|
191
185
|
position: relative
|
192
186
|
span
|
@@ -213,7 +207,7 @@
|
|
213
207
|
|
214
208
|
.chzn-container .chzn-results
|
215
209
|
margin: 0 4px 4px 0
|
216
|
-
max-height:
|
210
|
+
max-height: 240px
|
217
211
|
padding: 0 0 0 4px
|
218
212
|
position: relative
|
219
213
|
overflow-x: hidden
|
@@ -226,15 +220,22 @@
|
|
226
220
|
.chzn-container .chzn-results
|
227
221
|
li
|
228
222
|
display: none
|
229
|
-
line-height:
|
230
|
-
padding:
|
223
|
+
line-height: 15px
|
224
|
+
padding: 5px 6px
|
231
225
|
margin: 0
|
232
226
|
list-style: none
|
233
227
|
.active-result
|
234
228
|
cursor: pointer
|
235
229
|
display: list-item
|
236
230
|
.highlighted
|
237
|
-
background: #3875d7
|
231
|
+
background-color: #3875d7
|
232
|
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.1, #2a62bc), color-stop(0.8, #3875d7))
|
233
|
+
background-image: -webkit-linear-gradient(center bottom, #2a62bc 10%, #3875d7 80%)
|
234
|
+
background-image: -moz-linear-gradient(center bottom, #2a62bc 10%, #3875d7 80%)
|
235
|
+
background-image: -o-linear-gradient(bottom, #2a62bc 10%, #3875d7 80%)
|
236
|
+
background-image: -ms-linear-gradient(top, #2a62bc 10%, #3875d7 80%)
|
237
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#2a62bc', endColorstr='#3875d7',GradientType=0 )
|
238
|
+
background-image: linear-gradient(top, #2a62bc 10%, #3875d7 80%)
|
238
239
|
color: #fff
|
239
240
|
li em
|
240
241
|
background: #feffde
|
@@ -249,11 +250,32 @@
|
|
249
250
|
color: #999
|
250
251
|
font-weight: bold
|
251
252
|
.group-option
|
252
|
-
padding-left:
|
253
|
+
padding-left: 15px
|
253
254
|
|
254
255
|
.chzn-container-multi .chzn-drop .result-selected
|
255
256
|
display: none
|
256
257
|
|
258
|
+
.chzn-container
|
259
|
+
.chzn-results-scroll
|
260
|
+
background: white
|
261
|
+
margin: 0px 4px
|
262
|
+
position: absolute
|
263
|
+
text-align: center
|
264
|
+
width: 321px
|
265
|
+
/* This should by dynamic with js
|
266
|
+
z-index: 1
|
267
|
+
span
|
268
|
+
display: inline-block
|
269
|
+
height: 17px
|
270
|
+
text-indent: -5000px
|
271
|
+
width: 9px
|
272
|
+
.chzn-results-scroll-down
|
273
|
+
bottom: 0
|
274
|
+
span
|
275
|
+
background: image-url('chosen-sprite.png') no-repeat -4px -3px
|
276
|
+
.chzn-results-scroll-up span
|
277
|
+
background: image-url('chosen-sprite.png') no-repeat -22px -3px
|
278
|
+
|
257
279
|
/* @end
|
258
280
|
|
259
281
|
/* @group Active
|
@@ -272,13 +294,13 @@
|
|
272
294
|
-o-box-shadow: 0 1px 0 #fff inset
|
273
295
|
box-shadow: 0 1px 0 #fff inset
|
274
296
|
background-color: #eee
|
275
|
-
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.
|
276
|
-
background-image: -webkit-linear-gradient(center bottom, white
|
277
|
-
background-image: -moz-linear-gradient(center bottom, white
|
278
|
-
background-image: -o-linear-gradient(bottom, white
|
279
|
-
background-image: -ms-linear-gradient(top, white
|
297
|
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.2, white), color-stop(0.8, #eeeeee))
|
298
|
+
background-image: -webkit-linear-gradient(center bottom, white 20%, #eeeeee 80%)
|
299
|
+
background-image: -moz-linear-gradient(center bottom, white 20%, #eeeeee 80%)
|
300
|
+
background-image: -o-linear-gradient(bottom, white 20%, #eeeeee 80%)
|
301
|
+
background-image: -ms-linear-gradient(top, white 20%, #eeeeee 80%)
|
280
302
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 )
|
281
|
-
background-image: linear-gradient(top, white
|
303
|
+
background-image: linear-gradient(top, white 20%, #eeeeee 80%)
|
282
304
|
-webkit-border-bottom-left-radius: 0
|
283
305
|
-webkit-border-bottom-right-radius: 0
|
284
306
|
-moz-border-radius-bottomleft: 0
|
@@ -321,13 +343,8 @@
|
|
321
343
|
margin-left: 26px
|
322
344
|
margin-right: 0
|
323
345
|
div
|
324
|
-
left:
|
346
|
+
left: 3px
|
325
347
|
right: auto
|
326
|
-
border-left: none
|
327
|
-
border-right: 1px solid #aaaaaa
|
328
|
-
-webkit-border-radius: 4px 0 0 4px
|
329
|
-
-moz-border-radius: 4px 0 0 4px
|
330
|
-
border-radius: 4px 0 0 4px
|
331
348
|
abbr
|
332
349
|
left: 26px
|
333
350
|
right: auto
|
@@ -335,10 +352,10 @@
|
|
335
352
|
li
|
336
353
|
float: right
|
337
354
|
.search-choice
|
338
|
-
padding: 3px
|
355
|
+
padding: 3px 5px 3px 19px
|
339
356
|
margin: 3px 5px 3px 0
|
340
357
|
.search-choice-close
|
341
|
-
left:
|
358
|
+
left: 4px
|
342
359
|
right: auto
|
343
360
|
background-position: right top
|
344
361
|
&.chzn-container-single .chzn-results
|
metadata
CHANGED
@@ -1,109 +1,80 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: chosen-rails
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.7
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 9
|
9
|
-
- 5
|
10
|
-
- 1
|
11
|
-
version: 0.9.5.1
|
12
6
|
platform: ruby
|
13
|
-
authors:
|
7
|
+
authors:
|
14
8
|
- Tse-Ching Ho
|
15
9
|
autorequire:
|
16
10
|
bindir: bin
|
17
11
|
cert_chain: []
|
18
|
-
|
19
|
-
date: 2011-12-22 00:00:00 +08:00
|
12
|
+
date: 2012-02-01 00:00:00.000000000 +08:00
|
20
13
|
default_executable:
|
21
|
-
dependencies:
|
22
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
23
16
|
name: railties
|
24
|
-
|
25
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
17
|
+
requirement: &70252135659060 !ruby/object:Gem::Requirement
|
26
18
|
none: false
|
27
|
-
requirements:
|
19
|
+
requirements:
|
28
20
|
- - ~>
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
|
31
|
-
segments:
|
32
|
-
- 3
|
33
|
-
- 0
|
34
|
-
version: "3.0"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3.0'
|
35
23
|
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: thor
|
39
24
|
prerelease: false
|
40
|
-
|
25
|
+
version_requirements: *70252135659060
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: thor
|
28
|
+
requirement: &70252135658280 !ruby/object:Gem::Requirement
|
41
29
|
none: false
|
42
|
-
requirements:
|
30
|
+
requirements:
|
43
31
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
segments:
|
47
|
-
- 0
|
48
|
-
- 14
|
49
|
-
version: "0.14"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.14'
|
50
34
|
type: :runtime
|
51
|
-
version_requirements: *id002
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
name: bundler
|
54
35
|
prerelease: false
|
55
|
-
|
36
|
+
version_requirements: *70252135658280
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: bundler
|
39
|
+
requirement: &70252135657780 !ruby/object:Gem::Requirement
|
56
40
|
none: false
|
57
|
-
requirements:
|
41
|
+
requirements:
|
58
42
|
- - ~>
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
|
61
|
-
segments:
|
62
|
-
- 1
|
63
|
-
- 0
|
64
|
-
version: "1.0"
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '1.0'
|
65
45
|
type: :development
|
66
|
-
version_requirements: *id003
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: rails
|
69
46
|
prerelease: false
|
70
|
-
|
47
|
+
version_requirements: *70252135657780
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: rails
|
50
|
+
requirement: &70252135657060 !ruby/object:Gem::Requirement
|
71
51
|
none: false
|
72
|
-
requirements:
|
52
|
+
requirements:
|
73
53
|
- - ~>
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
|
76
|
-
segments:
|
77
|
-
- 3
|
78
|
-
- 0
|
79
|
-
version: "3.0"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '3.0'
|
80
56
|
type: :development
|
81
|
-
version_requirements: *id004
|
82
|
-
- !ruby/object:Gem::Dependency
|
83
|
-
name: sass
|
84
57
|
prerelease: false
|
85
|
-
|
58
|
+
version_requirements: *70252135657060
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: sass
|
61
|
+
requirement: &70252135656580 !ruby/object:Gem::Requirement
|
86
62
|
none: false
|
87
|
-
requirements:
|
63
|
+
requirements:
|
88
64
|
- - ~>
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
|
91
|
-
segments:
|
92
|
-
- 3
|
93
|
-
- 1
|
94
|
-
version: "3.1"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '3.1'
|
95
67
|
type: :development
|
96
|
-
|
97
|
-
|
98
|
-
|
68
|
+
prerelease: false
|
69
|
+
version_requirements: *70252135656580
|
70
|
+
description: Chosen is a javascript library of select box enhancer for jQuery and
|
71
|
+
Protoype. This gem integrates Chosen with Rails asset pipeline for easy of use.
|
72
|
+
email:
|
99
73
|
- tsechingho@gmail.com
|
100
74
|
executables: []
|
101
|
-
|
102
75
|
extensions: []
|
103
|
-
|
104
76
|
extra_rdoc_files: []
|
105
|
-
|
106
|
-
files:
|
77
|
+
files:
|
107
78
|
- .gitignore
|
108
79
|
- Gemfile
|
109
80
|
- LICENSE
|
@@ -126,36 +97,26 @@ files:
|
|
126
97
|
has_rdoc: true
|
127
98
|
homepage: https://github.com/tsechingho/chosen-rails
|
128
99
|
licenses: []
|
129
|
-
|
130
100
|
post_install_message:
|
131
101
|
rdoc_options: []
|
132
|
-
|
133
|
-
require_paths:
|
102
|
+
require_paths:
|
134
103
|
- lib
|
135
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
104
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
136
105
|
none: false
|
137
|
-
requirements:
|
138
|
-
- -
|
139
|
-
- !ruby/object:Gem::Version
|
140
|
-
|
141
|
-
|
142
|
-
- 0
|
143
|
-
version: "0"
|
144
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
111
|
none: false
|
146
|
-
requirements:
|
147
|
-
- -
|
148
|
-
- !ruby/object:Gem::Version
|
149
|
-
|
150
|
-
segments:
|
151
|
-
- 0
|
152
|
-
version: "0"
|
112
|
+
requirements:
|
113
|
+
- - ! '>='
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
153
116
|
requirements: []
|
154
|
-
|
155
117
|
rubyforge_project:
|
156
118
|
rubygems_version: 1.6.2
|
157
119
|
signing_key:
|
158
120
|
specification_version: 3
|
159
121
|
summary: Integrate Chosen javascript library with Rails asset pipeline
|
160
122
|
test_files: []
|
161
|
-
|