Make options default use the coffeescript way™
This commit is contained in:
parent
8fdb2a9c1d
commit
ada808db43
|
@ -29,7 +29,10 @@
|
|||
});
|
||||
Chosen = (function() {
|
||||
function Chosen(elmn, options) {
|
||||
this.options = options || {};
|
||||
if (options == null) {
|
||||
options = {};
|
||||
}
|
||||
this.options = options;
|
||||
this.set_default_values();
|
||||
this.form_field = elmn;
|
||||
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;
|
||||
Chosen = (function() {
|
||||
function Chosen(elmn, options) {
|
||||
this.options = options || {};
|
||||
if (options == null) {
|
||||
options = {};
|
||||
}
|
||||
this.options = options;
|
||||
this.set_default_values();
|
||||
this.form_field = elmn;
|
||||
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
|
||||
|
||||
constructor: (elmn, options) ->
|
||||
@options = options or {}
|
||||
constructor: (elmn, options={}) ->
|
||||
@options = options
|
||||
this.set_default_values()
|
||||
|
||||
@form_field = elmn
|
||||
|
|
|
@ -6,8 +6,8 @@ root = this
|
|||
|
||||
class Chosen
|
||||
|
||||
constructor: (elmn, options) ->
|
||||
@options = options or {}
|
||||
constructor: (elmn, options={}) ->
|
||||
@options = options
|
||||
|
||||
this.set_default_values()
|
||||
|
||||
|
|
Loading…
Reference in a new issue