r96675 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96674‎ | r96675 | r96676 >
Date:18:01, 9 September 2011
Author:inez
Status:deferred
Tags:
Comment:
Add setNumber method and $icon, $content properties
Modified paths:
  • /trunk/parsers/wikidom/lib/synth/views/es.ListBlockItemView.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/synth/views/es.ListBlockItemView.js
@@ -3,9 +3,14 @@
44 */
55 es.ListBlockItemView = function( model ) {
66 es.ViewContainerItem.call( this, model, 'listItem' );
7 - this.contentView = new es.ContentView( this.$, this.model.content );
8 - this.$.addClass( 'editSurface-listItem-' + this.model.styles[this.model.styles.length - 1] )
 7+ this.$icon = $( '<div class="editSurface-listItem-icon"></div>' );
 8+ this.$content = $( '<div class="editSurface-listItem-content"></div>' );
 9+ this.$
 10+ .append( this.$icon )
 11+ .append( this.$content )
 12+ .addClass( 'editSurface-listItem-' + this.model.styles[this.model.styles.length - 1] )
913 .addClass( 'editSurface-listItem-level' + ( this.model.styles.length - 1 ) );
 14+ this.contentView = new es.ContentView( this.$content, this.model.content );
1015 };
1116
1217 /**
@@ -15,6 +20,10 @@
1621 this.contentView.render();
1722 };
1823
 24+es.ListBlockItemView.prototype.setNumber = function( number ) {
 25+ this.$icon.text( number + '.' );
 26+};
 27+
1928 /**
2029 * Gets offset within content of position.
2130 */

Status & tagging log