chosen-rails 0.9.12 → 0.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +10 -2
- data/lib/chosen-rails.rb +1 -1
- data/lib/chosen-rails/version.rb +2 -2
- data/vendor/assets/javascripts/chosen.jquery.coffee +32 -48
- data/vendor/assets/javascripts/chosen.proto.coffee +24 -35
- data/vendor/assets/javascripts/lib/abstract-chosen.coffee +29 -3
- data/vendor/assets/stylesheets/chosen.css.sass +34 -14
- metadata +19 -39
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5ec448c4b6a43013c078a609be6aa8346a77ac64
|
4
|
+
data.tar.gz: 48e99ab37060ce3e9b3c72964396de56db1cf946
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3ec8744609fca23ffb76ce935d458af3b77a0916a411f451a6a365b0d5036ea8fa855780b0307e0af6f03b8f0a9e656f97324e5edb409d3c25f0cbb64b85860d
|
7
|
+
data.tar.gz: 35c86ccec24fad335baf4bbd164d51f0fe0a6ea4b679e8827c3435bb37c95a998714ac021acbf0909b4db14e71a006a19c13170390c12e59424cdb96e80c8f92
|
data/README.md
CHANGED
@@ -48,11 +48,19 @@ And this file must be included in `application.js`
|
|
48
48
|
|
49
49
|
Also add the class to your form field
|
50
50
|
|
51
|
-
<%= f.
|
51
|
+
<%= f.select :author,
|
52
|
+
User.all.map { |u| [u.name, u.id] },
|
53
|
+
{ include_blank: true },
|
54
|
+
{ class: 'chzn-select' }
|
55
|
+
%>
|
52
56
|
|
53
57
|
If you use simple form as form builder
|
54
58
|
|
55
|
-
<%= f.
|
59
|
+
<%= f.association :author,
|
60
|
+
collection: User.all,
|
61
|
+
include_blank: true,
|
62
|
+
input_html: { class: 'chzn-select' }
|
63
|
+
%>
|
56
64
|
|
57
65
|
## Gem maintenance
|
58
66
|
|
data/lib/chosen-rails.rb
CHANGED
data/lib/chosen-rails/version.rb
CHANGED
@@ -7,17 +7,9 @@ $ = jQuery
|
|
7
7
|
|
8
8
|
$.fn.extend({
|
9
9
|
chosen: (options) ->
|
10
|
-
ua = navigator.userAgent.toLowerCase();
|
11
|
-
|
12
|
-
match = /(msie) ([\w.]+)/.exec( ua ) || [];
|
13
|
-
|
14
|
-
browser =
|
15
|
-
name: match[ 1 ] || ""
|
16
|
-
version: match[ 2 ] || "0"
|
17
|
-
|
18
10
|
# Do no harm and return as soon as possible for unsupported browsers, namely IE6 and IE7
|
19
11
|
# Continue on if running IE document type but in compatibility mode
|
20
|
-
return this
|
12
|
+
return this unless AbstractChosen.browser_is_supported()
|
21
13
|
this.each((input_field) ->
|
22
14
|
$this = $ this
|
23
15
|
$this.data('chosen', new Chosen(this, options)) unless $this.hasClass "chzn-done"
|
@@ -28,7 +20,7 @@ class Chosen extends AbstractChosen
|
|
28
20
|
|
29
21
|
setup: ->
|
30
22
|
@form_field_jq = $ @form_field
|
31
|
-
@
|
23
|
+
@current_selectedIndex = @form_field.selectedIndex
|
32
24
|
@is_rtl = @form_field_jq.hasClass "chzn-rtl"
|
33
25
|
|
34
26
|
finish_setup: ->
|
@@ -43,30 +35,22 @@ class Chosen extends AbstractChosen
|
|
43
35
|
container_classes.push @form_field.className if @inherit_select_classes && @form_field.className
|
44
36
|
container_classes.push "chzn-rtl" if @is_rtl
|
45
37
|
|
46
|
-
|
38
|
+
container_props =
|
39
|
+
'id': @container_id
|
40
|
+
'class': container_classes.join ' '
|
41
|
+
'style': "width: #{this.container_width()};"
|
42
|
+
'title': @form_field.title
|
47
43
|
|
48
|
-
|
49
|
-
id: @container_id
|
50
|
-
class: container_classes.join ' '
|
51
|
-
style: 'width: ' + (@f_width) + 'px;' #use parens around @f_width so coffeescript doesn't think + ' px' is a function parameter
|
52
|
-
title: @form_field.title
|
53
|
-
|
54
|
-
container_div = ($ "<div />", container_props)
|
44
|
+
@container = ($ "<div />", container_props)
|
55
45
|
|
56
46
|
if @is_multiple
|
57
|
-
|
47
|
+
@container.html '<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + @default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'
|
58
48
|
else
|
59
|
-
|
49
|
+
@container.html '<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>' + @default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'
|
60
50
|
|
61
|
-
@form_field_jq.hide().after
|
62
|
-
@container = ($ '#' + @container_id)
|
51
|
+
@form_field_jq.hide().after @container
|
63
52
|
@dropdown = @container.find('div.chzn-drop').first()
|
64
53
|
|
65
|
-
dd_top = @container.height()
|
66
|
-
dd_width = (@f_width - get_side_border_padding(@dropdown))
|
67
|
-
|
68
|
-
@dropdown.css({"width": dd_width + "px", "top": dd_top + "px"})
|
69
|
-
|
70
54
|
@search_field = @container.find('input').first()
|
71
55
|
@search_results = @container.find('ul.chzn-results').first()
|
72
56
|
this.search_field_scale()
|
@@ -79,11 +63,10 @@ class Chosen extends AbstractChosen
|
|
79
63
|
else
|
80
64
|
@search_container = @container.find('div.chzn-search').first()
|
81
65
|
@selected_item = @container.find('.chzn-single').first()
|
82
|
-
|
83
|
-
@search_field.css( {"width" : sf_width + "px"} )
|
84
|
-
|
66
|
+
|
85
67
|
this.results_build()
|
86
68
|
this.set_tab_index()
|
69
|
+
this.set_label_behavior()
|
87
70
|
@form_field_jq.trigger("liszt:ready", {chosen: this})
|
88
71
|
|
89
72
|
register_observers: ->
|
@@ -125,10 +108,10 @@ class Chosen extends AbstractChosen
|
|
125
108
|
|
126
109
|
container_mousedown: (evt) ->
|
127
110
|
if !@is_disabled
|
128
|
-
target_closelink = if evt? then ($ evt.target).hasClass "search-choice-close" else false
|
129
111
|
if evt and evt.type is "mousedown" and not @results_showing
|
130
112
|
evt.preventDefault()
|
131
|
-
|
113
|
+
|
114
|
+
if not (evt? and ($ evt.target).hasClass "search-choice-close")
|
132
115
|
if not @active_field
|
133
116
|
@search_field.val "" if @is_multiple
|
134
117
|
$(document).click @click_test_action
|
@@ -138,8 +121,6 @@ class Chosen extends AbstractChosen
|
|
138
121
|
this.results_toggle()
|
139
122
|
|
140
123
|
this.activate_field()
|
141
|
-
else
|
142
|
-
@pending_destroy_click = false
|
143
124
|
|
144
125
|
container_mouseup: (evt) ->
|
145
126
|
this.results_reset(evt) if evt.target.nodeName is "ABBR" and not @is_disabled
|
@@ -247,9 +228,8 @@ class Chosen extends AbstractChosen
|
|
247
228
|
@form_field_jq.trigger("liszt:maxselected", {chosen: this})
|
248
229
|
return false
|
249
230
|
|
250
|
-
dd_top = if @is_multiple then @container.height() else (@container.height() - 1)
|
251
231
|
@form_field_jq.trigger("liszt:showing_dropdown", {chosen: this})
|
252
|
-
@dropdown.css {"
|
232
|
+
@dropdown.css {"left":0}
|
253
233
|
@results_showing = true
|
254
234
|
|
255
235
|
@search_field.focus()
|
@@ -271,6 +251,14 @@ class Chosen extends AbstractChosen
|
|
271
251
|
@form_field_jq.attr "tabindex", -1
|
272
252
|
@search_field.attr "tabindex", ti
|
273
253
|
|
254
|
+
set_label_behavior: ->
|
255
|
+
@form_field_label = @form_field_jq.parents("label") # first check for a parent label
|
256
|
+
if not @form_field_label.length and @form_field.id.length
|
257
|
+
@form_field_label = $("label[for=#{@form_field.id}]") #next check for a for=#{id}
|
258
|
+
|
259
|
+
if @form_field_label.length > 0
|
260
|
+
@form_field_label.click (evt) => if @is_multiple then this.container_mousedown(evt) else this.activate_field()
|
261
|
+
|
274
262
|
show_search_field_default: ->
|
275
263
|
if @is_multiple and @choices < 1 and not @active_field
|
276
264
|
@search_field.val(@default_text)
|
@@ -315,11 +303,8 @@ class Chosen extends AbstractChosen
|
|
315
303
|
|
316
304
|
choice_destroy_link_click: (evt) ->
|
317
305
|
evt.preventDefault()
|
318
|
-
|
319
|
-
|
320
|
-
this.choice_destroy $(evt.target)
|
321
|
-
else
|
322
|
-
evt.stopPropagation
|
306
|
+
evt.stopPropagation()
|
307
|
+
this.choice_destroy $(evt.target) unless @is_disabled
|
323
308
|
|
324
309
|
choice_destroy: (link) ->
|
325
310
|
if this.result_deselect (link.attr "rel")
|
@@ -342,7 +327,7 @@ class Chosen extends AbstractChosen
|
|
342
327
|
this.results_hide() if @active_field
|
343
328
|
|
344
329
|
results_reset_cleanup: ->
|
345
|
-
@
|
330
|
+
@current_selectedIndex = @form_field.selectedIndex
|
346
331
|
@selected_item.find("abbr").remove()
|
347
332
|
|
348
333
|
result_select: (evt) ->
|
@@ -377,8 +362,8 @@ class Chosen extends AbstractChosen
|
|
377
362
|
|
378
363
|
@search_field.val ""
|
379
364
|
|
380
|
-
@form_field_jq.trigger "change", {'selected': @form_field.options[item.options_index].value} if @is_multiple || @
|
381
|
-
@
|
365
|
+
@form_field_jq.trigger "change", {'selected': @form_field.options[item.options_index].value} if @is_multiple || @form_field.selectedIndex != @current_selectedIndex
|
366
|
+
@current_selectedIndex = @form_field.selectedIndex
|
382
367
|
this.search_field_scale()
|
383
368
|
|
384
369
|
result_activate: (el) ->
|
@@ -571,14 +556,13 @@ class Chosen extends AbstractChosen
|
|
571
556
|
w = div.width() + 25
|
572
557
|
div.remove()
|
573
558
|
|
559
|
+
@f_width = @container.outerWidth() unless @f_width
|
560
|
+
|
574
561
|
if( w > @f_width-10 )
|
575
562
|
w = @f_width - 10
|
576
563
|
|
577
564
|
@search_field.css({'width': w + 'px'})
|
578
|
-
|
579
|
-
dd_top = @container.height()
|
580
|
-
@dropdown.css({"top": dd_top + "px"})
|
581
|
-
|
565
|
+
|
582
566
|
generate_random_id: ->
|
583
567
|
string = "sel" + this.generate_random_char() + this.generate_random_char() + this.generate_random_char()
|
584
568
|
while $("#" + string).length > 0
|
@@ -7,7 +7,7 @@ root = this
|
|
7
7
|
class Chosen extends AbstractChosen
|
8
8
|
|
9
9
|
setup: ->
|
10
|
-
@
|
10
|
+
@current_selectedIndex = @form_field.selectedIndex
|
11
11
|
@is_rtl = @form_field.hasClassName "chzn-rtl"
|
12
12
|
|
13
13
|
finish_setup: ->
|
@@ -31,24 +31,16 @@ class Chosen extends AbstractChosen
|
|
31
31
|
container_classes.push @form_field.className if @inherit_select_classes && @form_field.className
|
32
32
|
container_classes.push "chzn-rtl" if @is_rtl
|
33
33
|
|
34
|
-
@f_width = if @form_field.getStyle("width") then parseInt @form_field.getStyle("width"), 10 else @form_field.getWidth()
|
35
|
-
|
36
34
|
container_props =
|
37
35
|
'id': @container_id
|
38
36
|
'class': container_classes.join ' '
|
39
|
-
'style':
|
37
|
+
'style': "width: #{this.container_width()};"
|
40
38
|
'title': @form_field.title
|
41
|
-
|
42
|
-
base_template = if @is_multiple then new Element('div', container_props).update( @multi_temp.evaluate({ "default": @default_text}) ) else new Element('div', container_props).update( @single_temp.evaluate({ "default":@default_text }) )
|
43
|
-
|
44
|
-
@form_field.hide().insert({ after: base_template })
|
45
|
-
@container = $(@container_id)
|
46
|
-
@dropdown = @container.down('div.chzn-drop')
|
47
39
|
|
48
|
-
|
49
|
-
dd_width = (@f_width - get_side_border_padding(@dropdown))
|
40
|
+
@container = if @is_multiple then new Element('div', container_props).update( @multi_temp.evaluate({ "default": @default_text}) ) else new Element('div', container_props).update( @single_temp.evaluate({ "default":@default_text }) )
|
50
41
|
|
51
|
-
@
|
42
|
+
@form_field.hide().insert({ after: @container })
|
43
|
+
@dropdown = @container.down('div.chzn-drop')
|
52
44
|
|
53
45
|
@search_field = @container.down('input')
|
54
46
|
@search_results = @container.down('ul.chzn-results')
|
@@ -62,11 +54,10 @@ class Chosen extends AbstractChosen
|
|
62
54
|
else
|
63
55
|
@search_container = @container.down('div.chzn-search')
|
64
56
|
@selected_item = @container.down('.chzn-single')
|
65
|
-
sf_width = dd_width - get_side_border_padding(@search_container) - get_side_border_padding(@search_field)
|
66
|
-
@search_field.setStyle( {"width" : sf_width + "px"} )
|
67
57
|
|
68
58
|
this.results_build()
|
69
59
|
this.set_tab_index()
|
60
|
+
this.set_label_behavior()
|
70
61
|
@form_field.fire("liszt:ready", {chosen: this})
|
71
62
|
|
72
63
|
register_observers: ->
|
@@ -107,10 +98,10 @@ class Chosen extends AbstractChosen
|
|
107
98
|
|
108
99
|
container_mousedown: (evt) ->
|
109
100
|
if !@is_disabled
|
110
|
-
target_closelink = if evt? then evt.target.hasClassName "search-choice-close" else false
|
111
101
|
if evt and evt.type is "mousedown" and not @results_showing
|
112
102
|
evt.stop()
|
113
|
-
|
103
|
+
|
104
|
+
if not (evt? and evt.target.hasClassName "search-choice-close")
|
114
105
|
if not @active_field
|
115
106
|
@search_field.clear() if @is_multiple
|
116
107
|
document.observe "click", @click_test_action
|
@@ -119,8 +110,6 @@ class Chosen extends AbstractChosen
|
|
119
110
|
this.results_toggle()
|
120
111
|
|
121
112
|
this.activate_field()
|
122
|
-
else
|
123
|
-
@pending_destroy_click = false
|
124
113
|
|
125
114
|
container_mouseup: (evt) ->
|
126
115
|
this.results_reset(evt) if evt.target.nodeName is "ABBR" and not @is_disabled
|
@@ -226,9 +215,8 @@ class Chosen extends AbstractChosen
|
|
226
215
|
@form_field.fire("liszt:maxselected", {chosen: this})
|
227
216
|
return false
|
228
217
|
|
229
|
-
dd_top = if @is_multiple then @container.getHeight() else (@container.getHeight() - 1)
|
230
218
|
@form_field.fire("liszt:showing_dropdown", {chosen: this})
|
231
|
-
@dropdown.setStyle {"
|
219
|
+
@dropdown.setStyle {"left":0}
|
232
220
|
@results_showing = true
|
233
221
|
|
234
222
|
@search_field.focus()
|
@@ -250,6 +238,14 @@ class Chosen extends AbstractChosen
|
|
250
238
|
@form_field.tabIndex = -1
|
251
239
|
@search_field.tabIndex = ti
|
252
240
|
|
241
|
+
set_label_behavior: ->
|
242
|
+
@form_field_label = @form_field.up("label") # first check for a parent label
|
243
|
+
if not @form_field_label?
|
244
|
+
@form_field_label = $$("label[for=#{@form_field.id}]").first() #next check for a for=#{id}
|
245
|
+
|
246
|
+
if @form_field_label?
|
247
|
+
@form_field_label.observe "click", (evt) => if @is_multiple then this.container_mousedown(evt) else this.activate_field()
|
248
|
+
|
253
249
|
show_search_field_default: ->
|
254
250
|
if @is_multiple and @choices < 1 and not @active_field
|
255
251
|
@search_field.value = @default_text
|
@@ -295,9 +291,8 @@ class Chosen extends AbstractChosen
|
|
295
291
|
|
296
292
|
choice_destroy_link_click: (evt) ->
|
297
293
|
evt.preventDefault()
|
298
|
-
|
299
|
-
|
300
|
-
this.choice_destroy evt.target
|
294
|
+
evt.stopPropagation()
|
295
|
+
this.choice_destroy evt.target unless @is_disabled
|
301
296
|
|
302
297
|
choice_destroy: (link) ->
|
303
298
|
if this.result_deselect link.readAttribute("rel")
|
@@ -320,7 +315,7 @@ class Chosen extends AbstractChosen
|
|
320
315
|
this.results_hide() if @active_field
|
321
316
|
|
322
317
|
results_reset_cleanup: ->
|
323
|
-
@
|
318
|
+
@current_selectedIndex = @form_field.selectedIndex
|
324
319
|
deselect_trigger = @selected_item.down("abbr")
|
325
320
|
deselect_trigger.remove() if(deselect_trigger)
|
326
321
|
|
@@ -354,8 +349,8 @@ class Chosen extends AbstractChosen
|
|
354
349
|
|
355
350
|
@search_field.value = ""
|
356
351
|
|
357
|
-
@form_field.simulate("change") if typeof Event.simulate is 'function' && (@is_multiple || @form_field.
|
358
|
-
@
|
352
|
+
@form_field.simulate("change") if typeof Event.simulate is 'function' && (@is_multiple || @form_field.selectedIndex != @current_selectedIndex)
|
353
|
+
@current_selectedIndex = @form_field.selectedIndex
|
359
354
|
|
360
355
|
this.search_field_scale()
|
361
356
|
|
@@ -553,21 +548,15 @@ class Chosen extends AbstractChosen
|
|
553
548
|
w = Element.measure(div, 'width') + 25
|
554
549
|
div.remove()
|
555
550
|
|
551
|
+
@f_width = @container.getWidth() unless @f_width
|
552
|
+
|
556
553
|
if( w > @f_width-10 )
|
557
554
|
w = @f_width - 10
|
558
555
|
|
559
556
|
@search_field.setStyle({'width': w + 'px'})
|
560
557
|
|
561
|
-
dd_top = @container.getHeight()
|
562
|
-
@dropdown.setStyle({"top": dd_top + "px"})
|
563
|
-
|
564
558
|
root.Chosen = Chosen
|
565
559
|
|
566
|
-
# Prototype does not support version numbers so we add it ourselves
|
567
|
-
if Prototype.Browser.IE
|
568
|
-
if /MSIE (\d+\.\d+);/.test(navigator.userAgent)
|
569
|
-
Prototype.BrowserFeatures['Version'] = new Number(RegExp.$1);
|
570
|
-
|
571
560
|
|
572
561
|
get_side_border_padding = (elmt) ->
|
573
562
|
layout = new Element.Layout(elmt)
|
@@ -7,6 +7,7 @@ root = this
|
|
7
7
|
class AbstractChosen
|
8
8
|
|
9
9
|
constructor: (@form_field, @options={}) ->
|
10
|
+
return unless AbstractChosen.browser_is_supported()
|
10
11
|
@is_multiple = @form_field.multiple
|
11
12
|
this.set_default_text()
|
12
13
|
this.set_default_values()
|
@@ -40,11 +41,11 @@ class AbstractChosen
|
|
40
41
|
if @form_field.getAttribute("data-placeholder")
|
41
42
|
@default_text = @form_field.getAttribute("data-placeholder")
|
42
43
|
else if @is_multiple
|
43
|
-
@default_text = @options.placeholder_text_multiple || @options.placeholder_text ||
|
44
|
+
@default_text = @options.placeholder_text_multiple || @options.placeholder_text || AbstractChosen.default_multiple_text
|
44
45
|
else
|
45
|
-
@default_text = @options.placeholder_text_single || @options.placeholder_text ||
|
46
|
+
@default_text = @options.placeholder_text_single || @options.placeholder_text || AbstractChosen.default_single_text
|
46
47
|
|
47
|
-
@results_none_found = @form_field.getAttribute("data-no_results_text") || @options.no_results_text ||
|
48
|
+
@results_none_found = @form_field.getAttribute("data-no_results_text") || @options.no_results_text || AbstractChosen.default_no_result_text
|
48
49
|
|
49
50
|
mouse_enter: -> @mouse_on_container = true
|
50
51
|
mouse_leave: -> @mouse_on_container = false
|
@@ -76,6 +77,7 @@ class AbstractChosen
|
|
76
77
|
""
|
77
78
|
|
78
79
|
results_update_field: ->
|
80
|
+
this.set_default_text()
|
79
81
|
this.results_reset_cleanup() if not @is_multiple
|
80
82
|
this.result_clear_highlight()
|
81
83
|
@result_single_selected = null
|
@@ -124,4 +126,28 @@ class AbstractChosen
|
|
124
126
|
rand = Math.floor(Math.random() * chars.length)
|
125
127
|
newchar = chars.substring rand, rand+1
|
126
128
|
|
129
|
+
container_width: ->
|
130
|
+
return @options.width if @options.width?
|
131
|
+
|
132
|
+
width = if window.getComputedStyle?
|
133
|
+
parseFloat window.getComputedStyle(@form_field).getPropertyValue('width')
|
134
|
+
else if jQuery?
|
135
|
+
@form_field_jq.outerWidth()
|
136
|
+
else
|
137
|
+
@form_field.getWidth()
|
138
|
+
|
139
|
+
width + "px"
|
140
|
+
|
141
|
+
# class methods and variables ============================================================
|
142
|
+
|
143
|
+
@browser_is_supported: ->
|
144
|
+
if window.navigator.appName == "Microsoft Internet Explorer"
|
145
|
+
return null isnt document.documentMode >= 8
|
146
|
+
return true
|
147
|
+
|
148
|
+
@default_multiple_text: "Select Some Options"
|
149
|
+
@default_single_text: "Select an Option"
|
150
|
+
@default_no_result_text: "No results match"
|
151
|
+
|
152
|
+
|
127
153
|
root.AbstractChosen = AbstractChosen
|
@@ -4,19 +4,26 @@
|
|
4
4
|
font-size: 13px
|
5
5
|
position: relative
|
6
6
|
display: inline-block
|
7
|
+
vertical-align: middle
|
7
8
|
zoom: 1
|
8
9
|
*display: inline
|
9
10
|
.chzn-drop
|
10
11
|
background: #fff
|
11
|
-
border: 1px solid #
|
12
|
+
border: 1px solid #aaa
|
12
13
|
border-top: 0
|
13
14
|
position: absolute
|
14
|
-
top:
|
15
|
+
top: 100%
|
15
16
|
left: 0
|
16
17
|
-webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
|
17
18
|
-moz-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
|
18
19
|
box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
|
19
20
|
z-index: 1010
|
21
|
+
width: 100%
|
22
|
+
-moz-box-sizing: border-box
|
23
|
+
-ms-box-sizing: border-box
|
24
|
+
-webkit-box-sizing: border-box
|
25
|
+
-khtml-box-sizing: border-box
|
26
|
+
box-sizing: border-box
|
20
27
|
|
21
28
|
/* @end
|
22
29
|
|
@@ -102,10 +109,17 @@
|
|
102
109
|
margin: 1px 0
|
103
110
|
padding: 4px 20px 4px 5px
|
104
111
|
outline: 0
|
105
|
-
border: 1px solid #
|
112
|
+
border: 1px solid #aaa
|
106
113
|
font-family: sans-serif
|
107
114
|
font-size: 1em
|
115
|
+
width: 100%
|
116
|
+
-moz-box-sizing: border-box
|
117
|
+
-ms-box-sizing: border-box
|
118
|
+
-webkit-box-sizing: border-box
|
119
|
+
-khtml-box-sizing: border-box
|
120
|
+
box-sizing: border-box
|
108
121
|
.chzn-drop
|
122
|
+
margin-top: -1px
|
109
123
|
-webkit-border-radius: 0 0 4px 4px
|
110
124
|
-moz-border-radius: 0 0 4px 4px
|
111
125
|
border-radius: 0 0 4px 4px
|
@@ -113,11 +127,11 @@
|
|
113
127
|
-webkit-background-clip: padding-box
|
114
128
|
background-clip: padding-box
|
115
129
|
|
116
|
-
|
117
|
-
|
118
|
-
.chzn-container-single-nosearch .chzn-search input
|
130
|
+
.chzn-container-single-nosearch .chzn-search
|
119
131
|
position: absolute
|
120
|
-
left: -
|
132
|
+
left: -9999px
|
133
|
+
|
134
|
+
/* @end
|
121
135
|
|
122
136
|
/* @group Multi Chosen
|
123
137
|
|
@@ -128,7 +142,7 @@
|
|
128
142
|
background-image: -moz-linear-gradient(top, #eeeeee 1%, white 15%)
|
129
143
|
background-image: -o-linear-gradient(top, #eeeeee 1%, white 15%)
|
130
144
|
background-image: linear-gradient(#eeeeee 1%, white 15%)
|
131
|
-
border: 1px solid #
|
145
|
+
border: 1px solid #aaa
|
132
146
|
margin: 0
|
133
147
|
padding: 0
|
134
148
|
cursor: text
|
@@ -136,6 +150,12 @@
|
|
136
150
|
height: auto !important
|
137
151
|
height: 1%
|
138
152
|
position: relative
|
153
|
+
width: 100%
|
154
|
+
-moz-box-sizing: border-box
|
155
|
+
-ms-box-sizing: border-box
|
156
|
+
-webkit-box-sizing: border-box
|
157
|
+
-khtml-box-sizing: border-box
|
158
|
+
box-sizing: border-box
|
139
159
|
li
|
140
160
|
float: left
|
141
161
|
list-style: none
|
@@ -224,7 +244,7 @@
|
|
224
244
|
-webkit-overflow-scrolling: touch
|
225
245
|
|
226
246
|
.chzn-container-multi .chzn-results
|
227
|
-
margin:
|
247
|
+
margin: 0
|
228
248
|
padding: 0
|
229
249
|
|
230
250
|
.chzn-container .chzn-results
|
@@ -296,10 +316,10 @@
|
|
296
316
|
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
|
297
317
|
border: 1px solid #5897fb
|
298
318
|
.chzn-single-with-drop
|
299
|
-
border: 1px solid #
|
300
|
-
-webkit-box-shadow: 0 1px 0
|
301
|
-
-moz-box-shadow: 0 1px 0
|
302
|
-
box-shadow: 0 1px 0
|
319
|
+
border: 1px solid #aaa
|
320
|
+
-webkit-box-shadow: 0 1px 0 #fff inset
|
321
|
+
-moz-box-shadow: 0 1px 0 #fff inset
|
322
|
+
box-shadow: 0 1px 0 #fff inset
|
303
323
|
background-color: #eee
|
304
324
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 )
|
305
325
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #eeeeee), color-stop(80%, white))
|
@@ -324,7 +344,7 @@
|
|
324
344
|
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
|
325
345
|
border: 1px solid #5897fb
|
326
346
|
.search-field input
|
327
|
-
color: #
|
347
|
+
color: #111 !important
|
328
348
|
|
329
349
|
/* @end
|
330
350
|
|
metadata
CHANGED
@@ -1,110 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chosen-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
5
|
-
prerelease:
|
4
|
+
version: 0.9.13
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Tse-Ching Ho
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-04-24 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: railties
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '3.0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '3.0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: coffee-rails
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '3.2'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '3.2'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: sass-rails
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '3.2'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '3.2'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: bundler
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '1.0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '1.0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: rails
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '3.0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - '>='
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '3.0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: thor
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - '>='
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0.14'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - '>='
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0.14'
|
110
97
|
description: Chosen is a javascript library of select box enhancer for jQuery and
|
@@ -137,32 +124,25 @@ files:
|
|
137
124
|
- vendor/assets/stylesheets/chosen.css.sass
|
138
125
|
homepage: https://github.com/tsechingho/chosen-rails
|
139
126
|
licenses: []
|
127
|
+
metadata: {}
|
140
128
|
post_install_message:
|
141
129
|
rdoc_options: []
|
142
130
|
require_paths:
|
143
131
|
- lib
|
144
132
|
required_ruby_version: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
133
|
requirements:
|
147
|
-
- -
|
134
|
+
- - '>='
|
148
135
|
- !ruby/object:Gem::Version
|
149
136
|
version: '0'
|
150
|
-
segments:
|
151
|
-
- 0
|
152
|
-
hash: -1794190038984535268
|
153
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
|
-
none: false
|
155
138
|
requirements:
|
156
|
-
- -
|
139
|
+
- - '>='
|
157
140
|
- !ruby/object:Gem::Version
|
158
141
|
version: '0'
|
159
|
-
segments:
|
160
|
-
- 0
|
161
|
-
hash: -1794190038984535268
|
162
142
|
requirements: []
|
163
143
|
rubyforge_project:
|
164
|
-
rubygems_version:
|
144
|
+
rubygems_version: 2.0.0
|
165
145
|
signing_key:
|
166
|
-
specification_version:
|
146
|
+
specification_version: 4
|
167
147
|
summary: Integrate Chosen javascript library with Rails asset pipeline
|
168
148
|
test_files: []
|