Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/197378

Change subject: Fix ve.ui.ToolbarDialogTool documentation
......................................................................

Fix ve.ui.ToolbarDialogTool documentation

Change-Id: I3da9b57c6aa5f779d729d46546192cc066dfa69e
---
M src/ui/tools/ve.ui.ToolbarDialogTool.js
1 file changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/78/197378/1

diff --git a/src/ui/tools/ve.ui.ToolbarDialogTool.js 
b/src/ui/tools/ve.ui.ToolbarDialogTool.js
index bd5172f..f721ef7 100644
--- a/src/ui/tools/ve.ui.ToolbarDialogTool.js
+++ b/src/ui/tools/ve.ui.ToolbarDialogTool.js
@@ -27,6 +27,15 @@
 
 ve.ui.ToolbarDialogTool.static.deactivateOnSelect = false;
 
+/**
+ * Name of the associated window
+ *
+ * The tool will display as active only if this window is open
+ *
+ * @static
+ * @property {string}
+ * @inheritable
+ */
 ve.ui.ToolbarDialogTool.static.activeWindow = null;
 
 /* Methods */
@@ -37,7 +46,8 @@
 ve.ui.ToolbarDialogTool.prototype.onUpdateState = function () {
        // Parent method
        ve.ui.ToolbarDialogTool.super.prototype.onUpdateState.apply( this, 
arguments );
-       // Never show the tool as active
+
+       // Show the tool as active if its associated window is open
        var currentWindow = 
this.toolbar.getSurface().getToolbarDialogs().currentWindow;
        this.setActive( currentWindow && currentWindow.constructor.static.name 
=== this.constructor.static.activeWindow );
 };

-- 
To view, visit https://gerrit.wikimedia.org/r/197378
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3da9b57c6aa5f779d729d46546192cc066dfa69e
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to