chosen-rails 0.9.15 → 0.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bac675bdf969fb0dc587c152a924a2eadff6d44f
4
- data.tar.gz: 727f3bb3d99c34502ce16b8d32b60b693eb3c1b7
3
+ metadata.gz: 9cc8bd119b65d642d99ed11363c0dcb055ddc077
4
+ data.tar.gz: 3ea9543936eeebdb80c7726779463219b1328ca5
5
5
  SHA512:
6
- metadata.gz: 7f8d165ce179fe3882a0846d1d3be752a192f2633f61ee4bf04ea9c2f1b2d874f52f9930bf506f880fe3ba4596c2fa13bfdbdbb3c1e4180e53c3124bd7bfa0b4
7
- data.tar.gz: 56b856a0637d3f5c09d49be9c376af8d78249691b55fc5b285bb0966759998f7053fe3717e47be34e4453826ff3a64974e2a1e671290b6e3b3084ed79d7768c4
6
+ metadata.gz: 4b6b8a50e83ab7223568c9875f137cc5fc16210c93e8f47c12804b37c05f6c58de9685a2bed8e8598251f91cc1306ac7e689ec057e29fbe53724caa1672f4237
7
+ data.tar.gz: 9421014b4e4f11a55f477e1648ff2ec6109f4c8b7762eafa85cadad5c8918ebe2fa4e763920fd34e27ab9b54331eead8fb7b805f8c293e0cec13fc82a5361c73
data/README.md CHANGED
@@ -39,7 +39,9 @@ Add to one coffee script file, like `scaffold.js.coffee`
39
39
  $('.chzn-select').chosen
40
40
  allow_single_deselect: true
41
41
  no_results_text: 'No results matched'
42
+ width: '200px'
42
43
 
44
+ Notice: `width` option is required since `Chosen 0.9.15`.
43
45
 
44
46
  And this file must be included in `application.js`
45
47
 
@@ -1,4 +1,5 @@
1
1
  require 'thor'
2
+ require 'json'
2
3
 
3
4
  class SourceFile < Thor
4
5
  include Thor::Actions
@@ -6,14 +7,14 @@ class SourceFile < Thor
6
7
  desc 'fetch source files', 'fetch source files from GitHub'
7
8
  def fetch remote, branch
8
9
  self.destination_root = 'vendor/assets'
9
- get "#{remote}/raw/#{branch}/chosen/chosen-sprite.png", 'images/chosen-sprite.png'
10
- get "#{remote}/raw/#{branch}/chosen/chosen-sprite@2x.png", 'images/chosen-sprite@2x.png'
11
- get "#{remote}/raw/#{branch}/chosen/chosen.css", 'stylesheets/chosen.css'
10
+ get "#{remote}/raw/#{branch}/public/chosen-sprite.png", 'images/chosen-sprite.png'
11
+ get "#{remote}/raw/#{branch}/public/chosen-sprite@2x.png", 'images/chosen-sprite@2x.png'
12
+ get "#{remote}/raw/#{branch}/public/chosen.css", 'stylesheets/chosen.css'
12
13
  get "#{remote}/raw/#{branch}/coffee/lib/abstract-chosen.coffee", 'javascripts/lib/abstract-chosen.coffee'
13
14
  get "#{remote}/raw/#{branch}/coffee/lib/select-parser.coffee", 'javascripts/lib/select-parser.coffee'
14
15
  get "#{remote}/raw/#{branch}/coffee/chosen.jquery.coffee", 'javascripts/chosen.jquery.coffee'
15
16
  get "#{remote}/raw/#{branch}/coffee/chosen.proto.coffee", 'javascripts/chosen.proto.coffee'
16
- get "#{remote}/raw/#{branch}/VERSION", 'VERSION'
17
+ get "#{remote}/raw/#{branch}/package.json", 'package.json'
17
18
  bump_version
18
19
  end
19
20
 
@@ -32,14 +33,15 @@ class SourceFile < Thor
32
33
  def cleanup
33
34
  self.destination_root = 'vendor/assets'
34
35
  remove_file 'stylesheets/chosen.css'
35
- remove_file 'VERSION'
36
+ remove_file 'package.json'
36
37
  end
37
38
 
38
39
  protected
39
40
 
40
41
  def bump_version
41
42
  inside destination_root do
