r105509 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105508‎ | r105509 | r105510 >
Date:01:17, 8 December 2011
Author:inez
Status:deferred
Tags:
Comment:
Temporary fix for transact method to accept array of transactions.
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/models/es.SurfaceModel.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/models/es.SurfaceModel.js
@@ -120,6 +120,14 @@
121121 * (such as when replacing - delete, then insert)
122122 */
123123 es.SurfaceModel.prototype.transact = function( transaction, isPartial ) {
 124+
 125+ if(es.isArray(transaction)) {
 126+ for( var i = 0; i < transaction.length; i++ ) {
 127+ this.transact( transaction[i] );
 128+ }
 129+ return;
 130+ }
 131+
124132 // console.log( 'tx:' + $.map( transaction.getOperations(), function(tx) { return tx.type; } ).join(",")
125133 // + ' isPartial:' + isPartial );
126134 this.doc.commit( transaction );

Follow-up revisions

RevisionCommit summaryAuthorDate
r105511Revert r105509 and r105507 - taken approach is not gonna workinez03:14, 8 December 2011

Status & tagging log