r93640 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93639‎ | r93640 | r93641 >
Date:19:47, 1 August 2011
Author:inez
Status:deferred
Tags:
Comment:
We don't need editSurface-list-line warper around content item anymore.
Modified paths:
  • /trunk/parsers/wikidom/lib/es/es.ListBlock.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.ListBlockItem.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/es/es.ListBlockItem.js
@@ -16,11 +16,20 @@
1717 es.ListBlockItem = function( content, lists ) {
1818 es.EventEmitter.call( this );
1919 es.Container.call( this, 'item', 'lists', lists, 'li' );
 20+
2021 this.content = content || new es.Content();
 22+ this.$content = $( '<div class="editSurface-list-content"></div>' );
 23+ this.$.prepend( this.$content );
 24+ this.flow = new es.TextFlow( this.$content, this.content );
 25+
 26+ /*
 27+ this.content = content || new es.Content();
2128 this.$line = $( '<div class="editSurface-list-line"></div>' );
2229 this.$content = $( '<div class="editSurface-list-content"></div>' );
2330 this.$.prepend( this.$line.append( this.$content ) );
2431 this.flow = new es.TextFlow( this.$content, this.content );
 32+ */
 33+
2534 var listBlockItem = this;
2635 this.flow.on( 'render', function() {
2736 listBlockItem.emit( 'update' );
@@ -119,7 +128,7 @@
120129 globalOffset = null;
121130
122131 if ( position.top >= itemOffset.top && position.top < itemOffset.top + itemHeight ) {
123 - if ( position.top < itemOffset.top + this.$line.height() ) {
 132+ if ( position.top < itemOffset.top + this.$content.height() ) {
124133 position.top -= itemOffset.top;
125134 position.left -= itemOffset.left;
126135 return globalOffset + this.flow.getOffset( position );
Index: trunk/parsers/wikidom/lib/es/es.ListBlock.js
@@ -194,7 +194,7 @@
195195 var location = this.list.getLocationFromOffset( offset )
196196 position = location.item.flow.getPosition( location.offset ),
197197 blockOffset = this.$.offset(),
198 - lineOffset = location.item.$line.find( '.editSurface-list-content' ).offset();
 198+ lineOffset = location.item.$content.offset();
199199
200200 position.top += lineOffset.top - blockOffset.top;
201201 position.left += lineOffset.left - blockOffset.left;

Status & tagging log