r105482 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105481‎ | r105482 | r105483 >
Date:23:13, 7 December 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Fixed headings, lists and list items - listening to the model now, as we should have been
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/views/es.HeadingView.js (modified) (history)
  • /trunk/extensions/VisualEditor/modules/es/views/es.ListItemView.js (modified) (history)
  • /trunk/extensions/VisualEditor/modules/es/views/es.ListView.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/views/es.ListItemView.js
@@ -18,7 +18,10 @@
1919 this.$.addClass( 'es-listItemView' );
2020
2121 // Events
22 - this.on( 'update', this.setClasses );
 22+ var _this = this;
 23+ this.model.on( 'update', function() {
 24+ _this.setClasses();
 25+ } );
2326
2427 // Initialization
2528 this.setClasses();
Index: trunk/extensions/VisualEditor/modules/es/views/es.ListView.js
@@ -14,7 +14,10 @@
1515 this.$.addClass( 'es-listView' );
1616
1717 // Events
18 - this.on( 'update', this.enumerate );
 18+ var _this = this;
 19+ this.model.on( 'update', function() {
 20+ _this.enumerate();
 21+ } );
1922
2023 // Initialization
2124 this.enumerate();
Index: trunk/extensions/VisualEditor/modules/es/views/es.HeadingView.js
@@ -17,7 +17,10 @@
1818 this.$.addClass( 'es-headingView' );
1919
2020 // Events
21 - this.on( 'update', this.setClasses );
 21+ var _this = this;
 22+ this.model.on( 'update', function() {
 23+ _this.setClasses();
 24+ } );
2225
2326 // Initialization
2427 this.setClasses();

Status & tagging log