r101035 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101034‎ | r101035 | r101036 >
Date:20:20, 27 October 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Reorganized methods
Modified paths:
  • /trunk/parsers/wikidom/lib/hype/bases/es.ModelNode.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/hype/bases/es.ModelNode.js
@@ -207,6 +207,31 @@
208208 };
209209
210210 /**
 211+ * Sets the root node to this and all of it's children.
 212+ *
 213+ * @method
 214+ * @param {es.ModelNode} root Node to use as root
 215+ */
 216+es.ModelNode.prototype.setRoot = function( root ) {
 217+ this.root = root;
 218+ for ( var i = 0; i < this.length; i++ ) {
 219+ this[i].setRoot( root );
 220+ }
 221+};
 222+
 223+/**
 224+ * Clears the root node from this and all of it's children.
 225+ *
 226+ * @method
 227+ */
 228+es.ModelNode.prototype.clearRoot = function() {
 229+ this.root = null;
 230+ for ( var i = 0; i < this.length; i++ ) {
 231+ this[i].clearRoot();
 232+ }
 233+};
 234+
 235+/**
211236 * Attaches this node to another as a child.
212237 *
213238 * @method
@@ -234,31 +259,6 @@
235260 };
236261
237262 /**
238 - * Sets the root node to this and all of it's children.
239 - *
240 - * @method
241 - * @param {es.ModelNode} root Node to use as root
242 - */
243 -es.ModelNode.prototype.setRoot = function( root ) {
244 - this.root = root;
245 - for ( var i = 0; i < this.length; i++ ) {
246 - this[i].setRoot( root );
247 - }
248 -};
249 -
250 -/**
251 - * Clears the root node from this and all of it's children.
252 - *
253 - * @method
254 - */
255 -es.ModelNode.prototype.clearRoot = function() {
256 - this.root = null;
257 - for ( var i = 0; i < this.length; i++ ) {
258 - this[i].clearRoot();
259 - }
260 -};
261 -
262 -/**
263263 * Creates a view for this node.
264264 *
265265 * @method

Status & tagging log