Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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.
base fork: tsechingho/chosen-rails
base: master
...
head fork: TechnicalSAV/chosen-rails
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
  • 7 commits
  • 8 files changed
  • 0 commit comments
  • 2 contributors
View
1  .gitignore
@@ -15,3 +15,4 @@ spec/reports
test/tmp
test/version_tmp
tmp
+*.rvmrc
View
2  lib/chosen-rails/source_file.rb
@@ -6,7 +6,7 @@ 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"
+ remote = "https://github.com/joeylomanto/chosen-sass-bootstrap"
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"
View
4 lib/chosen-rails/version.rb
@@ -1,6 +1,6 @@
module Chosen
module Rails
- VERSION = "0.9.11.1"
- CHOSEN_VERSION = "0.9.11"
+ VERSION = "0.9.8"
+ CHOSEN_VERSION = "0.9.8"
end
end
View
BIN  vendor/assets/images/chosen-sprite.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
32 vendor/assets/javascripts/chosen.jquery.coffee
@@ -30,20 +30,13 @@ class Chosen extends AbstractChosen
@container_id = if @form_field.id.length then @form_field.id.replace(/[^\w]/g, '_') else this.generate_field_id()
@container_id += "_chzn"
- container_classes = ["chzn-container"]
- container_classes.push "chzn-container-" + (if @is_multiple then "multi" else "single")
- container_classes.push @form_field.className if @inherit_select_classes && @form_field.className
- container_classes.push "chzn-rtl" if @is_rtl
-
@f_width = @form_field_jq.outerWidth()
- container_props =
+ container_div = ($ "<div />", {
id: @container_id
- class: container_classes.join ' '
+ 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
- title: @form_field.title
-
- container_div = ($ "<div />", container_props)
+ })
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>'
@@ -52,6 +45,7 @@ class Chosen extends AbstractChosen
@form_field_jq.hide().after container_div
@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()
@@ -101,7 +95,7 @@ class Chosen extends AbstractChosen
@search_choices.click (evt) => this.choices_click(evt)
else
@container.click (evt) => evt.preventDefault() # gobble click of anchor
-
+
search_field_disabled: ->
@is_disabled = @form_field_jq[0].disabled
@@ -119,7 +113,7 @@ class Chosen extends AbstractChosen
if !@is_disabled
target_closelink = if evt? then ($ evt.target).hasClass "search-choice-close" else false
if evt and evt.type is "mousedown" and not @results_showing
- evt.preventDefault()
+ evt.stopPropagation()
if not @pending_destroy_click and not target_closelink
if not @active_field
@search_field.val "" if @is_multiple
@@ -322,8 +316,6 @@ class Chosen extends AbstractChosen
link.parents('li').first().remove()
- this.search_field_scale()
-
results_reset: ->
@form_field.options[0].selected = true
@selected_item.find("span").text @default_text
@@ -332,7 +324,7 @@ class Chosen extends AbstractChosen
this.results_reset_cleanup()
@form_field_jq.trigger "change"
this.results_hide() if @active_field
-
+
results_reset_cleanup: ->
@current_value = @form_field_jq.val()
@selected_item.find("abbr").remove()
@@ -365,7 +357,7 @@ class Chosen extends AbstractChosen
@selected_item.find("span").first().text item.text
this.single_deselect_control_build() if @allow_single_deselect
- this.results_hide() unless (evt.metaKey or evt.ctrlKey) and @is_multiple
+ this.results_hide() unless evt.metaKey and @is_multiple
@search_field.val ""
@@ -384,7 +376,7 @@ class Chosen extends AbstractChosen
if not @form_field.options[result_data.options_index].disabled
result_data.selected = false
-
+
@form_field.options[result_data.options_index].selected = false
result = $("#" + @container_id + "_o_" + pos)
result.removeClass("result-selected").addClass("active-result").show()
@@ -394,7 +386,7 @@ class Chosen extends AbstractChosen
@form_field_jq.trigger "change", {deselected: @form_field.options[result_data.options_index].value}
this.search_field_scale()
-
+
return true
else
return false
@@ -424,7 +416,7 @@ class Chosen extends AbstractChosen
if regex.test option.html
found = true
results += 1
- else if @enable_split_word_search and (option.html.indexOf(" ") >= 0 or option.html.indexOf("[") == 0)
+ else if option.html.indexOf(" ") >= 0 or option.html.indexOf("[") == 0
#TODO: replace this substitution of /\[\]/ with a list of characters to skip.
parts = option.html.replace(/\[|\]/g, "").split(" ")
if parts.length
@@ -577,8 +569,6 @@ class Chosen extends AbstractChosen
string += this.generate_random_char()
string
-root.Chosen = Chosen
-
get_side_border_padding = (elmt) ->
side_border_padding = elmt.outerWidth() - elmt.width()
View
71 vendor/assets/javascripts/chosen.proto.coffee
@@ -15,7 +15,7 @@ class Chosen extends AbstractChosen
set_default_values: ->
super()
-
+
# HTML Templates
@single_temp = new Template('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>#{default}</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>')
@multi_temp = new Template('<ul class="chzn-choices"><li class="search-field"><input type="text" value="#{default}" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>')
@@ -25,29 +25,24 @@ class Chosen extends AbstractChosen
set_up_html: ->
@container_id = @form_field.identify().replace(/[^\w]/g, '_') + "_chzn"
-
- container_classes = ["chzn-container"]
- container_classes.push "chzn-container-" + (if @is_multiple then "multi" else "single")
- container_classes.push @form_field.className if @inherit_select_classes && @form_field.className
- container_classes.push "chzn-rtl" if @is_rtl
-
+
@f_width = if @form_field.getStyle("width") then parseInt @form_field.getStyle("width"), 10 else @form_field.getWidth()
-
+
container_props =
'id': @container_id
- 'class': container_classes.join ' '
+ '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
- 'title': @form_field.title
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 })
@container = $(@container_id)
+ @container.addClassName( "chzn-container-" + (if @is_multiple then "multi" else "single") )
@dropdown = @container.down('div.chzn-drop')
-
+
dd_top = @container.getHeight()
dd_width = (@f_width - get_side_border_padding(@dropdown))
-
+
@dropdown.setStyle({"width": dd_width + "px", "top": dd_top + "px"})
@search_field = @container.down('input')
@@ -55,7 +50,7 @@ class Chosen extends AbstractChosen
this.search_field_scale()
@search_no_results = @container.down('li.no-results')
-
+
if @is_multiple
@search_choices = @container.down('ul.chzn-choices')
@search_container = @container.down('li.search-field')
@@ -64,7 +59,7 @@ class Chosen extends AbstractChosen
@selected_item = @container.down('.chzn-single')
sf_width = dd_width - get_side_border_padding(@search_container) - get_side_border_padding(@search_field)
@search_field.setStyle( {"width" : sf_width + "px"} )
-
+
this.results_build()
this.set_tab_index()
@form_field.fire("liszt:ready", {chosen: this})
@@ -74,11 +69,11 @@ class Chosen extends AbstractChosen
@container.observe "mouseup", (evt) => this.container_mouseup(evt)
@container.observe "mouseenter", (evt) => this.mouse_enter(evt)
@container.observe "mouseleave", (evt) => this.mouse_leave(evt)
-
+
@search_results.observe "mouseup", (evt) => this.search_results_mouseup(evt)
@search_results.observe "mouseover", (evt) => this.search_results_mouseover(evt)
@search_results.observe "mouseout", (evt) => this.search_results_mouseout(evt)
-
+
@form_field.observe "liszt:updated", (evt) => this.results_update_field(evt)
@form_field.observe "liszt:activate", (evt) => this.activate_field(evt)
@form_field.observe "liszt:open", (evt) => this.container_mousedown(evt)
@@ -121,7 +116,7 @@ class Chosen extends AbstractChosen
this.activate_field()
else
@pending_destroy_click = false
-
+
container_mouseup: (evt) ->
this.results_reset(evt) if evt.target.nodeName is "ABBR" and not @is_disabled
@@ -130,7 +125,7 @@ class Chosen extends AbstractChosen
close_field: ->
document.stopObserving "click", @click_test_action
-
+
@active_field = false
this.results_hide()
@@ -183,7 +178,7 @@ class Chosen extends AbstractChosen
this.search_field_disabled()
this.show_search_field_default()
this.search_field_scale()
-
+
@search_results.update content
@parsing = false
@@ -194,7 +189,7 @@ class Chosen extends AbstractChosen
'<li id="' + group.dom_id + '" class="group-result">' + group.label.escapeHTML() + '</li>'
else
""
-
+
result_do_highlight: (el) ->
this.result_clear_highlight()
@@ -212,7 +207,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.removeClassName('highlighted') if @result_highlight
@result_highlight = null
@@ -308,8 +303,6 @@ class Chosen extends AbstractChosen
link.up('li').remove()
- this.search_field_scale()
-
results_reset: ->
@form_field.options[0].selected = true
@selected_item.down("span").update(@default_text)
@@ -323,7 +316,7 @@ class Chosen extends AbstractChosen
@current_value = @form_field.value
deselect_trigger = @selected_item.down("abbr")
deselect_trigger.remove() if(deselect_trigger)
-
+
result_select: (evt) ->
if @result_highlight
high = @result_highlight
@@ -335,9 +328,9 @@ class Chosen extends AbstractChosen
@search_results.descendants(".result-selected").invoke "removeClassName", "result-selected"
@selected_item.removeClassName("chzn-default")
@result_single_selected = high
-
+
high.addClassName("result-selected")
-
+
position = high.id.substr(high.id.lastIndexOf("_") + 1 )
item = @results_data[position]
item.selected = true
@@ -350,13 +343,13 @@ class Chosen extends AbstractChosen
@selected_item.down("span").update(item.html)
this.single_deselect_control_build() if @allow_single_deselect
- this.results_hide() unless (evt.metaKey or evt.ctrlKey) and @is_multiple
+ 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
-
+
this.search_field_scale()
result_activate: (el) ->
@@ -367,7 +360,7 @@ class Chosen extends AbstractChosen
result_deselect: (pos) ->
result_data = @results_data[pos]
-
+
if not @form_field.options[result_data.options_index].disabled
result_data.selected = false
@@ -383,7 +376,7 @@ class Chosen extends AbstractChosen
return true
else
return false
-
+
single_deselect_control_build: ->
@selected_item.down("span").insert { after: "<abbr class=\"search-choice-close\"></abbr>" } if @allow_single_deselect and not @selected_item.down("abbr")
@@ -404,11 +397,11 @@ class Chosen extends AbstractChosen
else if not (@is_multiple and option.selected)
found = false
result_id = option.dom_id
-
+
if regex.test option.html
found = true
results += 1
- else if @enable_split_word_search and (option.html.indexOf(" ") >= 0 or option.html.indexOf("[") == 0)
+ else if option.html.indexOf(" ") >= 0 or option.html.indexOf("[") == 0
#TODO: replace this substitution of /\[\]/ with a list of characters to skip.
parts = option.html.replace(/\[|\]/g, "").split(" ")
if parts.length
@@ -459,10 +452,10 @@ class Chosen extends AbstractChosen
do_high = @search_results.down(".active-result")
this.result_do_highlight do_high if do_high?
-
+
no_results: (terms) ->
@search_results.insert @no_results_temp.evaluate( terms: terms )
-
+
no_results_clear: ->
nr = null
nr.remove() while nr = @search_results.down(".no-results")
@@ -516,7 +509,7 @@ class Chosen extends AbstractChosen
this.search_field_scale()
this.clear_backstroke() if stroke != 8 and this.pending_backstroke
-
+
switch stroke
when 8
@backstroke_length = this.search_field.value.length
@@ -543,10 +536,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.getStyle(style) + ";"
-
+
div = new Element('div', { 'style' : style_block }).update(@search_field.value.escapeHTML())
document.body.appendChild(div)
@@ -564,7 +557,7 @@ class Chosen extends AbstractChosen
root.Chosen = Chosen
# Prototype does not support version numbers so we add it ourselves
-if Prototype.Browser.IE
+if Prototype.Browser.IE
if /MSIE (\d+\.\d+);/.test(navigator.userAgent)
Prototype.BrowserFeatures['Version'] = new Number(RegExp.$1);
View
5 vendor/assets/javascripts/lib/abstract-chosen.coffee
@@ -7,9 +7,10 @@ root = this
class AbstractChosen
constructor: (@form_field, @options={}) ->
+ this.set_default_values()
+
@is_multiple = @form_field.multiple
this.set_default_text()
- this.set_default_values()
this.setup()
@@ -29,12 +30,10 @@ class AbstractChosen
@allow_single_deselect = if @options.allow_single_deselect? and @form_field.options[0]? and @form_field.options[0].text is "" then @options.allow_single_deselect else false
@disable_search_threshold = @options.disable_search_threshold || 0
@disable_search = @options.disable_search || false
- @enable_split_word_search = if @options.enable_split_word_search? then @options.enable_split_word_search else true
@search_contains = @options.search_contains || false
@choices = 0
@single_backstroke_delete = @options.single_backstroke_delete || false
@max_selected_options = @options.max_selected_options || Infinity
- @inherit_select_classes = @options.inherit_select_classes || false
set_default_text: ->
if @form_field.getAttribute("data-placeholder")
View
456 vendor/assets/stylesheets/chosen.css.sass
@@ -1,91 +1,96 @@
-/* @group Base
+/*
+ **
+ ** Chosen for Bootstrap and Sass
+ **
+ ** Converted and maintained by @joeylomanto (http://www.twitter.com/joeylomanto).
+ ** Big thanks to the people who built these tools:
+ ** Twitter Bootstrap: @mdo, @fat
+ ** Twitter Bootstrap Sass Conversion: @johnwlong
+ ** Havest: @harvest
+ **/
.chzn-container
- font-size: 13px
position: relative
display: inline-block
zoom: 1
*display: inline
.chzn-drop
+ -webkit-border-radius: 4px
+ -moz-border-radius: 4px
+ border-radius: 4px
+ -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
+ -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
+ box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
background: #fff
- border: 1px solid #aaaaaa
- border-top: 0
+ border: 1px solid #CCC
position: absolute
top: 29px
left: 0
- -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15)
- -moz-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
-
-/* @end
-
-/* @group Single Chosen
+ margin: 4px 0 0
.chzn-container-single
.chzn-single
- background-color: #ffffff
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 )
- background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, white), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4))
- background-image: -webkit-linear-gradient(top, white 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%)
- background-image: -moz-linear-gradient(top, white 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%)
- background-image: -o-linear-gradient(top, white 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%)
- background-image: linear-gradient(white 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%)
- -webkit-border-radius: 5px
- -moz-border-radius: 5px
- border-radius: 5px
- -moz-background-clip: padding
- -webkit-background-clip: padding-box
- background-clip: padding-box
- border: 1px solid #aaaaaa
+ -webkit-border-radius: 3px
+ -moz-border-radius: 3px
+ border-radius: 3px
-webkit-box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1)
-moz-box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1)
box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1)
+ -webkit-background-clip: padding-box
+ -moz-background-clip: padding-box
+ background-clip: padding-box
+ background-color: whitesmoke
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(white), color-stop(50%, #f6f6f6), to(#f4f4f4))
+ background-image: -webkit-linear-gradient(white, #f6f6f6 50%, #f4f4f4)
+ background-image: -moz-linear-gradient(top, white, #f6f6f6 50%, #f4f4f4)
+ background-image: -o-linear-gradient(white, #f6f6f6 50%, #f4f4f4)
+ background-image: linear-gradient(white, #f6f6f6 50%, #f4f4f4)
+ background-repeat: no-repeat
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFF4F4F4', GradientType=0)
+ -moz-background-clip: padding
+ background-color: #ffffff
+ border: 1px solid #CCC
display: block
overflow: hidden
white-space: nowrap
position: relative
- height: 23px
- line-height: 24px
+ height: 28px
+ line-height: 29px
padding: 0 0 0 8px
- color: #444444
+ color: #555555
text-decoration: none
- .chzn-default
- color: #999
- .chzn-single
span
+ overflow: hidden
+ text-overflow: ellipsis
+ white-space: nowrap
margin-right: 26px
display: block
overflow: hidden
white-space: nowrap
- -o-text-overflow: ellipsis
- -ms-text-overflow: ellipsis
- text-overflow: ellipsis
abbr
display: block
position: absolute
right: 26px
- top: 6px
+ top: 8px
width: 12px
- height: 12px
+ height: 13px
font-size: 1px
- background: image-url('chosen-sprite.png') -42px 1px no-repeat
+ background: image-url("chosen-sprite.png") right top no-repeat
&:hover
- background-position: -42px -10px
- &.chzn-disabled .chzn-single abbr:hover
- background-position: -42px -10px
- .chzn-single div
- position: absolute
- right: 0
- top: 0
- display: block
- height: 100%
- width: 18px
- b
- background: image-url('chosen-sprite.png') no-repeat 0px 2px
+ background-position: right -11px
+ 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 2px
+ display: block
+ width: 100%
+ height: 100%
.chzn-search
padding: 3px 4px
position: relative
@@ -93,49 +98,50 @@
white-space: nowrap
z-index: 1010
input
- background: white image-url('chosen-sprite.png') no-repeat 100% -20px
- background: image-url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, white))
- background: image-url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(top, #eeeeee 1%, white 15%)
- background: image-url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(top, #eeeeee 1%, white 15%)
- background: image-url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(top, #eeeeee 1%, white 15%)
- background: image-url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(#eeeeee 1%, white 15%)
margin: 1px 0
padding: 4px 20px 4px 5px
outline: 0
- border: 1px solid #aaaaaa
- font-family: sans-serif
- font-size: 1em
+ .chzn-default
+ color: #999
.chzn-drop
- -webkit-border-radius: 0 0 4px 4px
- -moz-border-radius: 0 0 4px 4px
- border-radius: 0 0 4px 4px
- -moz-background-clip: padding
+ -webkit-border-radius: 3px
+ -moz-border-radius: 3px
+ border-radius: 3px
-webkit-background-clip: padding-box
+ -moz-background-clip: padding-box
background-clip: padding-box
-
-/* @end
+ -moz-background-clip: padding
+ &.chzn-disabled .chzn-single abbr:hover
+ background-position: right top
.chzn-container-single-nosearch .chzn-search input
position: absolute
left: -9000px
-/* @group Multi Chosen
-
.chzn-container-multi .chzn-choices
- background-color: #fff
- background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, white))
- background-image: -webkit-linear-gradient(top, #eeeeee 1%, white 15%)
- background-image: -moz-linear-gradient(top, #eeeeee 1%, white 15%)
- background-image: -o-linear-gradient(top, #eeeeee 1%, white 15%)
- background-image: linear-gradient(#eeeeee 1%, white 15%)
- border: 1px solid #aaaaaa
- margin: 0
- padding: 0
+ -webkit-border-radius: 3px
+ -moz-border-radius: 3px
+ border-radius: 3px
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075)
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075)
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075)
+ -webkit-transition: border linear 0.2s, box-shadow linear 0.2s
+ -moz-transition: border linear 0.2s, box-shadow linear 0.2s
+ -o-transition: border linear 0.2s, box-shadow linear 0.2s
+ transition: border linear 0.2s, box-shadow linear 0.2s
+ background-color: white !important
+ border: 1px solid #cccccc
cursor: text
overflow: hidden
height: auto !important
height: 1%
position: relative
+ display: block
+ padding: 0
+ margin: 0
+ font-size: 14px
+ line-height: 20px
+ color: #555555
li
float: left
list-style: none
@@ -144,127 +150,117 @@
margin: 0
padding: 0
input
- color: #666
+ -webkit-box-shadow: none
+ -moz-box-shadow: none
+ box-shadow: none
+ color: #555555
background: transparent !important
border: 0 !important
font-family: sans-serif
font-size: 100%
height: 15px
padding: 5px
- margin: 1px 0
+ margin: 1px 0 2px
outline: 0
- -webkit-box-shadow: none
- -moz-box-shadow: none
- box-shadow: none
.default
color: #999
.search-choice
-webkit-border-radius: 3px
-moz-border-radius: 3px
border-radius: 3px
- -moz-background-clip: padding
- -webkit-background-clip: padding-box
- background-clip: padding-box
- background-color: #e4e4e4
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 )
- background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee))
- background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
- background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
- background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
- background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
-webkit-box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05)
-moz-box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05)
box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05)
- color: #333
- border: 1px solid #aaaaaa
+ background-color: whitesmoke
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(white), color-stop(50%, #f6f6f6), to(#f4f4f4))
+ background-image: -webkit-linear-gradient(white, #f6f6f6 50%, #f4f4f4)
+ background-image: -moz-linear-gradient(top, white, #f6f6f6 50%, #f4f4f4)
+ background-image: -o-linear-gradient(white, #f6f6f6 50%, #f4f4f4)
+ background-image: linear-gradient(white, #f6f6f6 50%, #f4f4f4)
+ background-repeat: no-repeat
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFF4F4F4', GradientType=0)
+ -webkit-background-clip: padding-box
+ -moz-background-clip: padding-box
+ background-clip: padding-box
+ -moz-background-clip: padding
+ color: #555555
+ border: 1px solid #999999
line-height: 13px
padding: 3px 20px 3px 5px
margin: 3px 0 3px 5px
position: relative
cursor: default
+ .search-choice-close
+ display: block
+ position: absolute
+ right: 3px
+ top: 4px
+ width: 12px
+ height: 13px
+ font-size: 1px
+ background: image-url("chosen-sprite.png") right top no-repeat
+ &:hover
+ background-position: right -11px
&.search-choice-disabled
- background-color: #e4e4e4
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 )
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee))
- background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
- background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
- background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
- background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
- background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%)
+ background-color: #eeeeee
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f4f4f4), color-stop(50%, #f0f0f0), to(#e8e8e8))
+ background-image: -webkit-linear-gradient(#f4f4f4, #f0f0f0 50%, #e8e8e8)
+ background-image: -moz-linear-gradient(top, #f4f4f4, #f0f0f0 50%, #e8e8e8)
+ background-image: -o-linear-gradient(#f4f4f4, #f0f0f0 50%, #e8e8e8)
+ background-image: linear-gradient(#f4f4f4, #f0f0f0 50%, #e8e8e8)
+ background-repeat: no-repeat
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF4F4F4', endColorstr='#FFE8E8E8', GradientType=0)
color: #666
border: 1px solid #cccccc
padding-right: 5px
.search-choice-focus
background: #d4d4d4
- .search-choice .search-choice-close
- display: block
- position: absolute
- right: 3px
- top: 4px
- width: 12px
- height: 12px
- font-size: 1px
- background: image-url('chosen-sprite.png') -42px 1px no-repeat
- &:hover
- background-position: -42px -10px
- .search-choice-focus .search-choice-close
- background-position: -42px -10px
-
-/* @end
-
-/* @group Results
-
-.chzn-container .chzn-results
- margin: 0 4px 4px 0
- max-height: 240px
- padding: 0 0 0 4px
- position: relative
- overflow-x: hidden
- overflow-y: auto
- -webkit-overflow-scrolling: touch
-
-.chzn-container-multi .chzn-results
- margin: -1px 0 0
- padding: 0
-
-.chzn-container .chzn-results
- li
- display: none
- line-height: 15px
- padding: 5px 6px
- margin: 0
- list-style: none
- .active-result
- cursor: pointer
- display: list-item
- .highlighted
- background-color: #3875d7
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 )
- background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc))
- background-image: -webkit-linear-gradient(top, #3875d7 20%, #2a62bc 90%)
- background-image: -moz-linear-gradient(top, #3875d7 20%, #2a62bc 90%)
- background-image: -o-linear-gradient(top, #3875d7 20%, #2a62bc 90%)
- background-image: linear-gradient(#3875d7 20%, #2a62bc 90%)
- color: #fff
- li em
- background: #feffde
- font-style: normal
- .highlighted em
- background: transparent
- .no-results
- background: #f4f4f4
- display: list-item
- .group-result
- cursor: default
- color: #999
- font-weight: bold
- .group-option
- padding-left: 15px
-
-.chzn-container-multi .chzn-drop .result-selected
- display: none
+ .search-choice-close
+ background-position: right -11px
.chzn-container
+ .chzn-results
+ margin: 0 4px 4px 0
+ max-height: 240px
+ padding: 0 0 0 4px
+ position: relative
+ overflow-x: hidden
+ overflow-y: auto
+ -webkit-overflow-scrolling: touch
+ li
+ display: none
+ line-height: 15px
+ padding: 5px 6px
+ margin: 0
+ list-style: none
+ em
+ background: #feffde
+ font-style: normal
+ .no-results
+ background: #f4f4f4
+ display: list-item
+ .group-result
+ cursor: default
+ color: #999
+ font-weight: bold
+ display: list-item
+ .group-option
+ padding-left: 15px
+ .active-result
+ cursor: pointer
+ display: list-item
+ .highlighted
+ background-color: #326dcc
+ background-image: -moz-linear-gradient(top, #3875d7, #2a62bc)
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#3875d7), to(#2a62bc))
+ background-image: -webkit-linear-gradient(top, #3875d7, #2a62bc)
+ background-image: -o-linear-gradient(top, #3875d7, #2a62bc)
+ background-image: linear-gradient(to bottom, #3875d7, #2a62bc)
+ background-repeat: repeat-x
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FF3875D7', endColorstr='#FF2A62BC', GradientType=0)
+ color: #fff
+ em
+ background: transparent
.chzn-results-scroll
background: white
margin: 0 4px
@@ -281,63 +277,50 @@
.chzn-results-scroll-down
bottom: 0
span
- background: image-url('chosen-sprite.png') no-repeat -4px -3px
+ background: image-url("chosen-sprite.png") no-repeat -4px -3px
.chzn-results-scroll-up span
- background: image-url('chosen-sprite.png') no-repeat -22px -3px
-
-/* @end
+ background: image-url("chosen-sprite.png") no-repeat -22px -3px
-/* @group Active
+.chzn-container-multi
+ .chzn-results
+ margin: 4px
+ padding: 0
+ .chzn-drop .result-selected
+ display: none
.chzn-container-active
.chzn-single
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
- -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
- border: 1px solid #5897fb
+ border: 1px solid #CCC
+ .chzn-drop
+ margin-top: -29px
.chzn-single-with-drop
- border: 1px solid #aaaaaa
- -webkit-box-shadow: 0 1px 0 white inset
- -moz-box-shadow: 0 1px 0 white inset
- box-shadow: 0 1px 0 white inset
- background-color: #eee
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 )
- background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #eeeeee), color-stop(80%, white))
- background-image: -webkit-linear-gradient(top, #eeeeee 20%, white 80%)
- background-image: -moz-linear-gradient(top, #eeeeee 20%, white 80%)
- background-image: -o-linear-gradient(top, #eeeeee 20%, white 80%)
- background-image: linear-gradient(#eeeeee 20%, white 80%)
- -webkit-border-bottom-left-radius: 0
- -webkit-border-bottom-right-radius: 0
- -moz-border-radius-bottomleft: 0
- -moz-border-radius-bottomright: 0
- border-bottom-left-radius: 0
- border-bottom-right-radius: 0
+ -webkit-box-shadow: none
+ -moz-box-shadow: none
+ box-shadow: none
+ border-color: #CCC
div
background: transparent
border-left: none
b
- background-position: -18px 2px
+ background-position: -18px 1px
.chzn-choices
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
- -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)
- border: 1px solid #5897fb
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6)
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6)
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6)
+ border: 1px solid rgba(82, 168, 236, 0.8)
+ outline: 0
+ outline: thin dotted \9
+ /* IE6-9
.search-field input
- color: #111111 !important
-
-/* @end
-
-/* @group Disabled Support
+ color: #111 !important
.chzn-disabled
+ opacity: 0.005
+ filter: alpha(opacity = 0.5)
cursor: default
- opacity: 0.5 !important
- .chzn-single, .chzn-choices .search-choice .search-choice-close
+ .chzn-single, .search-choice-close
cursor: default
-/* @group Right to Left
-
.chzn-rtl
text-align: right
.chzn-single
@@ -354,66 +337,25 @@
left: 26px
right: auto
.chzn-choices
- .search-field input
- direction: rtl
li
float: right
+ .search-field input
+ direction: rtl
.search-choice
padding: 3px 5px 3px 19px
margin: 3px 5px 3px 0
.search-choice-close
left: 4px
right: auto
- &.chzn-container-single .chzn-results
- margin: 0 0 4px 4px
- padding: 0 4px 0 0
+ background-position: right top
.chzn-results .group-option
padding-left: 0
padding-right: 15px
- &.chzn-container-active .chzn-single-with-drop div
- border-right: none
.chzn-search input
- background: white image-url('chosen-sprite.png') no-repeat -30px -20px
- background: image-url('chosen-sprite.png') no-repeat -30px -20px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, white))
- background: image-url('chosen-sprite.png') no-repeat -30px -20px, -webkit-linear-gradient(top, #eeeeee 1%, white 15%)
- background: image-url('chosen-sprite.png') no-repeat -30px -20px, -moz-linear-gradient(top, #eeeeee 1%, white 15%)
- background: image-url('chosen-sprite.png') no-repeat -30px -20px, -o-linear-gradient(top, #eeeeee 1%, white 15%)
- background: image-url('chosen-sprite.png') no-repeat -30px -20px, linear-gradient(#eeeeee 1%, white 15%)
padding: 4px 5px 4px 20px
direction: rtl
-
-.chzn-container-single.chzn-rtl
- .chzn-single div b
- background-position: 6px 2px
- .chzn-single-with-drop div b
- background-position: -12px 2px
-
-/* @end
-
-/* @group Retina compatibility
-@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi)
- .chzn-rtl .chzn-search input
- background-image: image-url('chosen-sprite@2x.png') !important
- background-repeat: no-repeat !important
- background-size: 52px 37px !important
- .chzn-container-single
- .chzn-single
- abbr, div b
- background-image: image-url('chosen-sprite@2x.png') !important
- background-repeat: no-repeat !important
- background-size: 52px 37px !important
- .chzn-search input
- background-image: image-url('chosen-sprite@2x.png') !important
- background-repeat: no-repeat !important
- background-size: 52px 37px !important
- .chzn-container-multi .chzn-choices .search-choice .search-choice-close
- background-image: image-url('chosen-sprite@2x.png') !important
- background-repeat: no-repeat !important
- background-size: 52px 37px !important
- .chzn-container
- .chzn-results-scroll-down span, .chzn-results-scroll-up span
- background-image: image-url('chosen-sprite@2x.png') !important
- background-repeat: no-repeat !important
- background-size: 52px 37px !important
-
-/* @end
+ &.chzn-container-single .chzn-results
+ margin: 0 0 4px 4px
+ padding: 0 4px 0 0
+ &.chzn-container-active .chzn-single-with-drop div
+ border-right: none

No commit comments for this range

Something went wrong with that request. Please try again.