Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
16 lib/chosen-rails/source_file.rb
@@ -6,14 +6,14 @@ class SourceFile < Thor
desc "fetch source files", "fetch source files from GitHub"
def fetch
self.destination_root = "vendor/assets"
- remote = "https://github.com/harvesthq/chosen"
- get "#{remote}/raw/master/chosen/chosen-sprite.png", "images/chosen-sprite.png"
- get "#{remote}/raw/master/chosen/chosen.css", "stylesheets/chosen.css"
- get "#{remote}/raw/master/coffee/lib/abstract-chosen.coffee", "javascripts/lib/abstract-chosen.coffee"
- get "#{remote}/raw/master/coffee/lib/select-parser.coffee", "javascripts/lib/select-parser.coffee"
- get "#{remote}/raw/master/coffee/chosen.jquery.coffee", "javascripts/chosen.jquery.coffee"
- get "#{remote}/raw/master/coffee/chosen.proto.coffee", "javascripts/chosen.proto.coffee"
- get "#{remote}/raw/master/VERSION", "VERSION"
+ remote = "https://github.com/rtlong/chosen"
+ get "#{remote}/raw/include-group-labels/chosen/chosen-sprite.png", "images/chosen-sprite.png"
+ get "#{remote}/raw/include-group-labels/chosen/chosen.css", "stylesheets/chosen.css"
+ get "#{remote}/raw/include-group-labels/coffee/lib/abstract-chosen.coffee", "javascripts/lib/abstract-chosen.coffee"
+ get "#{remote}/raw/include-group-labels/coffee/lib/select-parser.coffee", "javascripts/lib/select-parser.coffee"
+ get "#{remote}/raw/include-group-labels/coffee/chosen.jquery.coffee", "javascripts/chosen.jquery.coffee"
+ get "#{remote}/raw/include-group-labels/coffee/chosen.proto.coffee", "javascripts/chosen.proto.coffee"
+ get "#{remote}/raw/include-group-labels/VERSION", "VERSION"
inside destination_root do
version = File.read("VERSION").sub("\n", "")
gsub_file "../../lib/chosen-rails/version.rb", /VERSION\s=\s"(\d|\.)+"$/ do |match|
View
2 lib/chosen-rails/version.rb
@@ -1,6 +1,6 @@
module Chosen
module Rails
- VERSION = "0.9.8.1"
+ VERSION = "0.9.8"
EDITOR_VERSION = "0.9.8"
end
end
View
113 vendor/assets/javascripts/chosen.jquery.coffee
@@ -9,9 +9,8 @@ $.fn.extend({
chosen: (options) ->
# Do no harm and return as soon as possible for unsupported browsers, namely IE6 and IE7
return this if $.browser.msie and ($.browser.version is "6.0" or $.browser.version is "7.0")
- this.each((input_field) ->
- $this = $ this
- $this.data('chosen', new Chosen(this, options)) unless $this.hasClass "chzn-done"
+ $(this).each((input_field) ->
+ new Chosen(this, options) unless ($ this).hasClass "chzn-done"
)
})
@@ -19,7 +18,6 @@ class Chosen extends AbstractChosen
setup: ->
@form_field_jq = $ @form_field
- @current_value = @form_field_jq.val()
@is_rtl = @form_field_jq.hasClass "chzn-rtl"
finish_setup: ->
@@ -28,15 +26,17 @@ class Chosen extends AbstractChosen
set_up_html: ->
@container_id = if @form_field.id.length then @form_field.id.replace(/[^\w]/g, '_') else this.generate_field_id()
@container_id += "_chzn"
-
+
@f_width = @form_field_jq.outerWidth()
-
+
+ @default_text = if @form_field_jq.data 'placeholder' then @form_field_jq.data 'placeholder' else @default_text_default
+
container_div = ($ "<div />", {
id: @container_id
class: "chzn-container#{ if @is_rtl then ' chzn-rtl' else '' }"
style: 'width: ' + (@f_width) + 'px;' #use parens around @f_width so coffeescript doesn't think + ' px' is a function parameter
})
-
+
if @is_multiple
container_div.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>'
else
@@ -46,10 +46,10 @@ class Chosen extends AbstractChosen
@container = ($ '#' + @container_id)
@container.addClass( "chzn-container-" + (if @is_multiple then "multi" else "single") )
@dropdown = @container.find('div.chzn-drop').first()
-
+
dd_top = @container.height()
dd_width = (@f_width - get_side_border_padding(@dropdown))
-
+
@dropdown.css({"width": dd_width + "px", "top": dd_top + "px"})
@search_field = @container.find('input').first()
@@ -57,7 +57,7 @@ class Chosen extends AbstractChosen
this.search_field_scale()
@search_no_results = @container.find('li.no-results').first()
-
+
if @is_multiple
@search_choices = @container.find('ul.chzn-choices').first()
@search_container = @container.find('li.search-field').first()
@@ -66,7 +66,7 @@ class Chosen extends AbstractChosen
@selected_item = @container.find('.chzn-single').first()
sf_width = dd_width - get_side_border_padding(@search_container) - get_side_border_padding(@search_field)
@search_field.css( {"width" : sf_width + "px"} )
-
+
this.results_build()
this.set_tab_index()
@form_field_jq.trigger("liszt:ready", {chosen: this})
@@ -76,7 +76,7 @@ class Chosen extends AbstractChosen
@container.mouseup (evt) => this.container_mouseup(evt)
@container.mouseenter (evt) => this.mouse_enter(evt)
@container.mouseleave (evt) => this.mouse_leave(evt)
-
+
@search_results.mouseup (evt) => this.search_results_mouseup(evt)
@search_results.mouseover (evt) => this.search_results_mouseover(evt)
@search_results.mouseout (evt) => this.search_results_mouseout(evt)
@@ -124,18 +124,18 @@ class Chosen extends AbstractChosen
@pending_destroy_click = false
container_mouseup: (evt) ->
- this.results_reset(evt) if evt.target.nodeName is "ABBR" and not @is_disabled
+ this.results_reset(evt) if evt.target.nodeName is "ABBR"
blur_test: (evt) ->
this.close_field() if not @active_field and @container.hasClass "chzn-container-active"
close_field: ->
$(document).unbind "click", @click_test_action
-
+
if not @is_multiple
@selected_item.attr "tabindex", @search_field.attr("tabindex")
@search_field.attr "tabindex", -1
-
+
@active_field = false
this.results_hide()
@@ -163,7 +163,7 @@ class Chosen extends AbstractChosen
@active_field = true
else
this.close_field()
-
+
results_build: ->
@parsing = true
@results_data = root.SelectParser.select_to_array @form_field
@@ -172,7 +172,7 @@ class Chosen extends AbstractChosen
@search_choices.find("li.search-choice").remove()
@choices = 0
else if not @is_multiple
- @selected_item.addClass("chzn-default").find("span").text(@default_text)
+ @selected_item.find("span").text @default_text
if @form_field.options.length <= @disable_search_threshold
@container.addClass "chzn-container-single-nosearch"
else
@@ -187,13 +187,13 @@ class Chosen extends AbstractChosen
if data.selected and @is_multiple
this.choice_build data
else if data.selected and not @is_multiple
- @selected_item.removeClass("chzn-default").find("span").text data.text
+ @selected_item.removeClass("chzn-default").find("span").html this.choice_label(data)
this.single_deselect_control_build() if @allow_single_deselect
this.search_field_disabled()
this.show_search_field_default()
this.search_field_scale()
-
+
@search_results.html content
@parsing = false
@@ -204,7 +204,7 @@ class Chosen extends AbstractChosen
'<li id="' + group.dom_id + '" class="group-result">' + $("<div />").text(group.label).html() + '</li>'
else
""
-
+
result_do_highlight: (el) ->
if el.length
this.result_clear_highlight()
@@ -215,7 +215,7 @@ class Chosen extends AbstractChosen
maxHeight = parseInt @search_results.css("maxHeight"), 10
visible_top = @search_results.scrollTop()
visible_bottom = maxHeight + visible_top
-
+
high_top = @result_highlight.position().top + @search_results.scrollTop()
high_bottom = high_top + @result_highlight.outerHeight()
@@ -223,7 +223,7 @@ class Chosen extends AbstractChosen
@search_results.scrollTop if (high_bottom - maxHeight) > 0 then (high_bottom - maxHeight) else 0
else if high_top < visible_top
@search_results.scrollTop high_top
-
+
result_clear_highlight: ->
@result_highlight.removeClass "highlighted" if @result_highlight
@result_highlight = null
@@ -233,12 +233,8 @@ class Chosen extends AbstractChosen
@selected_item.addClass "chzn-single-with-drop"
if @result_single_selected
this.result_do_highlight( @result_single_selected )
- else if @max_selected_options <= @choices
- @form_field_jq.trigger("liszt:maxselected", {chosen: this})
- return false
dd_top = if @is_multiple then @container.height() else (@container.height() - 1)
- @form_field_jq.trigger("liszt:showing_dropdown", {chosen: this})
@dropdown.css {"top": dd_top + "px", "left":0}
@results_showing = true
@@ -250,7 +246,6 @@ class Chosen extends AbstractChosen
results_hide: ->
@selected_item.removeClass "chzn-single-with-drop" unless @is_multiple
this.result_clear_highlight()
- @form_field_jq.trigger("liszt:hiding_dropdown", {chosen: this})
@dropdown.css {"left":"-9000px"}
@results_showing = false
@@ -294,15 +289,18 @@ class Chosen extends AbstractChosen
this.results_show()
choice_build: (item) ->
- if @is_multiple and @max_selected_options <= @choices
- @form_field_jq.trigger("liszt:maxselected", {chosen: this})
- return false # fire event
choice_id = @container_id + "_c_" + item.array_index
@choices += 1
- @search_container.before '<li class="search-choice" id="' + choice_id + '"><span>' + item.html + '</span><a href="javascript:void(0)" class="search-choice-close" rel="' + item.array_index + '"></a></li>'
+ @search_container.before '<li class="search-choice" id="' + choice_id + '"><span>' + this.choice_label(item) + '</span><a href="javascript:void(0)" class="search-choice-close" rel="' + item.array_index + '"></a></li>'
link = $('#' + choice_id).find("a").first()
link.click (evt) => this.choice_destroy_link_click(evt)
+ choice_label: (item) ->
+ if @include_group_label_in_selected
+ group_label = if item.group_label? then "<b class='group-name'>#{item.group_label}</b>" else ''
+ group_label + item.html
+ else
+ item.html
choice_destroy_link_click: (evt) ->
evt.preventDefault()
if not @is_disabled
@@ -320,23 +318,20 @@ class Chosen extends AbstractChosen
this.result_deselect (link.attr "rel")
link.parents('li').first().remove()
- results_reset: ->
+ results_reset: (evt) ->
@form_field.options[0].selected = true
@selected_item.find("span").text @default_text
@selected_item.addClass("chzn-default") if not @is_multiple
this.show_search_field_default()
- this.results_reset_cleanup()
+ $(evt.target).remove();
@form_field_jq.trigger "change"
this.results_hide() if @active_field
-
- results_reset_cleanup: ->
- @selected_item.find("abbr").remove()
result_select: (evt) ->
if @result_highlight
high = @result_highlight
high_id = high.attr "id"
-
+
this.result_clear_highlight()
if @is_multiple
@@ -345,9 +340,9 @@ class Chosen extends AbstractChosen
@search_results.find(".result-selected").removeClass "result-selected"
@result_single_selected = high
@selected_item.removeClass("chzn-default")
-
+
high.addClass "result-selected"
-
+
position = high_id.substr(high_id.lastIndexOf("_") + 1 )
item = @results_data[position]
item.selected = true
@@ -357,15 +352,14 @@ class Chosen extends AbstractChosen
if @is_multiple
this.choice_build item
else
- @selected_item.find("span").first().text item.text
+ @selected_item.find("span").first().html this.choice_label(item)
this.single_deselect_control_build() if @allow_single_deselect
-
+
this.results_hide() unless evt.metaKey and @is_multiple
@search_field.val ""
- @form_field_jq.trigger "change", {'selected': @form_field.options[item.options_index].value} if @is_multiple || @form_field_jq.val() != @current_value
- @current_value = @form_field_jq.val()
+ @form_field_jq.trigger "change"
this.search_field_scale()
result_activate: (el) ->
@@ -385,7 +379,7 @@ class Chosen extends AbstractChosen
this.result_clear_highlight()
this.winnow_results()
- @form_field_jq.trigger "change", {deselected: @form_field.options[result_data.options_index].value}
+ @form_field_jq.trigger "change"
this.search_field_scale()
single_deselect_control_build: ->
@@ -393,7 +387,7 @@ class Chosen extends AbstractChosen
winnow_results: ->
this.no_results_clear()
-
+
results = 0
searchText = if @search_field.val() is @default_text then "" else $('<div/>').text($.trim(@search_field.val())).html()
@@ -409,7 +403,7 @@ class Chosen extends AbstractChosen
found = false
result_id = option.dom_id
result = $("#" + result_id)
-
+
if regex.test option.html
found = true
results += 1
@@ -429,7 +423,7 @@ class Chosen extends AbstractChosen
text = text.substr(0, startpos) + '<em>' + text.substr(startpos)
else
text = option.html
-
+
result.html(text)
this.result_activate result
@@ -461,13 +455,13 @@ class Chosen extends AbstractChosen
do_high = if selected_results.length then selected_results.first() else @search_results.find(".active-result").first()
this.result_do_highlight do_high if do_high?
-
+
no_results: (terms) ->
no_results_html = $('<li class="no-results">' + @results_none_found + ' "<span></span>"</li>')
no_results_html.find("span").first().html(terms)
@search_results.append no_results_html
-
+
no_results_clear: ->
@search_results.find(".no-results").remove()
@@ -485,7 +479,7 @@ class Chosen extends AbstractChosen
this.results_show()
else if @result_highlight
prev_sibs = @result_highlight.prevAll("li.active-result")
-
+
if prev_sibs.length
this.result_do_highlight prev_sibs.first()
else
@@ -498,10 +492,7 @@ class Chosen extends AbstractChosen
this.clear_backstroke()
else
@pending_backstroke = @search_container.siblings("li.search-choice").last()
- if @single_backstroke_delete
- @keydown_backstroke()
- else
- @pending_backstroke.addClass "search-choice-focus"
+ @pending_backstroke.addClass "search-choice-focus"
clear_backstroke: ->
@pending_backstroke.removeClass "search-choice-focus" if @pending_backstroke
@@ -510,9 +501,9 @@ class Chosen extends AbstractChosen
keydown_checker: (evt) ->
stroke = evt.which ? evt.keyCode
this.search_field_scale()
-
+
this.clear_backstroke() if stroke != 8 and this.pending_backstroke
-
+
switch stroke
when 8
@backstroke_length = this.search_field.val().length
@@ -531,7 +522,7 @@ class Chosen extends AbstractChosen
when 40
this.keydown_arrow()
break
-
+
search_field_scale: ->
if @is_multiple
h = 0
@@ -539,10 +530,10 @@ class Chosen extends AbstractChosen
style_block = "position:absolute; left: -1000px; top: -1000px; display:none;"
styles = ['font-size','font-style', 'font-weight', 'font-family','line-height', 'text-transform', 'letter-spacing']
-
+
for style in styles
style_block += style + ":" + @search_field.css(style) + ";"
-
+
div = $('<div />', { 'style' : style_block })
div.text @search_field.val()
$('body').append div
@@ -557,13 +548,13 @@ class Chosen extends AbstractChosen
dd_top = @container.height()
@dropdown.css({"top": dd_top + "px"})
-
+
generate_random_id: ->
string = "sel" + this.generate_random_char() + this.generate_random_char() + this.generate_random_char()
while $("#" + string).length > 0
string += this.generate_random_char()
string
-
+
get_side_border_padding = (elmt) ->
side_border_padding = elmt.outerWidth() - elmt.width()
View
47 vendor/assets/javascripts/chosen.proto.coffee
@@ -7,7 +7,6 @@ root = this
class Chosen extends AbstractChosen
setup: ->
- @current_value = @form_field.value
@is_rtl = @form_field.hasClassName "chzn-rtl"
finish_setup: ->
@@ -32,6 +31,8 @@ class Chosen extends AbstractChosen
'class': "chzn-container#{ if @is_rtl then ' chzn-rtl' else '' }"
'style': 'width: ' + (@f_width) + 'px' #use parens around @f_width so coffeescript doesn't think + ' px' is a function parameter
+ @default_text = if @form_field.readAttribute 'data-placeholder' then @form_field.readAttribute 'data-placeholder' else @default_text_default
+
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 }) )
@form_field.hide().insert({ after: base_template })
@@ -115,7 +116,7 @@ class Chosen extends AbstractChosen
@pending_destroy_click = false
container_mouseup: (evt) ->
- this.results_reset(evt) if evt.target.nodeName is "ABBR" and not @is_disabled
+ this.results_reset(evt) if evt.target.nodeName is "ABBR"
blur_test: (evt) ->
this.close_field() if not @active_field and @container.hasClassName("chzn-container-active")
@@ -163,7 +164,7 @@ class Chosen extends AbstractChosen
@search_choices.select("li.search-choice").invoke("remove")
@choices = 0
else if not @is_multiple
- @selected_item.addClassName("chzn-default").down("span").update(@default_text)
+ @selected_item.down("span").update(@default_text)
if @form_field.options.length <= @disable_search_threshold
@container.addClassName "chzn-container-single-nosearch"
else
@@ -178,7 +179,7 @@ class Chosen extends AbstractChosen
if data.selected and @is_multiple
this.choice_build data
else if data.selected and not @is_multiple
- @selected_item.removeClassName("chzn-default").down("span").update( data.html )
+ @selected_item.removeClassName("chzn-default").down("span").update this.choice_label(data)
this.single_deselect_control_build() if @allow_single_deselect
this.search_field_disabled()
@@ -223,12 +224,8 @@ class Chosen extends AbstractChosen
@selected_item.addClassName('chzn-single-with-drop')
if @result_single_selected
this.result_do_highlight( @result_single_selected )
- else if @max_selected_options <= @choices
- @form_field.fire("liszt:maxselected", {chosen: this})
- return false
dd_top = if @is_multiple then @container.getHeight() else (@container.getHeight() - 1)
- @form_field.fire("liszt:showing_dropdown", {chosen: this})
@dropdown.setStyle {"top": dd_top + "px", "left":0}
@results_showing = true
@@ -240,7 +237,6 @@ class Chosen extends AbstractChosen
results_hide: ->
@selected_item.removeClassName('chzn-single-with-drop') unless @is_multiple
this.result_clear_highlight()
- @form_field.fire("liszt:hiding_dropdown", {chosen: this})
@dropdown.setStyle({"left":"-9000px"})
@results_showing = false
@@ -284,19 +280,23 @@ class Chosen extends AbstractChosen
this.results_show()
choice_build: (item) ->
- if @is_multiple and @max_selected_options <= @choices
- @form_field.fire("liszt:maxselected", {chosen: this})
- return false
choice_id = @container_id + "_c_" + item.array_index
@choices += 1
@search_container.insert
before: @choice_temp.evaluate
id: choice_id
- choice: item.html
+ choice: this.choice_label(item)
position: item.array_index
link = $(choice_id).down('a')
link.observe "click", (evt) => this.choice_destroy_link_click(evt)
+ choice_label: (item) ->
+ if @include_group_label_in_selected
+ group_label = if item.group_label? then "<b class='group-name'>#{item.group_label}</b>" else ''
+ group_label + item.html
+ else
+ item.html
+
choice_destroy_link_click: (evt) ->
evt.preventDefault()
if not @is_disabled
@@ -312,18 +312,14 @@ class Chosen extends AbstractChosen
this.result_deselect link.readAttribute("rel")
link.up('li').remove()
- results_reset: ->
+ results_reset: (evt) ->
@form_field.options[0].selected = true
@selected_item.down("span").update(@default_text)
@selected_item.addClassName("chzn-default") if not @is_multiple
this.show_search_field_default()
- this.results_reset_cleanup()
+ evt.target.remove()
@form_field.simulate("change") if typeof Event.simulate is 'function'
this.results_hide() if @active_field
-
- results_reset_cleanup: ->
- deselect_trigger = @selected_item.down("abbr")
- deselect_trigger.remove() if(deselect_trigger)
result_select: (evt) ->
if @result_highlight
@@ -348,16 +344,14 @@ class Chosen extends AbstractChosen
if @is_multiple
this.choice_build item
else
- @selected_item.down("span").update(item.html)
+ @selected_item.down("span").update this.choice_label(item)
this.single_deselect_control_build() if @allow_single_deselect
this.results_hide() unless evt.metaKey and @is_multiple
@search_field.value = ""
-
- @form_field.simulate("change") if typeof Event.simulate is 'function' && (@is_multiple || @form_field.value != @current_value)
- @current_value = @form_field.value
-
+
+ @form_field.simulate("change") if typeof Event.simulate is 'function'
this.search_field_scale()
result_activate: (el) ->
@@ -495,10 +489,7 @@ class Chosen extends AbstractChosen
this.clear_backstroke()
else
@pending_backstroke = @search_container.siblings("li.search-choice").last()
- if @single_backstroke_delete
- @keydown_backstroke()
- else
- @pending_backstroke.addClassName("search-choice-focus")
+ @pending_backstroke.addClassName("search-choice-focus")
clear_backstroke: ->
@pending_backstroke.removeClassName("search-choice-focus") if @pending_backstroke
View
17 vendor/assets/javascripts/lib/abstract-chosen.coffee
@@ -10,7 +10,7 @@ class AbstractChosen
this.set_default_values()
@is_multiple = @form_field.multiple
- this.set_default_text()
+ @default_text_default = if @is_multiple then "Select Some Options" else "Select an Option"
this.setup()
@@ -31,18 +31,8 @@ class AbstractChosen
@disable_search_threshold = @options.disable_search_threshold || 0
@search_contains = @options.search_contains || false
@choices = 0
- @single_backstroke_delete = @options.single_backstroke_delete || false
- @max_selected_options = @options.max_selected_options || Infinity
-
- set_default_text: ->
- if @form_field.getAttribute("data-placeholder")
- @default_text = @form_field.getAttribute("data-placeholder")
- else if @is_multiple
- @default_text = @options.placeholder_text_multiple || @options.placeholder_text || "Select Some Options"
- else
- @default_text = @options.placeholder_text_single || @options.placeholder_text || "Select an Option"
-
- @results_none_found = @form_field.getAttribute("data-no_results_text") || @options.no_results_text || "No results match"
+ @results_none_found = @options.no_results_text or "No results match"
+ @include_group_label_in_selected = @options.include_group_label_in_selected || false
mouse_enter: -> @mouse_on_container = true
mouse_leave: -> @mouse_on_container = false
@@ -71,7 +61,6 @@ class AbstractChosen
""
results_update_field: ->
- this.results_reset_cleanup() if not @is_multiple
this.result_clear_highlight()
@result_single_selected = null
this.results_build()
View
1 vendor/assets/javascripts/lib/select-parser.coffee
@@ -34,6 +34,7 @@ class SelectParser
selected: option.selected
disabled: if group_disabled is true then group_disabled else option.disabled
group_array_index: group_position
+ group_label: if group_position? then @parsed[group_position].label else null
classes: option.className
style: option.style.cssText
else
View
50 vendor/assets/stylesheets/chosen.css.sass
@@ -17,7 +17,7 @@
-moz-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
-o-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
- z-index: 1010
+ z-index: 999
/* @end
@@ -63,6 +63,21 @@
-o-text-overflow: ellipsis
-ms-text-overflow: ellipsis
text-overflow: ellipsis
+ b
+ margin-right: 4px
+ overflow: hidden
+ white-space: nowrap
+ -o-text-overflow: ellipsis
+ -ms-text-overflow: ellipsis
+ text-overflow: ellipsis
+ font-weight: normal
+ color: #999999
+ &:after
+ color: #C2BCBC
+ content: "\25B6"
+ font-size: 80%
+ padding-left: 4px
+ vertical-align: top
abbr
display: block
position: absolute
@@ -74,20 +89,18 @@
background: image-url('chosen-sprite.png') right top no-repeat
&:hover
background-position: right -11px
- &.chzn-disabled abbr:hover
- background-position: right top
- .chzn-single div
- position: absolute
- right: 0
- top: 0
- display: block
- height: 100%
- width: 18px
- b
- background: image-url('chosen-sprite.png') no-repeat 0 0
+ div
+ position: absolute
+ right: 0
+ top: 0
display: block
- width: 100%
height: 100%
+ width: 18px
+ b
+ background: image-url('chosen-sprite.png') no-repeat 0 0
+ display: block
+ width: 100%
+ height: 100%
.chzn-search
padding: 3px 4px
position: relative
@@ -188,6 +201,16 @@
margin: 3px 0 3px 5px
position: relative
cursor: default
+ span b
+ margin-right: 4px
+ overflow: hidden
+ white-space: nowrap
+ font-weight: normal
+ color: #999999
+ &:after
+ content: ":"
+ padding-left: 2px
+ vertical-align: top
.search-choice-focus
background: #d4d4d4
.search-choice .search-choice-close
@@ -215,7 +238,6 @@
position: relative
overflow-x: hidden
overflow-y: auto
- -webkit-overflow-scrolling: touch
.chzn-container-multi .chzn-results
margin: -1px 0 0

No commit comments for this range

Something went wrong with that request. Please try again.