Make options default use the coffeescript way™
This commit is contained in:
parent
8fdb2a9c1d
commit
ada808db43
|
@ -29,7 +29,10 @@
|
||||||
});
|
});
|
||||||
Chosen = (function() {
|
Chosen = (function() {
|
||||||
function Chosen(elmn, options) {
|
function Chosen(elmn, options) {
|
||||||
this.options = options || {};
|
if (options == null) {
|
||||||
|
options = {};
|
||||||
|
}
|
||||||
|
this.options = options;
|
||||||
this.set_default_values();
|
this.set_default_values();
|
||||||
this.form_field = elmn;
|
this.form_field = elmn;
|
||||||
this.form_field_jq = $(this.form_field);
|
this.form_field_jq = $(this.form_field);
|
||||||
|
|
2
chosen/chosen.jquery.min.js
vendored
2
chosen/chosen.jquery.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,10 @@
|
||||||
root = this;
|
root = this;
|
||||||
Chosen = (function() {
|
Chosen = (function() {
|
||||||
function Chosen(elmn, options) {
|
function Chosen(elmn, options) {
|
||||||
this.options = options || {};
|
if (options == null) {
|
||||||
|
options = {};
|
||||||
|
}
|
||||||
|
this.options = options;
|
||||||
this.set_default_values();
|
this.set_default_values();
|
||||||
this.form_field = elmn;
|
this.form_field = elmn;
|
||||||
this.is_multiple = this.form_field.multiple;
|
this.is_multiple = this.form_field.multiple;
|
||||||
|
|
2
chosen/chosen.proto.min.js
vendored
2
chosen/chosen.proto.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -15,8 +15,8 @@ $.fn.extend({
|
||||||
|
|
||||||
class Chosen
|
class Chosen
|
||||||
|
|
||||||
constructor: (elmn, options) ->
|
constructor: (elmn, options={}) ->
|
||||||
@options = options or {}
|
@options = options
|
||||||
this.set_default_values()
|
this.set_default_values()
|
||||||
|
|
||||||
@form_field = elmn
|
@form_field = elmn
|
||||||
|
|
|
@ -6,8 +6,8 @@ root = this
|
||||||
|
|
||||||
class Chosen
|
class Chosen
|
||||||
|
|
||||||
constructor: (elmn, options) ->
|
constructor: (elmn, options={}) ->
|
||||||
@options = options or {}
|
@options = options
|
||||||
|
|
||||||
this.set_default_values()
|
this.set_default_values()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue