mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
Fixed headings, lists and list items - listening to the model now, as we should have been
This commit is contained in:
parent
f226380f36
commit
8a5ff02cea
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue