Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed jQuery plugin bug but there is still a string flavor one

  • Loading branch information...
commit 1c794f77dd957f4d03bb619dcf372209d26a7de7 1 parent 68ff20e
@twolfson twolfson authored
View
2  dist/Builder.jquery.js
@@ -184,7 +184,7 @@ function addPlugin(params) {
// Iterate over the items and initialize the plugin
$items.each(function () {
- $(item)[plugin]();
+ $(this)[plugin]();
});
};
View
2  dist/Builder.jquery.min.js
@@ -1,4 +1,4 @@
/*! Builder - v0.1.0 - 2013-01-09
* https://github.com/Ensighten/Builder
* Copyright (c) 2013 Ensighten; Licensed MIT */
-(function(e){function i(e,t){var n={data:t};e=s.call(n,e);var r=o.call(n,e,t),i=u.call(n,r);return i=a.call(n,i),i}function s(e){var t=0,r=n.length;for(;t<r;t++)e=n[t].call(this,e)||e;return e}function o(e,n){var r=t["template engine"],i=r.call(this,e,n);return i}function u(e){var n=t["dom engine"],r=n.call(this,e);return r}function a(e){var t=0,n=r.length;for(;t<n;t++)e=r[t].call(this,e)||e;return e}function f(e,n){var r;if(typeof e=="object")for(r in e)e.hasOwnProperty(r)&&f(r,e[r]);else t[e]=n}function l(e){n.push(e)}function c(e){r.push(e)}function h(t){typeof t=="string"&&(t={plugin:t});var n=t.plugin,r=t.selector||"."+n,i=function(i){var s=e().add(i.filter(r)).add(i.find(r));s.each(function(){e(item)[n]()})};c(i)}var t={"template engine":function(e){return e},"dom engine":function(t){return e(t)}},n=[],r=[];i.pre=s,i.beforeFns=n,i.template=o,i.domify=u,i.post=a,i.afterFns=r,i.set=f,i.settings=t,i.before=l,i.after=c,i.addPlugin=h,window.Builder=i})(jQuery);
+(function(e){function i(e,t){var n={data:t};e=s.call(n,e);var r=o.call(n,e,t),i=u.call(n,r);return i=a.call(n,i),i}function s(e){var t=0,r=n.length;for(;t<r;t++)e=n[t].call(this,e)||e;return e}function o(e,n){var r=t["template engine"],i=r.call(this,e,n);return i}function u(e){var n=t["dom engine"],r=n.call(this,e);return r}function a(e){var t=0,n=r.length;for(;t<n;t++)e=r[t].call(this,e)||e;return e}function f(e,n){var r;if(typeof e=="object")for(r in e)e.hasOwnProperty(r)&&f(r,e[r]);else t[e]=n}function l(e){n.push(e)}function c(e){r.push(e)}function h(t){typeof t=="string"&&(t={plugin:t});var n=t.plugin,r=t.selector||"."+n,i=function(i){var s=e().add(i.filter(r)).add(i.find(r));s.each(function(){e(this)[n]()})};c(i)}var t={"template engine":function(e){return e},"dom engine":function(t){return e(t)}},n=[],r=[];i.pre=s,i.beforeFns=n,i.template=o,i.domify=u,i.post=a,i.afterFns=r,i.set=f,i.settings=t,i.before=l,i.after=c,i.addPlugin=h,window.Builder=i})(jQuery);
View
2  dist/Builder.require.jquery.js
@@ -184,7 +184,7 @@ function addPlugin(params) {
// Iterate over the items and initialize the plugin
$items.each(function () {
- $(item)[plugin]();
+ $(this)[plugin]();
});
};
View
2  dist/Builder.require.jquery.keys.js
@@ -184,7 +184,7 @@ function addPlugin(params) {
// Iterate over the items and initialize the plugin
$items.each(function () {
- $(item)[plugin]();
+ $(this)[plugin]();
});
};
View
2  dist/Builder.require.jquery.keys.min.js
@@ -1,4 +1,4 @@
/*! Builder - v0.1.0 - 2013-01-09
* https://github.com/Ensighten/Builder
* Copyright (c) 2013 Ensighten; Licensed MIT */
-define(["jquery"],function(e){function i(e,t){var n={data:t};e=s.call(n,e);var r=o.call(n,e,t),i=u.call(n,r);return i=a.call(n,i),i}function s(e){var t=0,r=n.length;for(;t<r;t++)e=n[t].call(this,e)||e;return e}function o(e,n){var r=t["template engine"],i=r.call(this,e,n);return i}function u(e){var n=t["dom engine"],r=n.call(this,e);return r}function a(e){var t=0,n=r.length;for(;t<n;t++)e=r[t].call(this,e)||e;return e}function f(e,n){var r;if(typeof e=="object")for(r in e)e.hasOwnProperty(r)&&f(r,e[r]);else t[e]=n}function l(e){n.push(e)}function c(e){r.push(e)}function h(t){typeof t=="string"&&(t={plugin:t});var n=t.plugin,r=t.selector||"."+n,i=function(i){var s=e().add(i.filter(r)).add(i.find(r));s.each(function(){e(item)[n]()})};c(i)}function d(e,t){p[e]=t}var t={"template engine":function(e){return e},"dom engine":function(t){return e(t)}},n=[],r=[];i.pre=s,i.beforeFns=n,i.template=o,i.domify=u,i.post=a,i.afterFns=r,i.set=f,i.settings=t,i.before=l,i.after=c,i.addPlugin=h;var p={};return i.addView=d,i.views=p,l(function(e){var t=p[e];if(!t)throw new Error('View could not loaded "'+e+'"');return t}),i});
+define(["jquery"],function(e){function i(e,t){var n={data:t};e=s.call(n,e);var r=o.call(n,e,t),i=u.call(n,r);return i=a.call(n,i),i}function s(e){var t=0,r=n.length;for(;t<r;t++)e=n[t].call(this,e)||e;return e}function o(e,n){var r=t["template engine"],i=r.call(this,e,n);return i}function u(e){var n=t["dom engine"],r=n.call(this,e);return r}function a(e){var t=0,n=r.length;for(;t<n;t++)e=r[t].call(this,e)||e;return e}function f(e,n){var r;if(typeof e=="object")for(r in e)e.hasOwnProperty(r)&&f(r,e[r]);else t[e]=n}function l(e){n.push(e)}function c(e){r.push(e)}function h(t){typeof t=="string"&&(t={plugin:t});var n=t.plugin,r=t.selector||"."+n,i=function(i){var s=e().add(i.filter(r)).add(i.find(r));s.each(function(){e(this)[n]()})};c(i)}function d(e,t){p[e]=t}var t={"template engine":function(e){return e},"dom engine":function(t){return e(t)}},n=[],r=[];i.pre=s,i.beforeFns=n,i.template=o,i.domify=u,i.post=a,i.afterFns=r,i.set=f,i.settings=t,i.before=l,i.after=c,i.addPlugin=h;var p={};return i.addView=d,i.views=p,l(function(e){var t=p[e];if(!t)throw new Error('View could not loaded "'+e+'"');return t}),i});
View
2  dist/Builder.require.jquery.min.js
@@ -1,4 +1,4 @@
/*! Builder - v0.1.0 - 2013-01-09
* https://github.com/Ensighten/Builder
* Copyright (c) 2013 Ensighten; Licensed MIT */
-define(["jquery"],function(e){function i(e,t){var n={data:t};e=s.call(n,e);var r=o.call(n,e,t),i=u.call(n,r);return i=a.call(n,i),i}function s(e){var t=0,r=n.length;for(;t<r;t++)e=n[t].call(this,e)||e;return e}function o(e,n){var r=t["template engine"],i=r.call(this,e,n);return i}function u(e){var n=t["dom engine"],r=n.call(this,e);return r}function a(e){var t=0,n=r.length;for(;t<n;t++)e=r[t].call(this,e)||e;return e}function f(e,n){var r;if(typeof e=="object")for(r in e)e.hasOwnProperty(r)&&f(r,e[r]);else t[e]=n}function l(e){n.push(e)}function c(e){r.push(e)}function h(t){typeof t=="string"&&(t={plugin:t});var n=t.plugin,r=t.selector||"."+n,i=function(i){var s=e().add(i.filter(r)).add(i.find(r));s.each(function(){e(item)[n]()})};c(i)}var t={"template engine":function(e){return e},"dom engine":function(t){return e(t)}},n=[],r=[];return i.pre=s,i.beforeFns=n,i.template=o,i.domify=u,i.post=a,i.afterFns=r,i.set=f,i.settings=t,i.before=l,i.after=c,i.addPlugin=h,i});
+define(["jquery"],function(e){function i(e,t){var n={data:t};e=s.call(n,e);var r=o.call(n,e,t),i=u.call(n,r);return i=a.call(n,i),i}function s(e){var t=0,r=n.length;for(;t<r;t++)e=n[t].call(this,e)||e;return e}function o(e,n){var r=t["template engine"],i=r.call(this,e,n);return i}function u(e){var n=t["dom engine"],r=n.call(this,e);return r}function a(e){var t=0,n=r.length;for(;t<n;t++)e=r[t].call(this,e)||e;return e}function f(e,n){var r;if(typeof e=="object")for(r in e)e.hasOwnProperty(r)&&f(r,e[r]);else t[e]=n}function l(e){n.push(e)}function c(e){r.push(e)}function h(t){typeof t=="string"&&(t={plugin:t});var n=t.plugin,r=t.selector||"."+n,i=function(i){var s=e().add(i.filter(r)).add(i.find(r));s.each(function(){e(this)[n]()})};c(i)}var t={"template engine":function(e){return e},"dom engine":function(t){return e(t)}},n=[],r=[];return i.pre=s,i.beforeFns=n,i.template=o,i.domify=u,i.post=a,i.afterFns=r,i.set=f,i.settings=t,i.before=l,i.after=c,i.addPlugin=h,i});
View
14 grunt.js
@@ -107,6 +107,20 @@ module.exports = function(grunt) {
// Testing config
jshint: {
files: {
+ options: {
+ curly: true,
+ eqeqeq: true,
+ immed: true,
+ // latedef: true,
+ // newcap: true,
+ noarg: true,
+ sub: true,
+ undef: true,
+ boss: true,
+ eqnull: true,
+
+ browser: true
+ },
globals: {
'$': true,
'jQuery': true,
View
2  src/Builder.jquery.js
@@ -23,7 +23,7 @@ function addPlugin(params) {
// Iterate over the items and initialize the plugin
$items.each(function () {
- $(item)[plugin]();
+ $(this)[plugin]();
});
};
View
2  stage/Builder.jquery.js
@@ -180,7 +180,7 @@ function addPlugin(params) {
// Iterate over the items and initialize the plugin
$items.each(function () {
- $(item)[plugin]();
+ $(this)[plugin]();
});
};
View
2  stage/Builder.require.jquery.js
@@ -180,7 +180,7 @@ function addPlugin(params) {
// Iterate over the items and initialize the plugin
$items.each(function () {
- $(item)[plugin]();
+ $(this)[plugin]();
});
};
View
2  stage/Builder.require.jquery.keys.js
@@ -180,7 +180,7 @@ function addPlugin(params) {
// Iterate over the items and initialize the plugin
$items.each(function () {
- $(item)[plugin]();
+ $(this)[plugin]();
});
};
View
4 test/Builder_test.require.jquery.js
@@ -29,7 +29,7 @@ test('A template with a jQuery plugin (string flavor) rendered by a jQuery plugi
stop();
// Load jQuery.
- require(['Builder'], function (Builder) {
+ require(['jquery', 'Builder'], function ($, Builder) {
// Continue testing.
start();
@@ -58,7 +58,7 @@ test('A template with a jQuery plugin (object flavor) rendered by a jQuery plugi
stop();
// Load jQuery.
- require(['Builder'], function (Builder) {
+ require(['jquery', 'Builder'], function ($, Builder) {
// Continue testing.
start();
Please sign in to comment.
Something went wrong with that request. Please try again.