Skip to content

Commit

Permalink
Merge remote branch 'harvesthq/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
koenpunt committed Apr 3, 2012
2 parents 2c0fdc5 + b577535 commit 3f6fe59
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions chosen/chosen.css
Expand Up @@ -52,7 +52,7 @@
text-decoration: none;
}
.chzn-container-single .chzn-default {
color: #999;
color: #999;
}
.chzn-container-single .chzn-single span {
margin-right: 26px;
Expand All @@ -71,7 +71,7 @@
width: 12px;
height: 13px;
font-size: 1px;
background: url(chosen-sprite.png) right top no-repeat;
background: url('chosen-sprite.png') right top no-repeat;
}
.chzn-container-single .chzn-single abbr:hover {
background-position: right -11px;
Expand Down Expand Up @@ -209,7 +209,7 @@
width: 12px;
height: 13px;
font-size: 1px;
background: url(chosen-sprite.png) right top no-repeat;
background: url('chosen-sprite.png') right top no-repeat;
}
.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
background-position: right -11px;
Expand Down
4 changes: 2 additions & 2 deletions chosen/chosen.jquery.js
Expand Up @@ -246,7 +246,7 @@ Copyright (c) 2011 by Harvest

AbstractChosen.prototype.generate_random_char = function() {
var chars, newchar, rand;
chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ";
chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
rand = Math.floor(Math.random() * chars.length);
return newchar = chars.substring(rand, rand + 1);
};
Expand Down Expand Up @@ -303,7 +303,7 @@ Copyright (c) 2011 by Harvest

Chosen.prototype.set_up_html = function() {
var container_div, dd_top, dd_width, sf_width;
this.container_id = this.form_field.id.length ? this.form_field.id.replace(/(:|\.)/g, '_') : this.generate_field_id();
this.container_id = this.form_field.id.length ? this.form_field.id.replace(/[^\w]/g, '_') : this.generate_field_id();
this.container_id += "_chzn";
this.f_width = this.form_field_jq.outerWidth();
this.default_text = this.form_field_jq.data('placeholder') ? this.form_field_jq.data('placeholder') : this.default_text_default;
Expand Down
2 changes: 1 addition & 1 deletion chosen/chosen.jquery.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions chosen/chosen.proto.js
Expand Up @@ -246,7 +246,7 @@ Copyright (c) 2011 by Harvest

AbstractChosen.prototype.generate_random_char = function() {
var chars, newchar, rand;
chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ";
chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
rand = Math.floor(Math.random() * chars.length);
return newchar = chars.substring(rand, rand + 1);
};
Expand Down Expand Up @@ -299,7 +299,7 @@ Copyright (c) 2011 by Harvest

Chosen.prototype.set_up_html = function() {
var base_template, container_props, dd_top, dd_width, sf_width;
this.container_id = this.form_field.identify().replace(/(:|\.)/g, '_') + "_chzn";
this.container_id = this.form_field.identify().replace(/[^\w]/g, '_') + "_chzn";
this.f_width = this.form_field.getStyle("width") ? parseInt(this.form_field.getStyle("width"), 10) : this.form_field.getWidth();
container_props = {
'id': this.container_id,
Expand Down
2 changes: 1 addition & 1 deletion chosen/chosen.proto.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion coffee/chosen.jquery.coffee
Expand Up @@ -24,7 +24,7 @@ class Chosen extends AbstractChosen
@form_field_jq.addClass "chzn-done"

set_up_html: ->
@container_id = if @form_field.id.length then @form_field.id.replace(/(:|\.)/g, '_') else this.generate_field_id()
@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()
Expand Down
2 changes: 1 addition & 1 deletion coffee/chosen.proto.coffee
Expand Up @@ -25,7 +25,7 @@ class Chosen extends AbstractChosen


set_up_html: ->
@container_id = @form_field.identify().replace(/(:|\.)/g, '_') + "_chzn"
@container_id = @form_field.identify().replace(/[^\w]/g, '_') + "_chzn"

@f_width = if @form_field.getStyle("width") then parseInt @form_field.getStyle("width"), 10 else @form_field.getWidth()

Expand Down
2 changes: 1 addition & 1 deletion coffee/lib/abstract-chosen.coffee
Expand Up @@ -109,7 +109,7 @@ class AbstractChosen
new_id

generate_random_char: ->
chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ"
chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
rand = Math.floor(Math.random() * chars.length)
newchar = chars.substring rand, rand+1

Expand Down
2 changes: 1 addition & 1 deletion example.jquery.html
Expand Up @@ -809,7 +809,7 @@ <h2>Multiple Select</h2>
</div>
<div>
<em>Into This</em>
<select data-placeholder="Choose a Country..." class="chzn-select" multiple style="width:350px;" tabindex="4">
<select data-placeholder="Choose a Country..." class="chzn-select" id="2873829*&@#$*&![]" multiple style="width:350px;" tabindex="4">
<option value=""></option>
<option value="United States">United States</option>
<option value="United Kingdom">United Kingdom</option>
Expand Down

0 comments on commit 3f6fe59

Please sign in to comment.