Skip to content

Commit

Permalink
Tidying up the jQueryTemplatingEngine.
Browse files Browse the repository at this point in the history
  • Loading branch information
thatismatt committed Jun 11, 2010
1 parent e17be60 commit d631b14
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/josi/templating.js
Expand Up @@ -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){",
Expand All @@ -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",
Expand Down

0 comments on commit d631b14

Please sign in to comment.