r114041 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114040‎ | r114041 | r114042 >
Date:22:20, 16 March 2012
Author:rmoen
Status:deferred
Tags:
Comment:
make clear button tool work with annotate method in ce surface
Modified paths:
  • /trunk/extensions/VisualEditor/modules/ve/ui/tools/ve.ui.ClearButtonTool.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/ve/ui/tools/ve.ui.ClearButtonTool.js
@@ -19,16 +19,11 @@
2020 /* Methods */
2121
2222 ve.ui.ClearButtonTool.prototype.onClick = function() {
23 - var surfaceView = this.toolbar.getSurfaceView(),
24 - surfaceModel = surfaceView.getModel(),
25 - tx =surfaceModel.getDocument().prepareContentAnnotation(
26 - surfaceView.currentSelection,
27 - 'clear',
28 - this.pattern
29 - );
30 - surfaceModel.transact( tx );
 23+ var surfaceView = this.toolbar.getSurfaceView();
 24+
 25+ surfaceView.annotate( 'clear', this.pattern );
3126 surfaceView.clearInsertionAnnotations();
32 - surfaceView.getContextView().closeInspector();
 27+ surfaceView.contextView.closeInspector();
3328 };
3429
3530 ve.ui.ClearButtonTool.prototype.updateState = function( annotations ) {

Status & tagging log