From 748a3568d2b93d4dd76f3804f429817284a938d8 Mon Sep 17 00:00:00 2001 From: BorisMoore Date: Thu, 22 Jul 2010 17:08:31 -0700 Subject: [PATCH] Fix to ignore null or undefined members of array data, when using .tmpl(dataArray) to render template against the array Fix so that ${foo} when foo is a function will call foo with the template item as 'this' pointer, rather than having the current data item as 'this' and passing the template item as a parameter. This removes dependencies on the signature of the function, so existing functions (not designed to be called on some this object) will work. --- demos/movies/PagesCore/movies.html | 27 +++++++++++++++++++------ demos/movies/PagesTmplPlus/movies1.html | 26 +++++++++++++++++++----- demos/movies/PagesTmplPlus/movies2.html | 13 ++++++++++-- demos/movies/PagesTmplPlus/movies3.html | 10 ++++++--- jquery.tmpl.js | 12 +++++------ 5 files changed, 65 insertions(+), 23 deletions(-) diff --git a/demos/movies/PagesCore/movies.html b/demos/movies/PagesCore/movies.html index 506e7b9..973584b 100644 --- a/demos/movies/PagesCore/movies.html +++ b/demos/movies/PagesCore/movies.html @@ -103,7 +103,7 @@

Netflix: Book a Movie...