Skip to content

Commit

Permalink
typo in previous code, adding code to remove chosen from page, issue h…
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Ray committed Aug 4, 2011
1 parent 7b782f2 commit e01c1d3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions chosen/chosen.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
$.fn.extend({
chosen: function(data, options) {
return $(this).each(function(input_field) {
var chhosen, chosen, element;
var chosen, element;
element = $(this);
chhosen = element.data("chosen");
chosen = element.data("chosen");
if (!chosen) {
chosen = new Chosen(this, data, options);
element.data("chosen", chosen);
Expand Down
2 changes: 1 addition & 1 deletion chosen/chosen.jquery.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion chosen/chosen.proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@
_results = [];
for (_i = 0, _len = selects.length; _i < _len; _i++) {
select = selects[_i];
_results.push(select.chosen = new Chosen(select));
_results.push(!select.hasClassName("chzn-done") ? select.chosen = new Chosen(select) : void 0);
}
return _results;
});
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $.fn.extend({
chosen: (data, options) ->
$(this).each((input_field) ->
element = ($ this)
chhosen = element.data("chosen")
chosen = element.data("chosen")
if not chosen
chosen = new Chosen(this, data, options)
element.data "chosen", chosen
Expand Down
2 changes: 1 addition & 1 deletion coffee/chosen.proto.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ Element.addMethods({
document.observe 'dom:loaded', (evt) ->
selects = $$(".chzn-select")
for select in selects
select.chosen = new Chosen select
select.chosen = new Chosen select unless select.hasClassName("chzn-done")

get_side_border_padding = (elmt) ->
layout = new Element.Layout(elmt)
Expand Down

0 comments on commit e01c1d3

Please sign in to comment.