Fixed headings, lists and list items - listening to the model now, as we should have been

This commit is contained in:
Trevor Parscal 2011-12-07 23:13:57 +00:00
parent f226380f36
commit 8a5ff02cea
3 changed files with 12 additions and 3 deletions

View file

@ -17,7 +17,10 @@ es.HeadingView = function( model ) {
this.$.addClass( 'es-headingView' );
// Events
this.on( 'update', this.setClasses );
var _this = this;
this.model.on( 'update', function() {
_this.setClasses();
} );
// Initialization
this.setClasses();

View file

@ -18,7 +18,10 @@ es.ListItemView = function( model ) {
this.$.addClass( 'es-listItemView' );
// Events
this.on( 'update', this.setClasses );
var _this = this;
this.model.on( 'update', function() {
_this.setClasses();
} );
// Initialization
this.setClasses();

View file

@ -14,7 +14,10 @@ es.ListView = function( model ) {
this.$.addClass( 'es-listView' );
// Events
this.on( 'update', this.enumerate );
var _this = this;
this.model.on( 'update', function() {
_this.enumerate();
} );
// Initialization
this.enumerate();