aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/models/user.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-03-07 12:44:01 +0000
committerStruan Donald <struan@exo.org.uk>2013-03-07 12:44:01 +0000
commit86969471d257b11baa933f10eac01c13ab740036 (patch)
treebae612d615a2cc27b3d8b14b1949d45ae6b06fc9 /www/js/models/user.js
parent32edffd294848e6bfe525eaafe81b1eace5c71a7 (diff)
add in user model
Diffstat (limited to 'www/js/models/user.js')
-rw-r--r--www/js/models/user.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/www/js/models/user.js b/www/js/models/user.js
new file mode 100644
index 0000000..0cec52e
--- /dev/null
+++ b/www/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, _, $);