42
- version = File.read('VERSION').sub("\n", '')
43
+ package_json = JSON.load(File.open('package.json'))
44
+ version = package_json['version']
43
45
  gsub_file '../../lib/chosen-rails/version.rb', /CHOSEN_VERSION\s=\s'(\d|\.)+'$/ do |match|
44
46
  %Q{CHOSEN_VERSION = '#{version}'}
45
47
  end
@@ -1,6 +1,6 @@
1
1
  module Chosen
2
2
  module Rails
3
- VERSION = '0.9.15'
4
- CHOSEN_VERSION = '0.9.15'
3
+ VERSION = '0.10.0'
4
+ CHOSEN_VERSION = '0.10.0'
5
5
  end
6
6
  end
@@ -1,7 +1,3 @@
1
- ###
2
- Chosen source: generate output using 'cake build'
3
- Copyright (c) 2011 by Harvest
4
- ###
5
1
  root = this
6
2
  $ = jQuery
7
3
 
@@ -142,7 +138,6 @@ class Chosen extends AbstractChosen
142
138
  this.results_hide()
143
139
 
144
140
  @container.removeClass "chzn-container-active"
145
- this.winnow_results_clear()
146
141
  this.clear_backstroke()
147
142
 
148
143
  this.show_search_field_default()
@@ -168,13 +163,15 @@ class Chosen extends AbstractChosen
168
163
 
169
164
  @results_data = root.SelectParser.select_to_array @form_field
170
165
 
171
- if @is_multiple and this.choices_count() > 0
166
+ if @is_multiple
172
167
  @search_choices.find("li.search-choice").remove()
173
168
  else if not @is_multiple
174
169
  @selected_item.addClass("chzn-default").find("span").text(@default_text)
175
170
  if @disable_search or @form_field.options.length <= @disable_search_threshold
171
+ @search_field[0].readOnly = true
176
172
  @container.addClass "chzn-container-single-nosearch"
177
173
  else
174
+ @search_field[0].readOnly = false
178
175
  @container.removeClass "chzn-container-single-nosearch"
179
176
 
180
177
  content = ''
@@ -196,13 +193,9 @@ class Chosen extends AbstractChosen
196
193
  @search_results.html content
197
194
  @parsing = false
198
195
 
199
-
200
196
  result_add_group: (group) ->
201
- if not group.disabled
202
- group.dom_id = @container_id + "_g_" + group.array_index
203
- '<li id="' + group.dom_id + '" class="group-result">' + $("<div />").text(group.label).html() + '</li>'
204
- else
205
- ""
197
+ group.dom_id = @container_id + "_g_" + group.array_index
198
+ '<li id="' + group.dom_id + '" class="group-result">' + $("<div />").text(group.label).html() + '</li>'
206
199
 
207
200
  result_do_highlight: (el) ->
208
201
  if el.length
@@ -228,9 +221,7 @@ class Chosen extends AbstractChosen
228
221
  @result_highlight = null
229
222
 
230
223
  results_show: ->
231
- if @result_single_selected?
232
- this.result_do_highlight @result_single_selected
233
- else if @is_multiple and @max_selected_options <= this.choices_count()
224
+ if @is_multiple and @max_selected_options <= this.choices_count()
234
225
  @form_field_jq.trigger("liszt:maxselected", {chosen: this})
235
226
  return false
236
227
 
@@ -245,10 +236,11 @@ class Chosen extends AbstractChosen
245
236
  this.winnow_results()
246
237
 
247
238
  results_hide: ->
248
- this.result_clear_highlight()
239
+ if @results_showing
240
+ this.result_clear_highlight()
249
241
 
250
- @container.removeClass "chzn-with-drop"
251
- @form_field_jq.trigger("liszt:hiding_dropdown", {chosen: this})
242
+ @container.removeClass "chzn-with-drop"
243
+ @form_field_jq.trigger("liszt:hiding_dropdown", {chosen: this})
252
244
 
253
245
  @results_showing = false
254
246
 
@@ -342,7 +334,7 @@ class Chosen extends AbstractChosen
342
334
  return false
343
335
 
344
336
  if @is_multiple
345
- this.result_deactivate high
337
+ high.removeClass("active-result")
346
338
  else
347
339
  @search_results.find(".result-selected").removeClass "result-selected"
348
340
  @result_single_selected = high
@@ -371,11 +363,16 @@ class Chosen extends AbstractChosen
371
363
  @current_selectedIndex = @form_field.selectedIndex
