Make options default use the coffeescript way™

js_style_fix
Patrick Filler 2011-09-12 18:34:13 -04:00
parent 8fdb2a9c1d
commit ada808db43
6 changed files with 14 additions and 8 deletions

View File

@ -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);

File diff suppressed because one or more lines are too long

View File

@ -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;

File diff suppressed because one or more lines are too long

View File

@ -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

View File

@ -6,8 +6,8 @@ root = this
class Chosen
constructor: (elmn, options) ->
@options = options or {}
constructor: (elmn, options={}) ->
@options = options
this.set_default_values()