Permalink
Browse files

Fix chosen dropdown width not being set.

  • Loading branch information...
1 parent c1f27c1 commit b38735d536e98ed1a915a183dcbc8f37dff6285f @ajshort ajshort committed with chillu Jul 30, 2012
@@ -14,8 +14,6 @@
SelectParser = (function() {
- SelectParser.name = 'SelectParser';
-
function SelectParser() {
this.options_index = 0;
this.parsed = [];
@@ -109,8 +107,6 @@ Copyright (c) 2011 by Harvest
AbstractChosen = (function() {
- AbstractChosen.name = 'AbstractChosen';
-
function AbstractChosen(form_field, options) {
this.form_field = form_field;
this.options = options != null ? options : {};
@@ -280,7 +276,7 @@ Copyright (c) 2011 by Harvest
(function() {
var $, Chosen, get_side_border_padding, root,
__hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
root = this;
@@ -305,8 +301,6 @@ Copyright (c) 2011 by Harvest
__extends(Chosen, _super);
- Chosen.name = 'Chosen';
-
function Chosen() {
return Chosen.__super__.constructor.apply(this, arguments);
}
@@ -347,7 +341,7 @@ Copyright (c) 2011 by Harvest
rise = this.rise_up(this.container, this.dropdown);
dd_top = rise ? -this.container.find('.chzn-drop').height() : this.container.height();
- dd_width = this.container.width - get_side_border_padding(this.dropdown);
+ dd_width = this.container.width() - get_side_border_padding(this.dropdown);
this.dropdown.css({
"width": dd_width + "px",
"top": dd_top + "px"
Oops, something went wrong.
@@ -14,8 +14,6 @@
SelectParser = (function() {
- SelectParser.name = 'SelectParser';
-
function SelectParser() {
this.options_index = 0;
this.parsed = [];
@@ -109,8 +107,6 @@ Copyright (c) 2011 by Harvest
AbstractChosen = (function() {
- AbstractChosen.name = 'AbstractChosen';
-
function AbstractChosen(form_field, options) {
this.form_field = form_field;
this.options = options != null ? options : {};
@@ -280,16 +276,14 @@ Copyright (c) 2011 by Harvest
(function() {
var Chosen, get_side_border_padding, root,
__hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
root = this;
Chosen = (function(_super) {
__extends(Chosen, _super);
- Chosen.name = 'Chosen';
-
function Chosen() {
return Chosen.__super__.constructor.apply(this, arguments);
}
Oops, something went wrong.
@@ -60,7 +60,7 @@ class Chosen extends AbstractChosen
dd_top = if rise then -this.container.find('.chzn-drop').height() else @container.height()
#patch applied: https://github.com/harvesthq/chosen/issues/300
- dd_width = (@container.width - get_side_border_padding(@dropdown))
+ dd_width = (@container.width() - get_side_border_padding(@dropdown))
@dropdown.css({"width": dd_width + "px", "top": dd_top + "px"})

0 comments on commit b38735d

Please sign in to comment.