From 6de9e4b74e8d2d33b9bfca2a03a67d4e2d1c1e62 Mon Sep 17 00:00:00 2001 From: Oscar Godson Date: Wed, 1 May 2013 08:41:38 -0700 Subject: [PATCH] Ticket #510 - Put all the codez in a global namespace --- vanilla-examples/vanillajs/index.html | 4 ++++ vanilla-examples/vanillajs/js/app.js | 8 ++++---- vanilla-examples/vanillajs/js/controller.js | 2 +- vanilla-examples/vanillajs/js/model.js | 2 +- vanilla-examples/vanillajs/js/store.js | 2 +- vanilla-examples/vanillajs/js/view.js | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/vanilla-examples/vanillajs/index.html b/vanilla-examples/vanillajs/index.html index 604cbd6f2a..ba96d9c66f 100644 --- a/vanilla-examples/vanillajs/index.html +++ b/vanilla-examples/vanillajs/index.html @@ -39,6 +39,10 @@

todos

+ diff --git a/vanilla-examples/vanillajs/js/app.js b/vanilla-examples/vanillajs/js/app.js index 9f013b687f..e419414dc0 100644 --- a/vanilla-examples/vanillajs/js/app.js +++ b/vanilla-examples/vanillajs/js/app.js @@ -8,10 +8,10 @@ * @param {string} name The name of your new to do list. */ function Todo(name) { - this.storage = new Store(name); - this.model = new Model(this.storage); - this.view = new View(); - this.controller = new Controller(this.model, this.view); + this.storage = new app.Store(name); + this.model = new app.Model(this.storage); + this.view = new app.View(); + this.controller = new app.Controller(this.model, this.view); } var todo = new Todo('todos-vanillajs'); diff --git a/vanilla-examples/vanillajs/js/controller.js b/vanilla-examples/vanillajs/js/controller.js index 56b9109dea..cf8d554c1f 100644 --- a/vanilla-examples/vanillajs/js/controller.js +++ b/vanilla-examples/vanillajs/js/controller.js @@ -338,5 +338,5 @@ }; // Export to window - window.Controller = Controller; + window.app.Controller = Controller; })(window); diff --git a/vanilla-examples/vanillajs/js/model.js b/vanilla-examples/vanillajs/js/model.js index 644b620458..d32b107dde 100644 --- a/vanilla-examples/vanillajs/js/model.js +++ b/vanilla-examples/vanillajs/js/model.js @@ -115,5 +115,5 @@ }; // Export to window - window.Model = Model; + window.app.Model = Model; })(window); diff --git a/vanilla-examples/vanillajs/js/store.js b/vanilla-examples/vanillajs/js/store.js index 0e37ae196c..2cf3093cf8 100644 --- a/vanilla-examples/vanillajs/js/store.js +++ b/vanilla-examples/vanillajs/js/store.js @@ -138,5 +138,5 @@ }; // Export to window - window.Store = Store; + window.app.Store = Store; })(window); diff --git a/vanilla-examples/vanillajs/js/view.js b/vanilla-examples/vanillajs/js/view.js index 242b4cc8a0..a766bed415 100644 --- a/vanilla-examples/vanillajs/js/view.js +++ b/vanilla-examples/vanillajs/js/view.js @@ -87,5 +87,5 @@ }; // Export to window - window.View = View; + window.app.View = View; })(window);