r101026 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101025‎ | r101026 | r101027 >
Date:19:12, 27 October 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Added list examples to the demo and fixed a bug in branch nodes where child nodes were assumed to have contentView objects
Modified paths:
  • /trunk/parsers/wikidom/demos/hype/es.js (modified) (history)
  • /trunk/parsers/wikidom/demos/hype/index.html (modified) (history)
  • /trunk/parsers/wikidom/lib/hype/bases/es.DocumentViewBranchNode.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/hype/bases/es.DocumentViewBranchNode.js
@@ -21,7 +21,7 @@
2222 */
2323 es.DocumentViewBranchNode.prototype.renderContent = function() {
2424 for ( var i = 0; i < this.length; i++ ) {
25 - this[i].contentView.render();
 25+ this[i].renderContent();
2626 }
2727 };
2828
@@ -52,7 +52,7 @@
5353 */
5454 es.DocumentViewBranchNode.prototype.clearSelection = function() {
5555 for ( var i = 0; i < this.length; i++ ) {
56 - this[i].contentView.clearSelection();
 56+ this[i].clearSelection();
5757 }
5858 };
5959
Index: trunk/parsers/wikidom/demos/hype/es.js
@@ -13,6 +13,38 @@
1414 {
1515 'type': 'paragraph',
1616 'content': { 'text': 'Test 333' }
 17+ },
 18+ {
 19+ 'type': 'list',
 20+ 'children': [
 21+ {
 22+ 'type': 'listItem',
 23+ 'attributes': {
 24+ 'styles': ['bullet']
 25+ },
 26+ 'content': {
 27+ 'text': 'Test 4444'
 28+ }
 29+ },
 30+ {
 31+ 'type': 'listItem',
 32+ 'attributes': {
 33+ 'styles': ['bullet', 'bullet']
 34+ },
 35+ 'content': {
 36+ 'text': 'Test 55555'
 37+ }
 38+ },
 39+ {
 40+ 'type': 'listItem',
 41+ 'attributes': {
 42+ 'styles': ['number']
 43+ },
 44+ 'content': {
 45+ 'text': 'Test 666666'
 46+ }
 47+ }
 48+ ]
1749 }
1850 ]
1951 };
Index: trunk/parsers/wikidom/demos/hype/index.html
@@ -28,12 +28,16 @@
2929 <script src="../../lib/hype/models/es.SurfaceModel.js"></script>
3030 <script src="../../lib/hype/models/es.DocumentModel.js"></script>
3131 <script src="../../lib/hype/models/es.ParagraphModel.js"></script>
 32+ <script src="../../lib/hype/models/es.ListModel.js"></script>
 33+ <script src="../../lib/hype/models/es.ListItemModel.js"></script>
3234
3335 <!-- Views -->
3436 <script src="../../lib/hype/views/es.SurfaceView.js"></script>
3537 <script src="../../lib/hype/views/es.ContentView.js"></script>
3638 <script src="../../lib/hype/views/es.DocumentView.js"></script>
3739 <script src="../../lib/hype/views/es.ParagraphView.js"></script>
 40+ <script src="../../lib/hype/views/es.ListView.js"></script>
 41+ <script src="../../lib/hype/views/es.ListItemView.js"></script>
3842
3943 <!-- Demo -->
4044 <script src="es.js"></script>

Status & tagging log