r96626 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96625‎ | r96626 | r96627 >
Date:22:38, 8 September 2011
Author:inez
Status:deferred
Tags:
Comment:
Lists works now, but no styling yet
Modified paths:
  • /trunk/parsers/wikidom/lib/synth/bases/es.ViewContainer.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/bases/es.ViewContainerItem.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/views/es.ListBlockView.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/synth/bases/es.ViewContainerItem.js
@@ -17,9 +17,11 @@
1818 if ( typeof tagName !== 'string' ) {
1919 tagName = 'div';
2020 }
21 - this.$ = $( '<' + tagName + '/>' )
22 - .addClass( 'editSurface-' + typeName )
23 - .data( typeName, this );
 21+
 22+ if ( !this.$ ) {
 23+ this.$ = $( '<' + tagName + '/>' );
 24+ }
 25+ this.$.addClass( 'editSurface-' + typeName ).data( typeName, this );
2426 };
2527
2628 es.ViewContainerItem.prototype.getModel = function() {
Index: trunk/parsers/wikidom/lib/synth/bases/es.ViewContainer.js
@@ -26,9 +26,10 @@
2727 if ( typeof tagName !== 'string' ) {
2828 tagName = 'div';
2929 }
30 - this.$ = $( '<' + tagName + '/>' )
31 - .addClass( 'editSurface-' + typeName )
32 - .data( typeName, this );
 30+ if ( !this.$ ) {
 31+ this.$ = $( '<' + tagName + '/>' );
 32+ }
 33+ this.$.addClass( 'editSurface-' + typeName ).data( typeName, this );
3334 var container = this;
3435 function recycleItemView( itemModel, autoCreate ) {
3536 var itemView = container.lookupItemView( itemModel );
Index: trunk/parsers/wikidom/lib/synth/views/es.ListBlockView.js
@@ -2,7 +2,7 @@
33 * Creates an es.ParagraphBlockView object.
44 */
55 es.ListBlockView = function( model ) {
6 - es.ViewContainer.call( this, model, 'items' );
 6+ es.ViewContainer.call( this, model, 'list' );
77 es.BlockView.call( this, model, 'list' );
88 };
99

Status & tagging log