372
364
  this.search_field_scale()
373
365
 
374
- result_activate: (el) ->
375
- el.addClass("active-result")
366
+ result_activate: (el, option) ->
367
+ if option.disabled
368
+ el.addClass("disabled-result")
369
+ else if @is_multiple and option.selected
370
+ el.addClass("result-selected")
371
+ else
372
+ el.addClass("active-result")
376
373
 
377
374
  result_deactivate: (el) ->
378
- el.removeClass("active-result")
375
+ el.removeClass("active-result result-selected disabled-result")
379
376
 
380
377
  result_deselect: (pos) ->
381
378
  result_data = @results_data[pos]
@@ -400,7 +397,9 @@ class Chosen extends AbstractChosen
400
397
  return false
401
398
 
402
399
  single_deselect_control_build: ->
403
- @selected_item.find("span").first().after "<abbr class=\"search-choice-close\"></abbr>" if @allow_single_deselect and @selected_item.find("abbr").length < 1
400
+ return unless @allow_single_deselect
401
+ @selected_item.find("span").first().after "<abbr class=\"search-choice-close\"></abbr>" unless @selected_item.find("abbr").length
402
+ @selected_item.addClass("chzn-single-with-deselect")
404
403
 
405
404
  winnow_results: ->
406
405
  this.no_results_clear()
@@ -413,10 +412,10 @@ class Chosen extends AbstractChosen
413
412
  zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i')
414
413
 
415
414
  for option in @results_data
416
- if not option.disabled and not option.empty
415
+ if not option.empty
417
416
  if option.group
418
417
  $('#' + option.dom_id).css('display', 'none')
419
- else if not (@is_multiple and option.selected)
418
+ else
420
419
  found = false
421
420
  result_id = option.dom_id
422
421
  result = $("#" + result_id)
@@ -442,7 +441,7 @@ class Chosen extends AbstractChosen
442
441
  text = option.html
443
442
 
444
443
  result.html(text)
445
- this.result_activate result
444
+ this.result_activate result, option
446
445
 
447
446
  $("#" + @results_data[option.group_array_index].dom_id).css('display', 'list-item') if option.group_array_index?
448
447
  else
@@ -454,17 +453,6 @@ class Chosen extends AbstractChosen
454
453
  else
455
454
  this.winnow_results_set_highlight()
456
455
 
457
- winnow_results_clear: ->
458
- @search_field.val ""
459
- lis = @search_results.find("li")
460
-
461
- for li in lis
462
- li = $(li)
463
- if li.hasClass "group-result"
464
- li.css('display', 'auto')
465
- else if not @is_multiple or not li.hasClass "result-selected"
466
- this.result_activate li
467
-
468
456
  winnow_results_set_highlight: ->
469
457
  if not @result_highlight
470
458
 
@@ -483,13 +471,11 @@ class Chosen extends AbstractChosen
483
471
  @search_results.find(".no-results").remove()
484
472
 
485
473
  keydown_arrow: ->
486
- if not @result_highlight
487
- first_active = @search_results.find("li.active-result").first()
488
- this.result_do_highlight $(first_active) if first_active
489
- else if @results_showing
474
+ if @results_showing and @result_highlight
490
475
  next_sib = @result_highlight.nextAll("li.active-result").first()
491
476
  this.result_do_highlight next_sib if next_sib
492
- this.results_show() if not @results_showing
477
+ else
478
+ this.results_show()
493
479
 
494
480
  keyup_arrow: ->
495
481
  if not @results_showing and not @is_multiple
@@ -542,6 +528,7 @@ class Chosen extends AbstractChosen
542
528
  this.keyup_arrow()
543
529
  break
544
530
  when 40
531
+ evt.preventDefault()
545
532
  this.keydown_arrow()
546
533
  break
547
534
 
@@ -1,7 +1,3 @@
1
- ###
2
- Chosen source: generate output using 'cake build'
3
- Copyright (c) 2011 by Harvest
4
- ###
5
1
  root = this
6
2
 
7
3
  class Chosen extends AbstractChosen
@@ -131,7 +127,6 @@ class Chosen extends AbstractChosen
131
127
  this.results_hide()
132
128
 
133
129
  @container.removeClassName "chzn-container-active"
134
- this.winnow_results_clear()
135
130
  this.clear_backstroke()
136
131
 
