r105638 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105637‎ | r105638 | r105639 >
Date:02:00, 9 December 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Fixed logic for popping up inspector only with selection
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/tools/es.AnnotationButtonTool.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/tools/es.AnnotationButtonTool.js
@@ -23,10 +23,13 @@
2424 es.AnnotationButtonTool.prototype.onClick = function() {
2525 var surfaceView = this.toolbar.getSurfaceView();
2626 if ( this.inspector ) {
27 - if ( !this.active && surfaceView.getModel().getSelection().getLength() ) {
 27+ if ( surfaceView.getModel().getSelection().getLength() ) {
 28+ this.toolbar.getSurfaceView().getContextView().openInspector( this.inspector );
 29+ } else {
 30+ if ( !this.active ) {
2831 surfaceView.annotate( 'set', this.annotation );
 32+ }
2933 }
30 - this.toolbar.getSurfaceView().getContextView().openInspector( this.inspector );
3134 } else {
3235 surfaceView.annotate( this.active ? 'clear' : 'set', this.annotation );
3336 }

Status & tagging log