r105265 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105264‎ | r105265 | r105266 >
Date:00:49, 6 December 2011
Author:inez
Status:deferred
Tags:
Comment:
Fix for turning single elements in tables cells into listItems
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/tools/es.ListButtonTool.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/tools/es.ListButtonTool.js
@@ -75,16 +75,18 @@
7676 }
7777 data = data.concat( [ { 'type': '/list' } ] );
7878
79 - tx = this.toolbar.surfaceView.model.getDocument().prepareRemoval(
80 - new es.Range( insertAt, insertAt+removeLength)
81 - );
82 - this.toolbar.surfaceView.model.transact( tx );
83 -
8479 tx = this.toolbar.surfaceView.model.getDocument().prepareInsertion(
8580 insertAt,
8681 data
8782 );
8883 this.toolbar.surfaceView.model.transact( tx );
 84+
 85+ tx = this.toolbar.surfaceView.model.getDocument().prepareRemoval(
 86+ new es.Range( insertAt+data.length, insertAt+removeLength+data.length)
 87+ );
 88+ this.toolbar.surfaceView.model.transact( tx );
 89+
 90+
8991 }
9092 };
9193

Status & tagging log