r96453 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96452‎ | r96453 | r96454 >
Date:17:15, 7 September 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Finished adding basic view creators - most of which are trying to create views that don't exist yet.
Modified paths:
  • /trunk/parsers/wikidom/lib/synth/models/es.CommentBlockModel.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/models/es.HeadingBlockModel.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/models/es.HorizontalRuleBlockModel.js (modified) (history)
  • /trunk/parsers/wikidom/lib/synth/models/es.ListBlockModel.js (modified) (history)
  • /trunk/parsers/wikidom/tests/synth/test.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/tests/synth/test.js
@@ -157,7 +157,6 @@
158158 // TODO: Events for appending, prepending, inserting and removing
159159 } );
160160
161 -
162161 test( 'es.ViewContainer', function() {
163162 var modelContainer = new es.ModelContainer(),
164163 modelItem1 = new es.ModelContainerItem(),
Index: trunk/parsers/wikidom/lib/synth/models/es.CommentBlockModel.js
@@ -29,8 +29,8 @@
3030 /**
3131 * Creates a view for this model
3232 */
33 -es.BlockModel.prototype.createView = function() {
34 - return new es.BlockView( this );
 33+es.CommentBlockModel.prototype.createView = function() {
 34+ return new es.CommentBlockView( this );
3535 };
3636
3737 /**
Index: trunk/parsers/wikidom/lib/synth/models/es.ListBlockModel.js
@@ -72,6 +72,13 @@
7373 /* Methods */
7474
7575 /**
 76+ * Creates a view for this model
 77+ */
 78+es.ListBlockModel.prototype.createView = function() {
 79+ return new es.ListBlockView( this );
 80+};
 81+
 82+/**
7683 * Gets the length of all content.
7784 *
7885 * @method
Index: trunk/parsers/wikidom/lib/synth/models/es.HeadingBlockModel.js
@@ -30,6 +30,13 @@
3131 /* Methods */
3232
3333 /**
 34+ * Creates a view for this model
 35+ */
 36+es.HeadingBlockModel.prototype.createView = function() {
 37+ return new es.HeadingBlockView( this );
 38+};
 39+
 40+/**
3441 * Gets the length of all content.
3542 *
3643 * @method
Index: trunk/parsers/wikidom/lib/synth/models/es.HorizontalRuleBlockModel.js
@@ -24,6 +24,13 @@
2525 /* Methods */
2626
2727 /**
 28+ * Creates a view for this model
 29+ */
 30+es.HorizontalRuleBlockModel.prototype.createView = function() {
 31+ return new es.HorizontalRuleBlockView( this );
 32+};
 33+
 34+/**
2835 * Gets the length of all content - always 0.
2936 *
3037 * @method

Status & tagging log