From 2d3df5ab2e76204f05cfc124a9377f07c8423208 Mon Sep 17 00:00:00 2001 From: BorisMoore Date: Tue, 22 Mar 2011 11:22:22 -0700 Subject: [PATCH] Cleaned up several samples, and clarified descriptive comments. --- demos/movies/PagesCore/movies.html | 4 +- demos/movies/PagesCore/moviesNoGlobals.html | 4 +- demos/movies/PagesTmplPlus/movies1.html | 11 +-- demos/movies/PagesTmplPlus/movies2.html | 10 +-- demos/movies/PagesTmplPlus/movies3.html | 12 +-- demos/movies/css/movies.css | 8 +- .../Interactive/tabsWrapNested.html | 2 +- demos/samplesCore/basic.html | 12 ++- demos/samplesCore/composition.html | 11 ++- demos/samplesCore/conditional.html | 13 ++- demos/samplesCore/each.html | 12 ++- demos/samplesCore/parameters.html | 12 ++- demos/samplesTmplPlus/basic.html | 16 +++- demos/samplesTmplPlus/composition.html | 18 ++++- demos/samplesTmplPlus/each.html | 80 ------------------- demos/samplesTmplPlus/parameters.html | 18 ++++- jquery.tmpl.js | 3 +- 17 files changed, 117 insertions(+), 129 deletions(-) delete mode 100644 demos/samplesTmplPlus/each.html diff --git a/demos/movies/PagesCore/movies.html b/demos/movies/PagesCore/movies.html index a2f1ab6..3b99b23 100644 --- a/demos/movies/PagesCore/movies.html +++ b/demos/movies/PagesCore/movies.html @@ -7,7 +7,7 @@ This version of the movies sample demo uses the $( templateSelector ).tmpl( data ).appendTo( targetSelector ) -pattern, and does not use the tmplCmd plugin or the rendered event. +pattern, and does not use the tmplPlus features (.tmplCmd, or the rendered event). --> @@ -38,7 +38,7 @@

Netflix: Book a Movie...


- + diff --git a/demos/movies/PagesCore/moviesNoGlobals.html b/demos/movies/PagesCore/moviesNoGlobals.html index b2b2460..d4e8b12 100644 --- a/demos/movies/PagesCore/moviesNoGlobals.html +++ b/demos/movies/PagesCore/moviesNoGlobals.html @@ -7,7 +7,7 @@ This version of the movies sample demo uses the $( templateSelector ).tmpl( data ).appendTo( targetSelector ) -pattern, and does not use the tmplCmd plugin or the rendered event. +pattern, and does not use the tmplPlus features (.tmplCmd, or the rendered event). Notice that in the example there are no global variables: Code is wrapped in a function closure: (function($) {...})(jQuery); @@ -46,7 +46,7 @@

Netflix: Book a Movie...


- + diff --git a/demos/movies/PagesTmplPlus/movies1.html b/demos/movies/PagesTmplPlus/movies1.html index 6795af8..8be8889 100644 --- a/demos/movies/PagesTmplPlus/movies1.html +++ b/demos/movies/PagesTmplPlus/movies1.html @@ -3,12 +3,9 @@ This sample illustrates using templates for a more complete and realistic scenario. -It uses the NetFlix OData JSONP services as a source of data. - -This version of the movies sample demo uses the - $( templateSelector ).tmpl( data ).appendTo( targetSelector ) -pattern, and also uses the tmplCmd plugin. -It does not use the rendered event. +It is similar to the movies/PagesCore/movies.html sample, +except that it uses jquery.tmplPlus.js in order to take advantage +of the .tmplCmd() features. It does not use the rendered event. --> @@ -39,7 +36,7 @@

Netflix: Book a Movie...


- + diff --git a/demos/movies/PagesTmplPlus/movies2.html b/demos/movies/PagesTmplPlus/movies2.html index 5fbd382..852d706 100644 --- a/demos/movies/PagesTmplPlus/movies2.html +++ b/demos/movies/PagesTmplPlus/movies2.html @@ -3,11 +3,9 @@ This sample illustrates using templates for a more complete and realistic scenario. -It uses the NetFlix OData JSONP services as a source of data. - -This version of the movies sample demo uses the - $( templateSelector ).tmpl( data ).appendTo( targetSelector ) -pattern, and also uses the tmplCmd plugin and the rendered event. +It is similar to the movies/PagesCore/movies.html sample, +except that it uses jquery.tmplPlus.js in order to take advantage +of the .tmplCmd() features and the rendered event. --> @@ -38,7 +36,7 @@

Netflix: Book a Movie...


- + diff --git a/demos/movies/PagesTmplPlus/movies3.html b/demos/movies/PagesTmplPlus/movies3.html index 4f46b8f..2fdf814 100644 --- a/demos/movies/PagesTmplPlus/movies3.html +++ b/demos/movies/PagesTmplPlus/movies3.html @@ -3,11 +3,11 @@ This sample illustrates using templates for a more complete and realistic scenario. -It uses the NetFlix OData JSONP services as a source of data. - -This version of the movies sample demo uses the - $( targetSelector ).append( templateSelector, data ) -pattern, and also uses the tmplCmd plugin and the rendered event. +It is similar to the movies/PagesCore/movies.html sample, +except that it uses jquery.tmplPlus.js in order to take advantage +of the +$( targetSelector ).append( templateSelector, data ) +pattern, as well as the .tmplCmd() features and the rendered event. --> @@ -38,7 +38,7 @@

Netflix: Book a Movie...


- + diff --git a/demos/movies/css/movies.css b/demos/movies/css/movies.css index 3f13aa9..33726f9 100644 --- a/demos/movies/css/movies.css +++ b/demos/movies/css/movies.css @@ -110,6 +110,7 @@ margin-bottom: 10px; padding: 8px; background-color: #fff; + height: 180px; } #movieList div div @@ -118,6 +119,8 @@ float: left; width: 120px; height: 150px; + float: left; + clear: both; } #movieList div img @@ -132,7 +135,10 @@ .buyButton { - /* background: url(buyButton.png) no-repeat 0px -20px) */ + float: left; + clear: both; + margin-left: 6px; + margin-top: 6px; } #bookingsList diff --git a/demos/samplesCore/Interactive/tabsWrapNested.html b/demos/samplesCore/Interactive/tabsWrapNested.html index 453f60e..3553db6 100644 --- a/demos/samplesCore/Interactive/tabsWrapNested.html +++ b/demos/samplesCore/Interactive/tabsWrapNested.html @@ -13,7 +13,7 @@

Tabs

..loading
- + + + + - + - + + + - + + + diff --git a/demos/samplesCore/each.html b/demos/samplesCore/each.html index c535fe2..267dd0c 100644 --- a/demos/samplesCore/each.html +++ b/demos/samplesCore/each.html @@ -1,7 +1,10 @@ + + + - - + + + - + + + - + + + - + - - - - - - - - - -
- diff --git a/demos/samplesTmplPlus/parameters.html b/demos/samplesTmplPlus/parameters.html index 8380561..1c9e5f7 100644 --- a/demos/samplesTmplPlus/parameters.html +++ b/demos/samplesTmplPlus/parameters.html @@ -1,6 +1,14 @@ + + + + + - + -