r97217 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97216‎ | r97217 | r97218 >
Date:22:55, 15 September 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Added more getHtml support
Modified paths:
  • /trunk/parsers/wikidom/lib/synth/views/es.DocumentView.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/views/es.ListBlockItemView.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/views/es.ListBlockView.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/views/es.ParagraphBlockView.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/synth/views/es.ListBlockItemView.js
@@ -68,7 +68,11 @@
6969 * @returns {String} HTML data
7070 */
7171 es.ListBlockItemView.prototype.getHtml = function( options ) {
72 - return es.Html.makeTag( 'li', {}, this.contentView.getHtml() );
 72+ return es.Html.makeTag(
 73+ 'div',
 74+ { 'class': this.$.attr( 'class' ) },
 75+ this.contentView.getHtml()
 76+ );
7377 };
7478
7579 /* Inheritance */
Index: trunk/parsers/wikidom/lib/synth/views/es.ListBlockView.js
@@ -80,7 +80,13 @@
8181 * @returns {String} HTML data
8282 */
8383 es.ListBlockView.prototype.getHtml = function( options ) {
84 - // TODO: Build tree of list items based on their style stacks and make an HTML list tree
 84+ return es.Html.makeTag(
 85+ 'div',
 86+ { 'class': this.$.attr( 'class' ) },
 87+ $.map( this.views, function( view ) {
 88+ return view.getHtml();
 89+ } ).join( '' )
 90+ );
8591 };
8692
8793 /* Inheritance */
Index: trunk/parsers/wikidom/lib/synth/views/es.DocumentView.js
@@ -38,9 +38,13 @@
3939 */
4040 es.DocumentView.prototype.getHtml = function() {
4141 var views = this.views;
42 - return $.map( this.views, function( view, i ) {
43 - return view.getHtml( { 'singular': i === 0 && views.length == 1 } );
44 - } ).join( '' );
 42+ return es.Html.makeTag(
 43+ 'div',
 44+ { 'class': this.$.attr( 'class' ) },
 45+ $.map( this.views, function( view, i ) {
 46+ return view.getHtml( { 'singular': i === 0 && views.length == 1 } );
 47+ } ).join( '' )
 48+ );
4549 };
4650
4751 /* Inheritance */
Index: trunk/parsers/wikidom/lib/synth/views/es.ParagraphBlockView.js
@@ -59,7 +59,7 @@
6060 es.ParagraphBlockView.prototype.getHtml = function( options ) {
6161 var html = this.contentView.getHtml();
6262 if ( !options.singular ) {
63 - html = es.Html.makeTag( 'p', {}, html );
 63+ html = es.Html.makeTag( 'div', { 'class': this.$.attr( 'class' ) }, html );
6464 }
6565 return html;
6666 };

Status & tagging log