From 25e3a0c94551b0faac3f16e0598e6f4bdffcf7d8 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Fri, 12 Jul 2013 09:47:56 +0100 Subject: instead of using js to inject the correct cordova js file in to index.html restructure things so that the common files are a level down and the platofrm specific ones are directly placed in the relevant project. This both makes for less fuss and also avoids the error with Android < v3 instantiating cordova twice. Note that the iOS common assets are included by a build script rather than a symlink as symlinking doesn't seem to agree with Xcode --- src/js/models/user.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/js/models/user.js (limited to 'src/js/models/user.js') diff --git a/src/js/models/user.js b/src/js/models/user.js new file mode 100644 index 0000000..0cec52e --- /dev/null +++ b/src/js/models/user.js @@ -0,0 +1,17 @@ +(function(FMS, Backbone, _, $) { + _.extend( FMS, { + User: Backbone.Model.extend({ + localStorage: new Backbone.LocalStorage(CONFIG.NAMESPACE + '-users') + }) + }); +})(FMS, Backbone, _, $); + + +(function(FMS, Backbone, _, $) { + _.extend( FMS, { + Users: Backbone.Collection.extend({ + model: FMS.User, + localStorage: new Backbone.LocalStorage(CONFIG.NAMESPACE + '-users') + }) + }); +})(FMS, Backbone, _, $); -- cgit v1.2.3