137
132
  this.show_search_field_default()
@@ -156,13 +151,15 @@ class Chosen extends AbstractChosen
156
151
 
157
152
  @results_data = root.SelectParser.select_to_array @form_field
158
153
 
159
- if @is_multiple and this.choices_count() > 0
154
+ if @is_multiple
160
155
  @search_choices.select("li.search-choice").invoke("remove")
161
156
  else if not @is_multiple
162
157
  @selected_item.addClassName("chzn-default").down("span").update(@default_text)
163
158
  if @disable_search or @form_field.options.length <= @disable_search_threshold
159
+ @search_field.readOnly = true
164
160
  @container.addClassName "chzn-container-single-nosearch"
165
161
  else
162
+ @search_field.readOnly = false
166
163
  @container.removeClassName "chzn-container-single-nosearch"
167
164
 
168
165
  content = ''
@@ -184,13 +181,9 @@ class Chosen extends AbstractChosen
184
181
  @search_results.update content
185
182
  @parsing = false
186
183
 
187
-
188
184
  result_add_group: (group) ->
189
- if not group.disabled
190
- group.dom_id = @container_id + "_g_" + group.array_index
191
- '<li id="' + group.dom_id + '" class="group-result">' + group.label.escapeHTML() + '</li>'
192
- else
193
- ""
185
+ group.dom_id = @container_id + "_g_" + group.array_index
186
+ '<li id="' + group.dom_id + '" class="group-result">' + group.label.escapeHTML() + '</li>'
194
187
 
195
188
  result_do_highlight: (el) ->
196
189
  this.result_clear_highlight()
@@ -202,7 +195,7 @@ class Chosen extends AbstractChosen
202
195
  visible_top = @search_results.scrollTop
203
196
  visible_bottom = maxHeight + visible_top
204
197
 
205
- high_top = @result_highlight.positionedOffset().top + @search_results.scrollTop
198
+ high_top = @result_highlight.positionedOffset().top
206
199
  high_bottom = high_top + @result_highlight.getHeight()
207
200
 
208
201
  if high_bottom >= visible_bottom
@@ -215,9 +208,7 @@ class Chosen extends AbstractChosen
215
208
  @result_highlight = null
216
209
 
217
210
  results_show: ->
218
- if @result_single_selected?
219
- this.result_do_highlight @result_single_selected
220
- else if @is_multiple and @max_selected_options <= this.choices_count()
211
+ if @is_multiple and @max_selected_options <= this.choices_count()
221
212
  @form_field.fire("liszt:maxselected", {chosen: this})
222
213
  return false
223
214
 
@@ -232,10 +223,11 @@ class Chosen extends AbstractChosen
232
223
  this.winnow_results()
233
224
 
234
225
  results_hide: ->
235
- this.result_clear_highlight()
226
+ if @results_showing
227
+ this.result_clear_highlight()
236
228
 
237
- @container.removeClassName "chzn-with-drop"
238
- @form_field.fire("liszt:hiding_dropdown", {chosen: this})
229
+ @container.removeClassName "chzn-with-drop"
230
+ @form_field.fire("liszt:hiding_dropdown", {chosen: this})
239
231
 
240
232
  @results_showing = false
241
233
 
@@ -328,12 +320,12 @@ class Chosen extends AbstractChosen
328
320
  return false
329
321
 
330
322
  if @is_multiple
331
- this.result_deactivate high
323
+ high.removeClassName("active-result")
332
324
  else
333
325
  @search_results.descendants(".result-selected").invoke "removeClassName", "result-selected"
334
326
  @selected_item.removeClassName("chzn-default")
335
327
  @result_single_selected = high
336
-
328
+
337
329
  high.addClassName("result-selected")
338
330
 
339
331
  position = high.id.substr(high.id.lastIndexOf("_") + 1 )
@@ -358,11 +350,18 @@ class Chosen extends AbstractChosen
358
350
 
359
351
  this.search_field_scale()
360
352
 
361
- result_activate: (el) ->
362
- el.addClassName("active-result")
353
+ result_activate: (el, option) ->
354
+ if option.disabled
355
+ el.addClassName("disabled-result")
356
+ else if @is_multiple and option.selected
357
+ el.addClassName("result-selected")
358
+ else
359
+ el.addClassName("active-result")
363
360
 
364
361
  result_deactivate: (el) ->
365
362
  el.removeClassName("active-result")
