r93335 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93334‎ | r93335 | r93336 >
Date:23:36, 27 July 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Documentation
Modified paths:
  • /trunk/parsers/wikidom/lib/es/es.Block.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Container.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Content.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Cursor.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Document.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.EventEmitter.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.ListBlock.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.ListBlockItem.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.ListBlockList.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Location.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.ParagraphBlock.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Position.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Range.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Selection.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Surface.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.TextFlow.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/es/es.Position.js
@@ -1,12 +1,16 @@
22 /**
3 - * Pixel position, a 2D position within a rendered document.
 3+ * Pixel position.
44 *
55 * This can also support an optional bottom field, to represent a vertical line, such as a cursor.
66 *
 7+ * @class
 8+ * @constructor
79 * @param left {Integer} Horizontal position
810 * @param top {Integer} Vertical top position
911 * @param bottom {Integer} Vertical bottom position of bottom (optional, default: top)
10 - * @returns {es.Position}
 12+ * @property left {Integer} Horizontal position
 13+ * @property top {Integer} Vertical top position
 14+ * @property bottom {Integer} Vertical bottom position of bottom
1115 */
1216 es.Position = function( left, top, bottom ) {
1317 this.left = left || 0;
Index: trunk/parsers/wikidom/lib/es/es.ListBlockItem.js
@@ -1,5 +1,17 @@
22 /**
3 - * es.ListBlockItem
 3+ * List item.
 4+ *
 5+ * @class
 6+ * @constructor
 7+ * @extends {es.EventEmitter}
 8+ * @extends {es.Container}
 9+ * @param line {Object} WikiDom line object to convert and use initially
 10+ * @param lists {Array} List of WikiDom list objects to convert and use initially
 11+ * @property lists {Array}
 12+ * @property $line
 13+ * @property $content
 14+ * @property content
 15+ * @property flow
416 */
517 es.ListBlockItem = function( line, lists ) {
618 // Inheritance
Index: trunk/parsers/wikidom/lib/es/es.Location.js
@@ -1,9 +1,12 @@
22 /**
3 - * Content location, an offset within a block.
 3+ * Offset within a block.
44 *
5 - * @param block {es.Block} Location target
6 - * @param offset {Integer} Location offset
7 - * @returns {es.Location}
 5+ * @class
 6+ * @constructor
 7+ * @param block {es.Block} Block offset is within
 8+ * @param offset {Integer} Offset within block
 9+ * @property block {es.Block} Block offset is within
 10+ * @property offset {Integer} Offset within block (optional, default: 0)
811 */
912 es.Location = function( block, offset ) {
1013 this.block = block;
Index: trunk/parsers/wikidom/lib/es/es.Content.js
@@ -1,14 +1,16 @@
2 -/* Classes */
3 -
42 /**
 3+ * Annotated content.
 4+ *
55 * Content objects are wrappers around arrays of plain or annotated characters. Data in this form
66 * is ultimately equivalent to but more efficient to work with than WikiDom line objects (plain text
77 * paired with offset annotation), especially when performing substring operations. Content can be
88 * derived from or converted to one or more WikiDom line objects.
99 *
 10+ * @class
 11+ * @constructor
1012 * @extends {es.EventEmitter}
1113 * @param content {Array} List of plain or annotated characters
12 - * @returns {es.Content}
 14+ * @property data {Array}
1315 */
1416 es.Content = function( content ) {
1517 es.EventEmitter.call( this );
Index: trunk/parsers/wikidom/lib/es/es.EventEmitter.js
@@ -1,3 +1,10 @@
 2+/**
 3+ * Event emitter.
 4+ *
 5+ * @class
 6+ * @constructor
 7+ * @property events {Object}
 8+ */
29 es.EventEmitter = function() {
310 this.events = {};
411 }
Index: trunk/parsers/wikidom/lib/es/es.TextFlow.js
@@ -1,10 +1,19 @@
22 /**
3 - * Renders and provides access to flowed text.
 3+ * Flowing text renderer.
44 *
 5+ * @class
 6+ * @constructor
57 * @extends {es.EventEmitter}
6 - * @param $container {jQuery Selection} Element to render into
 8+ * @param $container {jQuery} Element to render into
79 * @param content {es.Content} Initial content to render
8 - * @returns {es.TextFlow}
 10+ * @property $ {jQuery}
 11+ * @property content {es.Content}
 12+ * @property boundaries {Array}
 13+ * @property lines {Array}
 14+ * @property width {Integer}
 15+ * @property bondaryTest {RegExp}
 16+ * @property widthCache {Object}
 17+ * @property renderState {Object}
918 */
1019 es.TextFlow = function( $container, content ) {
1120 // Inheritance
Index: trunk/parsers/wikidom/lib/es/es.Cursor.js
@@ -1,6 +1,10 @@
22 /**
 3+ * Blinking cursor.
34 *
4 - * @returns {es.Cursor}
 5+ * @class
 6+ * @constructor
 7+ * @property cursorInterval {Interval}
 8+ * @property $ {jQuery}
59 */
610 es.Cursor = function() {
711 this.cursorInterval = null;
Index: trunk/parsers/wikidom/lib/es/es.Document.js
@@ -1,8 +1,12 @@
22 /**
 3+ * Ordered collection of blocks.
34 *
 5+ * @class
 6+ * @constructor
47 * @extends {es.EventEmitter}
58 * @param blocks {Array} List of blocks
6 - * @returns {es.Document}
 9+ * @property blocks {Array}
 10+ * @property width {Integer}
711 */
812 es.Document = function( blocks ) {
913 es.Container.call( this, 'document', 'blocks', blocks );
Index: trunk/parsers/wikidom/lib/es/es.ParagraphBlock.js
@@ -1,9 +1,13 @@
22 /**
3 - * es.ParagraphBlock
 3+ * Paragraph block.
44 *
 5+ * @class
 6+ * @constructor
57 * @extends {es.Block}
68 * @param lines {Array} List of Wikidom line objects
7 - * @returns {es.ParagraphBlock}
 9+ * @property content {es.Content}
 10+ * @property $ {jQuery}
 11+ * @property flow {es.TextFlow}
812 */
913 es.ParagraphBlock = function( lines ) {
1014 es.Block.call( this );
Index: trunk/parsers/wikidom/lib/es/es.Container.js
@@ -1,8 +1,16 @@
22 /**
 3+ * Generic synchronized Object/Element container.
34 *
 5+ * @class
 6+ * @constructor
47 * @extends {es.EventEmitter}
 8+ * @param typeName {String}
 9+ * @param listName {String}
510 * @param items {Array} List of items
6 - * @returns {es.Container}
 11+ * @property _typeName {String}
 12+ * @property _listName {String}
 13+ * @property _list {Array}
 14+ * @property $ {jQuery}
715 */
816 es.Container = function( typeName, listName, items ) {
917 es.EventEmitter.call( this );
Index: trunk/parsers/wikidom/lib/es/es.ListBlockList.js
@@ -1,5 +1,14 @@
22 /**
3 - * es.ListBlockList
 3+ * Number or bullet list.
 4+ *
 5+ * @class
 6+ * @constructor
 7+ * @extends {es.EventEmitter}
 8+ * @extends {es.Container}
 9+ * @param style {String} Style of list, either "number" or "bullet"
 10+ * @param items {Array} List of es.ListBlockItem objects to initialize list with
 11+ * @property style {String} Style of list
 12+ * @property items {Array} List of es.ListBlockItem objects
413 */
514 es.ListBlockList = function( style, items ) {
615 // Inheritance
Index: trunk/parsers/wikidom/lib/es/es.Selection.js
@@ -1,9 +1,14 @@
22 /**
33 * Content selection, a pair of locations.
44 *
 5+ * @class
 6+ * @constructor
57 * @param from {es.Location} Starting location
68 * @param to {es.Location} Ending location
7 - * @returns {es.Selection}
 9+ * @property from {es.Location}
 10+ * @property to {es.Location}
 11+ * @property start {es.Location}
 12+ * @property end {es.Location}
813 */
914 es.Selection = function( from, to ) {
1015 this.from = from;
Index: trunk/parsers/wikidom/lib/es/es.ListBlock.js
@@ -1,10 +1,14 @@
22 /**
33 * es.ListBlock
44 *
 5+ *
 6+ * @class
 7+ * @constructor
58 * @extends {es.Block}
69 * @param style {String} Type of list, either "number" or "bullet"
710 * @param items {Array} List of es.ListBlockItems to append initially to the root list
8 - * @return {es.ListBlock}
 11+ * @property list {es.ListBlockList}
 12+ * @property $ {jQuery}
913 */
1014 es.ListBlock = function( style, items ) {
1115 es.Block.call( this );
Index: trunk/parsers/wikidom/lib/es/es.Surface.js
@@ -1,8 +1,23 @@
22 /**
 3+ * Wikitext document editing surface.
34 *
4 - * @param $container
5 - * @param doc
6 - * @returns {Surface}
 5+ * @class
 6+ * @constructor
 7+ * @param $container {jQuery}
 8+ * @param doc {es.Document}
 9+ * @property $ {jQuery}
 10+ * @property doc {es.Document}
 11+ * @property location {es.Location}
 12+ * @property selection {es.Selection}
 13+ * @property initialHorizontalPosition {Integer}
 14+ * @property mouse {Object}
 15+ * @property keyboard {Object}
 16+ * @property $ranges {jQuery}
 17+ * @property $rangeStart {jQuery}
 18+ * @property $rangeFill {jQuery}
 19+ * @property $rangeEnd {jQuery}
 20+ * @property cursor {es.Cursor}
 21+ * @property $input {jQuery}
722 */
823 es.Surface = function( $container, doc ) {
924 var surface = this;
Index: trunk/parsers/wikidom/lib/es/es.Block.js
@@ -1,9 +1,13 @@
22 /**
 3+ * Document block.
 4+ *
35 * Base object for all blocks, providing basic shared functionality and stubs for required
46 * implementations.
57 *
 8+ * @class
 9+ * @constructor
610 * @extends {es.EventEmitter}
7 - * @returns {es.Block}
 11+ * @property document {es.Document}
812 */
913 es.Block = function() {
1014 es.EventEmitter.call( this );
Index: trunk/parsers/wikidom/lib/es/es.Range.js
@@ -1,9 +1,10 @@
22 /**
33 * Range of content.
44 *
 5+ * @class
 6+ * @constructor
57 * @param start {Integer} Starting point
68 * @param end {Integer} Ending point
7 - * @returns {es.Range}
89 * @property to {Integer}
910 * @property from {Integer}
1011 * @property start {Integer}

Status & tagging log