r105470 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105469‎ | r105470 | r105471 >
Date:22:37, 7 December 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Shortened the names of operations
Modified paths:
  • /trunk/extensions/VisualEditor/modules/sandbox/sandbox.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/sandbox/sandbox.js
@@ -492,7 +492,7 @@
493493 while ( --i >= end ) {
494494 action = surfaceModel.history[i];
495495 if ( action instanceof es.Range ) {
496 - events += '<div>select( ' + action.from + ', ' + action.to + ' )</div>';
 496+ events += '<div>sel( ' + action.from + ', ' + action.to + ' )</div>';
497497 } else {
498498 ops = action.getOperations().slice( 0 );
499499 for ( var j = 0; j < ops.length; j++ ) {
@@ -506,7 +506,7 @@
507507 if ( typeof data !== 'string' && typeof data !== 'number' ) {
508508 data = '-';
509509 }
510 - ops[j] = ops[j].type + '( ' + data + ' )';
 510+ ops[j] = ops[j].type.substr( 0, 3 ) + '( ' + data + ' )';
511511 }
512512 events += '<div>' + ops.join( ', ' ) + '</div>';
513513 }
@@ -540,6 +540,7 @@
541541 } );
542542 } );
543543
 544+
544545 surfaceModel.on( 'transact', function() {
545546 if ( currentMode ) {
546547 currentMode.update.call( currentMode );

Status & tagging log