Permalink
Browse files

fixed deleting

  • Loading branch information...
1 parent cc40356 commit 6f41bf93af22cdab25708281451edf874bd98f1d @jamuhl committed Jan 12, 2012
Showing with 6 additions and 5 deletions.
  1. +2 −2 domain/app/commandHandler.js
  2. +4 −3 host/public/js/viewmodel.js
@@ -23,7 +23,7 @@ var publisher = {
};
// eventstore
-var es = eventstore.createStore(/*{logger: 'console'}*/);
+var es = eventstore.createStore({logger: 'console'});
storage.createStorage(function(err, db) {
es.configure(function(){
@@ -112,4 +112,4 @@ var commandHandler = {
};
-exports.handle = commandHandler.handle;
+exports.handle = commandHandler.handle;
@@ -52,17 +52,18 @@
},
_itemChanged: function(id, text) {
- $.each(this.items(),function(item) {
+ $.each(this.items(),function(i, item) {
if (item.id === id) {
item.text(text);
}
});
},
_itemDeleted: function(id) {
- $.each(this.items(),function(item) {
+ var self = this;
+ $.each(this.items(),function(i, item) {
if (item.id === id) {
- this.items.remove(item);
+ self.items.remove(item);
}
});
}

0 comments on commit 6f41bf9

Please sign in to comment.