Permalink
Browse files

Tidying up the jQueryTemplatingEngine.

  • Loading branch information...
thatismatt committed Jun 11, 2010
1 parent e17be60 commit d631b143ec16c9de0ca632ea204705141fa35753
Showing with 2 additions and 6 deletions.
  1. +2 −6 lib/josi/templating.js
View
@@ -75,8 +75,8 @@ this.jQueryTemplatingEngine = TemplatingEngine.extend({
var tmplcmd = {
'each': {
_default: [null, "$i"],
- prefix: "$1.forEach(function($2){with(this){",
- suffix: "}});"
+ prefix: "for(var $2 in $1){",
+ suffix: "}"
},
'if': {
prefix: "if($1){",
@@ -85,13 +85,9 @@ this.jQueryTemplatingEngine = TemplatingEngine.extend({
'else': {
prefix: "}else{"
},
- 'html': {
- prefix: "_.push(typeof $1==='function'?$1.call(this):$1);"
- },
'=': {
_default: ["this"],
prefix: "_.push(typeof $1==='function'?$1.call(this):$1);"
- // prefix: "_.push($.encode(typeof $1==='function'?$1.call(this):$1));"
}
};
var fn = new Function("$data",

0 comments on commit d631b14

Please sign in to comment.