Merge pull request #37 from adamnbowen/master
Trivial: removing some eol characters like spaces and semicolons
This commit is contained in:
commit
d8cc2f97ef
|
@ -58,7 +58,7 @@ class Chosen
|
|||
if @is_multiple
|
||||
container_div.html '<ul class="chzn-choices"><li class="search-field"><input type="text" value="' + @default_text + '" class="default" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'
|
||||
else
|
||||
container_div.html '<a href="javascript:void(0)" class="chzn-single"><span>' + @default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" /></div><ul class="chzn-results"></ul></div>';
|
||||
container_div.html '<a href="javascript:void(0)" class="chzn-single"><span>' + @default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" /></div><ul class="chzn-results"></ul></div>'
|
||||
|
||||
@form_field_jq.hide().after container_div
|
||||
@container = ($ '#' + @container_id)
|
||||
|
@ -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,7 +343,7 @@ class Chosen
|
|||
high = @result_highlight
|
||||
high_id = high.attr "id"
|
||||
|
||||
this.result_clear_highlight();
|
||||
this.result_clear_highlight()
|
||||
|
||||
high.addClass "result-selected"
|
||||
|
||||
|
@ -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(" ")
|
||||
|
|
|
@ -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,7 +334,7 @@ class Chosen
|
|||
result_select: ->
|
||||
if @result_highlight
|
||||
high = @result_highlight
|
||||
this.result_clear_highlight();
|
||||
this.result_clear_highlight()
|
||||
|
||||
high.addClassName("result-selected")
|
||||
|
||||
|
@ -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(" ")
|
||||
|
|
Loading…
Reference in a new issue