From 6d5c1f0f29235ecfb689d3a1ebae061f99cc3443 Mon Sep 17 00:00:00 2001 From: Greg Lobinski Date: Tue, 6 Aug 2013 14:40:35 +0200 Subject: [PATCH] Backbone naming tweaks Closes #610 Fixes #605 --- architecture-examples/backbone/index.html | 4 ++-- architecture-examples/backbone/js/collections/todos.js | 4 ++-- architecture-examples/backbone/js/routers/router.js | 4 ++-- .../backbone/js/views/{app.js => app-view.js} | 0 .../backbone/js/views/{todos.js => todo-view.js} | 0 5 files changed, 6 insertions(+), 6 deletions(-) rename architecture-examples/backbone/js/views/{app.js => app-view.js} (100%) rename architecture-examples/backbone/js/views/{todos.js => todo-view.js} (100%) diff --git a/architecture-examples/backbone/index.html b/architecture-examples/backbone/index.html index 71b4565fec..892a1ab630 100644 --- a/architecture-examples/backbone/index.html +++ b/architecture-examples/backbone/index.html @@ -56,8 +56,8 @@

todos

- - + + diff --git a/architecture-examples/backbone/js/collections/todos.js b/architecture-examples/backbone/js/collections/todos.js index 6e75dacc7a..ac4d837b49 100644 --- a/architecture-examples/backbone/js/collections/todos.js +++ b/architecture-examples/backbone/js/collections/todos.js @@ -9,7 +9,7 @@ var app = app || {}; // The collection of todos is backed by *localStorage* instead of a remote // server. - var TodoList = Backbone.Collection.extend({ + var Todos = Backbone.Collection.extend({ // Reference to this collection's model. model: app.Todo, @@ -44,5 +44,5 @@ var app = app || {}; }); // Create our global collection of **Todos**. - app.todos = new TodoList(); + app.todos = new Todos(); })(); diff --git a/architecture-examples/backbone/js/routers/router.js b/architecture-examples/backbone/js/routers/router.js index 3e18a29893..f7d618f7aa 100644 --- a/architecture-examples/backbone/js/routers/router.js +++ b/architecture-examples/backbone/js/routers/router.js @@ -6,7 +6,7 @@ var app = app || {}; // Todo Router // ---------- - var Workspace = Backbone.Router.extend({ + var TodoRouter = Backbone.Router.extend({ routes: { '*filter': 'setFilter' }, @@ -21,6 +21,6 @@ var app = app || {}; } }); - app.TodoRouter = new Workspace(); + app.TodoRouter = new TodoRouter(); Backbone.history.start(); })(); diff --git a/architecture-examples/backbone/js/views/app.js b/architecture-examples/backbone/js/views/app-view.js similarity index 100% rename from architecture-examples/backbone/js/views/app.js rename to architecture-examples/backbone/js/views/app-view.js diff --git a/architecture-examples/backbone/js/views/todos.js b/architecture-examples/backbone/js/views/todo-view.js similarity index 100% rename from architecture-examples/backbone/js/views/todos.js rename to architecture-examples/backbone/js/views/todo-view.js