diff --git a/coffee/chosen.jquery.coffee b/coffee/chosen.jquery.coffee
index d6df651..0d6596a 100644
--- a/coffee/chosen.jquery.coffee
+++ b/coffee/chosen.jquery.coffee
@@ -12,7 +12,7 @@ $ = jQuery
$.fn.extend({
chosen: (data, options) ->
- $(this).each((input_field) ->
+ $(this).each((input_field) ->
new Chosen(this, data, options) unless ($ this).hasClass "chzn-done"
)
})
@@ -58,7 +58,7 @@ class Chosen
if @is_multiple
container_div.html '
'
else
- container_div.html '' + @default_text + '
';
+ container_div.html '' + @default_text + '
'
@form_field_jq.hide().after container_div
@container = ($ '#' + @container_id)
@@ -212,7 +212,7 @@ class Chosen
""
result_add_option: (option) ->
- if not option.disabled
+ if not option.disabled
option.dom_id = @form_field.id + "chzn_o_" + option.array_index
classes = if option.selected and @is_multiple then [] else ["active-result"]
@@ -230,9 +230,9 @@ class Chosen
result_do_highlight: (el) ->
if el.length
- this.result_clear_highlight();
+ this.result_clear_highlight()
- @result_highlight = el;
+ @result_highlight = el
@result_highlight.addClass "highlighted"
maxHeight = parseInt @search_results.css("maxHeight"), 10
@@ -343,11 +343,11 @@ class Chosen
high = @result_highlight
high_id = high.attr "id"
- this.result_clear_highlight();
+ this.result_clear_highlight()
high.addClass "result-selected"
- if @is_multiple
+ if @is_multiple
this.result_deactivate high
else
@result_single_selected = high
@@ -414,8 +414,8 @@ class Chosen
result_id = option.dom_id
if regex.test option.text
- found = true;
- results += 1;
+ found = true
+ results += 1
else if option.text.indexOf(" ") >= 0 or option.text.indexOf("[") == 0
#TODO: replace this substitution of /\[\]/ with a list of characters to skip.
parts = option.text.replace(/\[|\]/g, "").split(" ")
@@ -484,7 +484,7 @@ class Chosen
keyup_arrow: ->
if not @results_showing and not @is_multiple
- this.results_show()
+ this.results_show()
else if @result_highlight
prev_sibs = @result_highlight.prevAll("li.active-result")
@@ -630,4 +630,4 @@ SelectParser.select_to_array = (select) ->
parser.add_node( child ) for child in select.childNodes
parser.parsed
-root.SelectParser = SelectParser
\ No newline at end of file
+root.SelectParser = SelectParser
diff --git a/coffee/chosen.proto.coffee b/coffee/chosen.proto.coffee
index 76f08dc..87a22b6 100644
--- a/coffee/chosen.proto.coffee
+++ b/coffee/chosen.proto.coffee
@@ -206,7 +206,7 @@ class Chosen
""
result_add_option: (option) ->
- if not option.disabled
+ if not option.disabled
option.dom_id = @form_field.id + "chzn_o_" + option.array_index
classes = if option.selected and @is_multiple then [] else ["active-result"]
@@ -223,9 +223,9 @@ class Chosen
this.results_build()
result_do_highlight: (el) ->
- this.result_clear_highlight();
+ this.result_clear_highlight()
- @result_highlight = el;
+ @result_highlight = el
@result_highlight.addClassName "highlighted"
maxHeight = parseInt @search_results.getStyle('maxHeight'), 10
@@ -334,11 +334,11 @@ class Chosen
result_select: ->
if @result_highlight
high = @result_highlight
- this.result_clear_highlight();
+ this.result_clear_highlight()
high.addClassName("result-selected")
- if @is_multiple
+ if @is_multiple
this.result_deactivate high
else
@result_single_selected = high
@@ -405,8 +405,8 @@ class Chosen
result_id = option.dom_id
if regex.test option.text
- found = true;
- results += 1;
+ found = true
+ results += 1
else if option.text.indexOf(" ") >= 0 or option.text.indexOf("[") == 0
#TODO: replace this substitution of /\[\]/ with a list of characters to skip.
parts = option.text.replace(/\[|\]/g, "").split(" ")
@@ -626,4 +626,4 @@ SelectParser.select_to_array = (select) ->
parser.add_node( child ) for child in select.childNodes
parser.parsed
-root.SelectParser = SelectParser
\ No newline at end of file
+root.SelectParser = SelectParser