mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +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' );
|
this.$.addClass( 'es-headingView' );
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
this.on( 'update', this.setClasses );
|
var _this = this;
|
||||||
|
this.model.on( 'update', function() {
|
||||||
|
_this.setClasses();
|
||||||
|
} );
|
||||||
|
|
||||||
// Initialization
|
// Initialization
|
||||||
this.setClasses();
|
this.setClasses();
|
||||||
|
|
|
@ -18,7 +18,10 @@ es.ListItemView = function( model ) {
|
||||||
this.$.addClass( 'es-listItemView' );
|
this.$.addClass( 'es-listItemView' );
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
this.on( 'update', this.setClasses );
|
var _this = this;
|
||||||
|
this.model.on( 'update', function() {
|
||||||
|
_this.setClasses();
|
||||||
|
} );
|
||||||
|
|
||||||
// Initialization
|
// Initialization
|
||||||
this.setClasses();
|
this.setClasses();
|
||||||
|
|
|
@ -14,7 +14,10 @@ es.ListView = function( model ) {
|
||||||
this.$.addClass( 'es-listView' );
|
this.$.addClass( 'es-listView' );
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
this.on( 'update', this.enumerate );
|
var _this = this;
|
||||||
|
this.model.on( 'update', function() {
|
||||||
|
_this.enumerate();
|
||||||
|
} );
|
||||||
|
|
||||||
// Initialization
|
// Initialization
|
||||||
this.enumerate();
|
this.enumerate();
|
||||||
|
|
Loading…
Reference in a new issue