diff options
author | Struan Donald <struan@exo.org.uk> | 2013-04-08 17:11:57 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-04-08 18:55:37 +0100 |
commit | a19459b65a8dbbc3ee12fbf7852956a1b322e3e6 (patch) | |
tree | 51f3a9cf8365e9d74fab63a8acc09fe078598048 /www/js/models/report.js | |
parent | bd3a482f3c268c6f4e31c4be0e9b2b8d6045b680 (diff) |
Trying to use the same model for both remote and localStorage was
involving all sorts of hackery so it's easier and cleaner to move to
separate models for reports and drafts
Diffstat (limited to 'www/js/models/report.js')
-rw-r--r-- | www/js/models/report.js | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/www/js/models/report.js b/www/js/models/report.js index 3215449..341574c 100644 --- a/www/js/models/report.js +++ b/www/js/models/report.js @@ -2,7 +2,6 @@ _.extend( FMS, { Report: Backbone.Model.extend({ urlRoot: CONFIG.FMS_URL + 'report/ajax', - localStorage: new Backbone.LocalStorage(CONFIG.NAMESPACE + '-reports'), defaults: { lat: 0, @@ -16,14 +15,6 @@ file: '' }, - localSave: function() { - var method = 'create'; - if ( this.id ) { - method = 'update'; - } - Backbone.localSync(method, this); - }, - sync: function(method, model, options) { switch (method) { case 'create': @@ -161,12 +152,3 @@ }) }); })(FMS, Backbone, _, $); - -(function(FMS, Backbone, _, $) { - _.extend( FMS, { - Reports: Backbone.Collection.extend({ - model: FMS.Report, - localStorage: new Backbone.LocalStorage(CONFIG.NAMESPACE + '-reports') - }) - }); -})(FMS, Backbone, _, $); |