Comparing version 0.5.2 to 0.5.3
{ | ||
"name": "temple", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "A modern JavaScript view framework.", | ||
@@ -5,0 +5,0 @@ "repo": "BeneathTheInk/Temple", |
{ | ||
"name": "temple", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "A modern JavaScript view framework.", | ||
@@ -5,0 +5,0 @@ "repository": "BeneathTheInk/Temple", |
@@ -9,3 +9,3 @@ var _ = require("underscore"), | ||
var Temple = module.exports = _.defaults({ | ||
VERSION: "0.5.2", | ||
VERSION: "0.5.3", | ||
NODE_TYPE: NODE_TYPE, | ||
@@ -12,0 +12,0 @@ |
@@ -343,25 +343,35 @@ var Trackr = require("trackr"), | ||
// a wrapper computation to ez-clean the rest | ||
return this.autorun(function() { | ||
return this.autorun(function(_comp) { | ||
decorators.forEach(function(d) { | ||
self.autorun(function(comp) { | ||
// assemble the arguments! | ||
var args = [ { | ||
target: el, | ||
model: ctx, | ||
view: self, | ||
template: attr, | ||
comp: comp, | ||
options: d.options | ||
} ]; | ||
if (d.options && d.options.defer) _.defer(execDecorator); | ||
else execDecorator(); | ||
// render arguments based on options | ||
if (d.options && d.options.parse === "string") { | ||
args.push(self.renderTemplateAsString(attr.children, ctx)); | ||
} else if (d.options == null || d.options.parse !== false) { | ||
args = args.concat(self.renderArguments(attr.arguments, ctx)); | ||
} | ||
function execDecorator() { | ||
var dcomp = self.autorun(function(comp) { | ||
// assemble the arguments! | ||
var args = [ { | ||
target: el, | ||
model: ctx, | ||
view: self, | ||
template: attr, | ||
comp: comp, | ||
options: d.options | ||
} ]; | ||
// execute the callback | ||
d.callback.apply(d.context || self, args); | ||
}); | ||
// render arguments based on options | ||
if (d.options && d.options.parse === "string") { | ||
args.push(self.renderTemplateAsString(attr.children, ctx)); | ||
} else if (d.options == null || d.options.parse !== false) { | ||
args = args.concat(self.renderArguments(attr.arguments, ctx)); | ||
} | ||
// execute the callback | ||
d.callback.apply(d.context || self, args); | ||
}); | ||
// clean up | ||
_comp.onInvalidate(function() { | ||
dcomp.stop(); | ||
}); | ||
} | ||
}); | ||
@@ -368,0 +378,0 @@ }); |
{ | ||
"name": "templejs", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "A reactive Mustache view framework.", | ||
@@ -5,0 +5,0 @@ "author": "Beneath the Ink <info@beneaththeink.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
99668
2847