Skip to content

Instantly share code, notes, and snippets.

@jashkenas
Created August 12, 2011 19:27
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jashkenas/1142788 to your computer and use it in GitHub Desktop.
Save jashkenas/1142788 to your computer and use it in GitHub Desktop.
dc.ui.Document = Backbone.View.extend({
initialize: function() {
this.model.bind('change', this._onDocumentChange);
this.model.bind('change:selected', this._setSelected);
this.model.bind('view:pages', this.viewPages);
this.model.notes.bind('add', this._addNote);
this.model.notes.bind('reset', this._renderNotes);
this.model.pageEntities.bind('reset', this._renderPages);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment