Commits

Rufus Pollock  committed 0cfd299

[app,model][s]: refactor to use thread object rather than NoteList.

  • Participants
  • Parent commits ddcdca9

Comments (0)

Files changed (2)

         this.environ.account = new HyperNotes.Model.Account(this.environ.config.account);
       }
       var self = this;
-      var notes = new HyperNotes.Model.NoteList();
+      var thread = new HyperNotes.Model.Thread();
       my.notelistview = new HyperNotes.View.NoteListView({
         el: $('#noteapp'),
-        collection: notes
+        collection: thread.notes
         });
       my.timemap = new HyperNotes.View.TimeMapView({
         el: $('#timemap'),
-        collection: notes
+        collection: thread.notes
       });
       my.timemap.render();
     },

File lib/model.js

     defaults: {
       username: '',
       api_key: ''
-    }
+    },
+    localStorage: new Store("account")
   });
 
   // Note objects
 
   my.Thread = Backbone.Model.extend({
     initialize: function() {
-      this.notes = new NoteList;
-    }
+      this.notes = new my.NoteList;
+    },
+    localStorage: new Store("thread")
   });
 
   return my;