Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use on/off instead of bind/unbind

  • Loading branch information...
commit e9a16079f8d81171068a99073d434c67d5358d6c 1 parent 48ad157
@bergie authored
Showing with 5 additions and 5 deletions.
  1. +3 −3 src/view/CollectionView.js
  2. +2 −2 src/view/EntityView.js
View
6 src/view/CollectionView.js
@@ -17,9 +17,9 @@ VIE.prototype.view.Collection = Backbone.View.extend({
_.bindAll(this, 'addItem', 'removeItem', 'refreshItems');
- this.collection.bind('add', this.addItem);
- this.collection.bind('remove', this.removeItem);
- this.collection.bind('reset', this.refreshItems);
+ this.collection.on('add', this.addItem);
+ this.collection.on('remove', this.removeItem);
+ this.collection.on('reset', this.refreshItems);
// Make the view aware of existing entities in collection
var view = this;
View
4 src/view/EntityView.js
@@ -10,8 +10,8 @@ VIE.prototype.view.Entity = Backbone.View.extend({
// Ensure view gets updated when properties of the Entity change.
_.bindAll(this, 'render', 'renderAbout');
- this.model.bind('change', this.render);
- this.model.bind('change:@subject', this.renderAbout);
+ this.model.on('change', this.render);
+ this.model.on('change:@subject', this.renderAbout);
},
// Rendering a view means writing the properties of the Entity back to
Please sign in to comment.
Something went wrong with that request. Please try again.