[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Follow-up Iaa41c49e2f: Fix `this` context in window action

2016-12-03 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Follow-up Iaa41c49e2f: Fix `this` context in window action
..


Follow-up Iaa41c49e2f: Fix `this` context in window action

Change-Id: Ifa4b032cfd304a33a110bfaf12019a83b0801443
---
M src/ui/actions/ve.ui.WindowAction.js
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/ui/actions/ve.ui.WindowAction.js 
b/src/ui/actions/ve.ui.WindowAction.js
index 966448d..cb67757 100644
--- a/src/ui/actions/ve.ui.WindowAction.js
+++ b/src/ui/actions/ve.ui.WindowAction.js
@@ -47,6 +47,7 @@
 ve.ui.WindowAction.prototype.open = function ( name, data, action ) {
var currentInspector, inspectorWindowManager, fragmentPromise,
originalFragment, text,
+   windowAction = this,
windowType = this.getWindowType( name ),
windowManager = windowType && this.getWindowManager( windowType 
),
currentWindow = windowManager.getCurrentWindow(),
@@ -94,7 +95,7 @@
 
// If we're opening a dialog, close all inspectors first
if ( windowType === 'dialog' ) {
-   inspectorWindowManager = this.getWindowManager( 
'inspector' );
+   inspectorWindowManager = windowAction.getWindowManager( 
'inspector' );
currentInspector = 
inspectorWindowManager.getCurrentWindow();
if ( currentInspector ) {
autoClosePromises.push( 
inspectorWindowManager.closeWindow( currentInspector ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa4b032cfd304a33a110bfaf12019a83b0801443
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Tchanders 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Follow-up Iaa41c49e2f: Fix `this` context in window action

2016-12-03 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Follow-up Iaa41c49e2f: Fix `this` context in window action
..

Follow-up Iaa41c49e2f: Fix `this` context in window action

Change-Id: Ifa4b032cfd304a33a110bfaf12019a83b0801443
---
M src/ui/actions/ve.ui.WindowAction.js
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/01/325101/1

diff --git a/src/ui/actions/ve.ui.WindowAction.js 
b/src/ui/actions/ve.ui.WindowAction.js
index 966448d..cb67757 100644
--- a/src/ui/actions/ve.ui.WindowAction.js
+++ b/src/ui/actions/ve.ui.WindowAction.js
@@ -47,6 +47,7 @@
 ve.ui.WindowAction.prototype.open = function ( name, data, action ) {
var currentInspector, inspectorWindowManager, fragmentPromise,
originalFragment, text,
+   windowAction = this,
windowType = this.getWindowType( name ),
windowManager = windowType && this.getWindowManager( windowType 
),
currentWindow = windowManager.getCurrentWindow(),
@@ -94,7 +95,7 @@
 
// If we're opening a dialog, close all inspectors first
if ( windowType === 'dialog' ) {
-   inspectorWindowManager = this.getWindowManager( 
'inspector' );
+   inspectorWindowManager = windowAction.getWindowManager( 
'inspector' );
currentInspector = 
inspectorWindowManager.getCurrentWindow();
if ( currentInspector ) {
autoClosePromises.push( 
inspectorWindowManager.closeWindow( currentInspector ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa4b032cfd304a33a110bfaf12019a83b0801443
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits