diff --git a/www/todo/assets/todomvc-app-css/index.css b/www/todo/example/assets/todomvc-app-css/index.css similarity index 100% rename from www/todo/assets/todomvc-app-css/index.css rename to www/todo/example/assets/todomvc-app-css/index.css diff --git a/www/todo/assets/todomvc-common/base.css b/www/todo/example/assets/todomvc-common/base.css similarity index 100% rename from www/todo/assets/todomvc-common/base.css rename to www/todo/example/assets/todomvc-common/base.css diff --git a/www/todo/assets/todomvc-common/base.js b/www/todo/example/assets/todomvc-common/base.js similarity index 100% rename from www/todo/assets/todomvc-common/base.js rename to www/todo/example/assets/todomvc-common/base.js diff --git a/www/todo/index.html b/www/todo/example/index.html similarity index 100% rename from www/todo/index.html rename to www/todo/example/index.html diff --git a/www/todo/js/app.js b/www/todo/example/js/app.js similarity index 100% rename from www/todo/js/app.js rename to www/todo/example/js/app.js diff --git a/www/todo/js/controller.js b/www/todo/example/js/controller.js similarity index 100% rename from www/todo/js/controller.js rename to www/todo/example/js/controller.js diff --git a/www/todo/js/helpers.js b/www/todo/example/js/helpers.js similarity index 100% rename from www/todo/js/helpers.js rename to www/todo/example/js/helpers.js diff --git a/www/todo/js/model.js b/www/todo/example/js/model.js similarity index 100% rename from www/todo/js/model.js rename to www/todo/example/js/model.js diff --git a/www/todo/js/store.js b/www/todo/example/js/store.js similarity index 100% rename from www/todo/js/store.js rename to www/todo/example/js/store.js diff --git a/www/todo/js/template.js b/www/todo/example/js/template.js similarity index 97% rename from www/todo/js/template.js rename to www/todo/example/js/template.js index d3bb738d4..a5587731f 100644 --- a/www/todo/js/template.js +++ b/www/todo/example/js/template.js @@ -58,10 +58,10 @@ * }); */ Template.prototype.show = function (data) { - var i, l; + var i = 0, l = data.length; var view = ''; - for (i = 0, l = data.length; i < l; i++) { + for (; i < l; i++) { var template = this.defaultTemplate; var completed = ''; var checked = ''; diff --git a/www/todo/js/view.js b/www/todo/example/js/view.js similarity index 100% rename from www/todo/js/view.js rename to www/todo/example/js/view.js