From a702bbf88bc007a10f3beaf7f05f21d548660297 Mon Sep 17 00:00:00 2001 From: BorisMoore Date: Sat, 10 Jul 2010 18:17:52 -0700 Subject: [PATCH] Moved some private helper functions out of inner function scopes, for memory optimization. Added support for white space after target in tmpl tag, e.g. ${ foo } or ${ foo(x) } Added support for targets that include '.'s and calls to functions, e.g. ${foo.toLowerCase()} Added support for implicit passing of $data to nested tmpl when no parameters, so that {{tmpl "#myTmpl"}} is equivalent to {{tmpl() "#myTmpl"}}, to {{tmpl(null) "#myTmpl"}}, and to {{tmpl($data) "#myTmpl"}}, and so allows myTmpl to bind to the same data as the parent template. (But {{tmpl(foo) "#myTmpl"}} or {{tmpl({}) "#myTmpl"}} will replace the inherited $data value.) Added support for inserting a template without data, using $( "#tmpl" ).tmpl(null).appendTo( "#container" ); - which is equivalent to $( "#tmpl" ).tmpl( {} ).appendTo( "#container" ); --- demos/movies/PagesTmplPlus/movies1.html | 2 +- demos/movies/PagesTmplPlus/movies2.html | 2 +- demos/movies/PagesTmplPlus/movies3.html | 2 +- demos/samplesCore/parameters.html | 2 +- demos/samplesTmplPlus/composition.html | 2 +- demos/samplesTmplPlus/parameters.html | 2 +- jquery.tmpl.js | 260 +++++++++++++----------- 7 files changed, 146 insertions(+), 126 deletions(-) diff --git a/demos/movies/PagesTmplPlus/movies1.html b/demos/movies/PagesTmplPlus/movies1.html index 61db7b5..660e596 100644 --- a/demos/movies/PagesTmplPlus/movies1.html +++ b/demos/movies/PagesTmplPlus/movies1.html @@ -91,7 +91,7 @@

Netflix: Book a Movie...