diff options
author | brandon flowers <brandonflowers@gmail.com> | 2013-05-07 09:42:50 -0400 |
---|---|---|
committer | brandon flowers <brandonflowers@gmail.com> | 2013-05-07 09:42:50 -0400 |
commit | 345af3b31044206b0f3f9b7e3652dd1142998915 (patch) | |
tree | 8b13539749ca4ff90aa5ddcf8ce1420e747763a0 /examples/nodejs-mongodb-mongoose-restify/js/vm.js | |
parent | 58be424b2e8d1ea4af6dc2edde6a98fe9cf201a8 (diff) | |
download | backbonetutorials-345af3b31044206b0f3f9b7e3652dd1142998915.zip backbonetutorials-345af3b31044206b0f3f9b7e3652dd1142998915.tar.gz backbonetutorials-345af3b31044206b0f3f9b7e3652dd1142998915.tar.bz2 |
small tweak to readme to use existing demo
Diffstat (limited to 'examples/nodejs-mongodb-mongoose-restify/js/vm.js')
-rw-r--r-- | examples/nodejs-mongodb-mongoose-restify/js/vm.js | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/examples/nodejs-mongodb-mongoose-restify/js/vm.js b/examples/nodejs-mongodb-mongoose-restify/js/vm.js deleted file mode 100644 index 0bcf4c1..0000000 --- a/examples/nodejs-mongodb-mongoose-restify/js/vm.js +++ /dev/null @@ -1,33 +0,0 @@ -// Use this as a quick template for future modules -define([ - 'jquery', - 'underscore', - 'backbone', - 'events' -], function($, _, Backbone, Events){ - var views = {}; - var create = function (context, name, View, options) { - // View clean up isn't actually implemented yet but will simply call .clean, .remove and .unbind - if(typeof views[name] !== 'undefined') { - views[name].undelegateEvents(); - if(typeof views[name].clean === 'function') { - views[name].clean(); - } - } - var view = new View(options); - views[name] = view; - if(typeof context.children === 'undefined'){ - context.children = {}; - context.children[name] = view; - } else { - context.children[name] = view; - } - Events.trigger('viewCreated'); - return view; - } - - - return { - create: create - }; -}); |