Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR Applying chosen.js behaviour to all <select multiple>, rather t…

…han arbitrarily limiting to a CheckboxSetField. Also fixed a bug where those fields would get the '.has-chzn' class even if it wasn't applied due to a missing <select> element.
  • Loading branch information...
commit eab8401c7d8acd39d8a40ac71ab965cd80671d78 1 parent a6a7b2e
@chillu chillu authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 admin/javascript/LeftAndMain.js
View
7 admin/javascript/LeftAndMain.js
@@ -363,10 +363,11 @@ jQuery.noConflict();
* we can fix the height cropping.
*/
- $('.cms .field.dropdown, .cms .field.checkboxset').entwine({
+ $('.cms .field.dropdown select, .cms .field select[multiple]').entwine({
onmatch: function() {
- $(this).find("select:not(.no-chzn)").data('placeholder', ' ').chosen();
- $(this).addClass("has-chzn");
+ if(this.is('.no-chzn')) return;
+
+ this.data('placeholder', ' ').chosen().addClass("has-chzn");
this._super();
}
Please sign in to comment.
Something went wrong with that request. Please try again.