r93365 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93364‎ | r93365 | r93366 >
Date:05:55, 28 July 2011
Author:tparscal
Status:ok
Tags:
Comment:
Documentation and cleanup
Modified paths:
  • /trunk/parsers/wikidom/lib/es/es.Container.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/es/es.Container.js
@@ -7,6 +7,7 @@
88 * @param typeName {String}
99 * @param listName {String}
1010 * @param items {Array} List of items
 11+ * @emits "update" when items argument causes items to be appended
1112 * @property _typeName {String}
1213 * @property _listName {String}
1314 * @property _list {Array}
@@ -32,11 +33,12 @@
3334 this.append( items[i] );
3435 }
3536 }
36 -}
 37+};
3738
3839 /**
3940 * Gets the first item in the container.
4041 *
 42+ * @method
4143 * @returns {Object}
4244 */
4345 es.Container.prototype.first = function() {
@@ -46,6 +48,7 @@
4749 /**
4850 * Gets the last item in the container.
4951 *
 52+ * @method
5053 * @returns {Object}
5154 */
5255 es.Container.prototype.last = function() {
@@ -56,7 +59,11 @@
5760 /**
5861 * Adds an item to the end of the container.
5962 *
 63+ * Also inserts item's Element object to the DOM and adds a listener to its "update" events.
 64+ *
 65+ * @method
6066 * @param {Object} Item to append
 67+ * @emits "update"
6168 */
6269 es.Container.prototype.append = function( item ) {
6370 item[this._typeName] = this;
@@ -72,7 +79,11 @@
7380 /**
7481 * Adds an item to the beginning of the container.
7582 *
 83+ * Also inserts item's Element object to the DOM and adds a listener to its "update" events.
 84+ *
 85+ * @method
7686 * @param {Object} Item to prepend
 87+ * @emits "update"
7788 */
7889 es.Container.prototype.prepend = function( item ) {
7990 item[this._typeName] = this;
@@ -88,8 +99,12 @@
89100 /**
90101 * Adds an item to the container after an existing item.
91102 *
 103+ * Also inserts item's Element object to the DOM and adds a listener to its "update" events.
 104+ *
 105+ * @method
92106 * @param item {Object} Item to insert
93107 * @param before {Object} Item to insert before, if null then item will be inserted at the end
 108+ * @emits "update"
94109 */
95110 es.Container.prototype.insertBefore = function( item, before ) {
96111 item[this._typeName] = this;
@@ -108,8 +123,13 @@
109124 };
110125 /**
111126 * Adds an item to the container after an existing item.
 127+ *
 128+ * Also inserts item's Element object to the DOM and adds a listener to its "update" events.
 129+ *
 130+ * @method
112131 * @param item {Object} Item to insert
113132 * @param after {Object} Item to insert after, if null then item will be inserted at the end
 133+ * @emits "update"
114134 */
115135 es.Container.prototype.insertAfter = function( item, after ) {
116136 item[this._typeName] = this;
@@ -130,7 +150,11 @@
131151 /**
132152 * Removes an item from the container.
133153 *
 154+ * Also detaches item's Element object to the DOM and removes all listeners its "update" events.
 155+ *
 156+ * @method
134157 * @param {Object} Item to remove
 158+ * @emits "update"
135159 */
136160 es.Container.prototype.remove = function( item ) {
137161 item.removeAllListeners( 'update' );

Status & tagging log