363
+ el.removeClassName("result-selected")
364
+ el.removeClassName("disabled-result")
366
365
 
367
366
  result_deselect: (pos) ->
368
367
  result_data = @results_data[pos]
@@ -386,7 +385,9 @@ class Chosen extends AbstractChosen
386
385
  return false
387
386
 
388
387
  single_deselect_control_build: ->
389
- @selected_item.down("span").insert { after: "<abbr class=\"search-choice-close\"></abbr>" } if @allow_single_deselect and not @selected_item.down("abbr")
388
+ return unless @allow_single_deselect
389
+ @selected_item.down("span").insert { after: "<abbr class=\"search-choice-close\"></abbr>" } unless @selected_item.down("abbr")
390
+ @selected_item.addClassName("chzn-single-with-deselect")
390
391
 
391
392
  winnow_results: ->
392
393
  this.no_results_clear()
@@ -399,10 +400,10 @@ class Chosen extends AbstractChosen
399
400
  zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i')
400
401
 
401
402
  for option in @results_data
402
- if not option.disabled and not option.empty
403
+ if not option.empty
403
404
  if option.group
404
405
  $(option.dom_id).hide()
405
- else if not (@is_multiple and option.selected)
406
+ else
406
407
  found = false
407
408
  result_id = option.dom_id
408
409
 
@@ -428,7 +429,7 @@ class Chosen extends AbstractChosen
428
429
 
429
430
  $(result_id).update text if $(result_id).innerHTML != text
430
431
 
431
- this.result_activate $(result_id)
432
+ this.result_activate $(result_id), option
432
433
 
433
434
  $(@results_data[option.group_array_index].dom_id).setStyle({display: 'list-item'}) if option.group_array_index?
434
435
  else
@@ -440,16 +441,6 @@ class Chosen extends AbstractChosen
440
441
  else
441
442
  this.winnow_results_set_highlight()
442
443
 
443
- winnow_results_clear: ->
444
- @search_field.clear()
445
- lis = @search_results.select("li")
446
-
447
- for li in lis
448
- if li.hasClassName("group-result")
449
- li.show()
450
- else if not @is_multiple or not li.hasClassName("result-selected")
451
- this.result_activate li
452
-
453
444
  winnow_results_set_highlight: ->
454
445
  if not @result_highlight
455
446
 
@@ -470,15 +461,11 @@ class Chosen extends AbstractChosen
470
461
 
471
462
 
472
463
  keydown_arrow: ->
473
- actives = @search_results.select("li.active-result")
474
- if actives.length
475
- if not @result_highlight
476
- this.result_do_highlight actives.first()
477
- else if @results_showing
478
- sibs = @result_highlight.nextSiblings()
479
- nexts = sibs.intersect(actives)
480
- this.result_do_highlight nexts.first() if nexts.length
481
- this.results_show() if not @results_showing
464
+ if @results_showing and @result_highlight
465
+ next_sib = @result_highlight.next('.active-result')
466
+ this.result_do_highlight next_sib if next_sib
467
+ else
468
+ this.results_show()
482
469
 
483
470
  keyup_arrow: ->
484
471
  if not @results_showing and not @is_multiple
@@ -534,6 +521,7 @@ class Chosen extends AbstractChosen
534
521
  this.keyup_arrow()
535
522
  break
536
523
  when 40
524
+ evt.preventDefault()
537
525
  this.keydown_arrow()
538
526
  break
539
527
 
@@ -1,7 +1,3 @@
1
- ###
2
- Chosen source: generate output using 'cake build'
3
- Copyright (c) 2011 by Harvest
4
- ###
5
1
  root = this
6
2
 
7
3
  class AbstractChosen
@@ -61,19 +57,18 @@ class AbstractChosen
61
57
  setTimeout (=> this.blur_test()), 100
62
58
 
63
59
  result_add_option: (option) ->
64
- if not option.disabled
65
- option.dom_id = @container_id + "_o_" + option.array_index
60
+ option.dom_id = @container_id + "_o_" + option.array_index
66
61
 
67
- classes = if option.selected and @is_multiple then [] else ["active-result"]
68
- classes.push "result-selected" if option.selected
69
- classes.push "group-option" if option.group_array_index?
70
- classes.push option.classes if option.classes != ""
62
+ classes = []
63
+ classes.push "active-result" if !option.disabled and !(option.selected and @is_multiple)
64
+ classes.push "disabled-result" if option.disabled and !(option.selected and @is_multiple)
65
+ classes.push "result-selected" if option.selected
66
+ classes.push "group-option" if option.group_array_index?
67
+ classes.push option.classes if option.classes != ""
71
68
 
