diff --git a/.jshintrc b/.jshintrc index 64ffe82..fa6656c 100644 --- a/.jshintrc +++ b/.jshintrc @@ -31,7 +31,7 @@ // "double" : require double quotes "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) "unused" : true, // true: Require all defined variables be used - "strict" : true, // true: Requires all functions run in ES5 Strict Mode + "strict" : false, // true: Requires all functions run in ES5 Strict Mode "trailing" : true, // true: Prohibit trailing whitespaces "maxparams" : false, // {int} Max number of formal params allowed per function "maxdepth" : false, // {int} Max depth of nested blocks (within functions) @@ -51,7 +51,7 @@ "evil" : false, // true: Tolerate use of `eval` and `new Function()` "expr" : false, // true: Tolerate `ExpressionStatement` as Programs "funcscope" : false, // true: Tolerate defining variables inside control statements" - "globalstrict" : true, // true: Allow global "use strict" (also enables 'strict') + "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict') "iterator" : false, // true: Tolerate using the `__iterator__` property "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block "laxbreak" : false, // true: Tolerate possibly unsafe line breakings diff --git a/.versions b/.versions new file mode 100644 index 0000000..c74c411 --- /dev/null +++ b/.versions @@ -0,0 +1,33 @@ +aldeed:autoform@4.2.2 +aldeed:autoform-select2@1.0.3 +aldeed:simple-schema@1.1.0 +base64@1.0.2 +blaze@2.0.4 +blaze-tools@1.0.2 +callback-hook@1.0.2 +check@1.0.3 +ddp@1.0.13 +deps@1.0.6 +ejson@1.0.5 +geojson-utils@1.0.2 +html-tools@1.0.3 +htmljs@1.0.3 +id-map@1.0.2 +jquery@1.0.2 +json@1.0.2 +livedata@1.0.12 +logging@1.0.6 +meteor@1.1.4 +minifiers@1.1.3 +minimongo@1.0.6 +momentjs:moment@2.8.4 +observe-sequence@1.0.4 +ordered-dict@1.0.2 +random@1.0.2 +reactive-var@1.0.4 +retry@1.0.2 +spacebars-compiler@1.0.4 +templating@1.0.10 +tracker@1.0.4 +ui@1.0.5 +underscore@1.0.2 diff --git a/autoform-select2.js b/autoform-select2.js index 70b5423..f6ae83b 100644 --- a/autoform-select2.js +++ b/autoform-select2.js @@ -1,3 +1,5 @@ +/* global AutoForm, _, $, Template */ + AutoForm.addInputType("select2", { template: "afSelect2", valueOut: function () { @@ -83,7 +85,7 @@ AutoForm.addInputType("select2", { Template.afSelect2.helpers({ optionAtts: function afSelectOptionAtts() { - var item = this + var item = this; var atts = { value: item.value }; diff --git a/package.js b/package.js index b17870a..b5eca30 100644 --- a/package.js +++ b/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'aldeed:autoform-select2', summary: 'Custom select2 input type for AutoForm', - version: '1.0.2', + version: '1.0.3', git: 'https://github.com/aldeed/meteor-autoform-select2.git' }); diff --git a/themes/bootstrap3.js b/themes/bootstrap3.js index 7c262bb..da27f77 100644 --- a/themes/bootstrap3.js +++ b/themes/bootstrap3.js @@ -1,6 +1,8 @@ -Template["afSelect2_bootstrap3"].helpers({ +/* global Template, AutoForm */ + +Template.afSelect2_bootstrap3.helpers({ optionAtts: function afSelectOptionAtts() { - var item = this + var item = this; var atts = { value: item.value }; @@ -18,11 +20,11 @@ Template["afSelect2_bootstrap3"].helpers({ } }); -Template["afSelect2_bootstrap3"].rendered = function () { +Template.afSelect2_bootstrap3.rendered = function () { // instanciate select2 this.$('select').select2(this.data.atts.select2Options || {}); }; -Template["afSelect2_bootstrap3"].destroyed = function () { +Template.afSelect2_bootstrap3.destroyed = function () { this.$('select').select2('destroy'); };