72
- style = if option.style.cssText != "" then " style=\"#{option.style}\"" else ""
69
+ style = if option.style.cssText != "" then " style=\"#{option.style}\"" else ""
73
70
 
74
- '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '"'+style+'>' + option.html + '</li>'
75
- else
76
- ""
71
+ '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '"'+style+'>' + option.html + '</li>'
77
72
 
78
73
  results_update_field: ->
79
74
  this.set_default_text()
@@ -105,7 +100,7 @@ class AbstractChosen
105
100
 
106
101
  choices_click: (evt) ->
107
102
  evt.preventDefault()
108
- this.results_show() unless @results_showing
103
+ this.results_show() unless @results_showing or @is_disabled
109
104
 
110
105
  keyup_checker: (evt) ->
111
106
  stroke = evt.which ? evt.keyCode
@@ -61,26 +61,27 @@
61
61
  text-decoration: none
62
62
  .chzn-default
63
63
  color: #999
64
- .chzn-single
65
- span
66
- margin-right: 26px
67
- display: block
68
- overflow: hidden
69
- white-space: nowrap
70
- -o-text-overflow: ellipsis
71
- -ms-text-overflow: ellipsis
72
- text-overflow: ellipsis
73
- abbr
74
- display: block
75
- position: absolute
76
- right: 26px
77
- top: 6px
78
- width: 12px
79
- height: 12px
80
- font-size: 1px
81
- background: image-url('chosen-sprite.png') -42px 1px no-repeat
82
- &:hover
83
- background-position: -42px -10px
64
+ .chzn-single span
65
+ margin-right: 26px
66
+ display: block
67
+ overflow: hidden
68
+ white-space: nowrap
69
+ -o-text-overflow: ellipsis
70
+ -ms-text-overflow: ellipsis
71
+ text-overflow: ellipsis
72
+ .chzn-single-with-deselect span
73
+ margin-right: 38px
74
+ .chzn-single abbr
75
+ display: block
76
+ position: absolute
77
+ right: 26px
78
+ top: 6px
79
+ width: 12px
80
+ height: 12px
81
+ font-size: 1px
82
+ background: image-url('chosen-sprite.png') -42px 1px no-repeat
83
+ &:hover
84
+ background-position: -42px -10px
84
85
  &.chzn-disabled .chzn-single abbr:hover
85
86
  background-position: -42px -10px
86
87
  .chzn-single div
@@ -259,6 +260,12 @@
259
260
  .active-result
260
261
  cursor: pointer
261
262
  display: list-item
263
+ .disabled-result
264
+ color: #ccc
265
+ cursor: default
266
+ display: list-item
267
+ em
268
+ background: transparent
262
269
  .highlighted
263
270
  background-color: #3875d7
264
271
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 )
@@ -284,7 +291,11 @@
284
291
  padding-left: 15px
285
292
 
286
293
  .chzn-container-multi .chzn-drop .result-selected
287
- display: none
294
+ color: #ccc
295
+ cursor: default
296
+ display: list-item
297
+ em
298
+ background: transparent
288
299
 
289
300
  .chzn-container
290
301
  .chzn-results-scroll
@@ -369,6 +380,9 @@
369
380
  margin-left: 26px
370
381
  margin-right: 0
371
382
  direction: rtl
383
+ .chzn-single-with-deselect span
384
+ margin-left: 38px
385
+ .chzn-single
372
386
  div
373
387
  left: 3px
374
388
  right: auto
@@ -386,11 +400,7 @@
386
400
  .search-choice-close
387
401
  left: 4px
388
402
  right: auto
389
- .chzn-search
390
- left: 9999px
391
- &.chzn-with-drop .chzn-search
392
- left: 0px
393
- .chzn-drop
403
+ .chzn-container-single-nosearch .chzn-search, .chzn-drop
394
404
  left: 9999px
395
405
  &.chzn-container-single .chzn-results
396
406
  margin: 0 0 4px 4px
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chosen-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.15
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tse-Ching Ho
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-04 00:00:00.000000000 Z
11
+ date: 2013-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties