[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Pass $overlay to FieldsetLayout and FieldLayout in various p...

2017-02-28 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/338041 )

Change subject: Pass $overlay to FieldsetLayout and FieldLayout in various 
places
..


Pass $overlay to FieldsetLayout and FieldLayout in various places

We now use dialog's overlay in every case where we have a FieldsetLayout
or a FieldLayout with a help popup inside a dialog.

Bug: T100571
Change-Id: I8bd0ed430637feca63ec0f13cb7e1e1c659391a5
---
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js
M modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js
M modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
M modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
5 files changed, 19 insertions(+), 6 deletions(-)

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



diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
index 00d460d..ce26902 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
@@ -244,6 +244,7 @@
importRules: this.constructor.static.getImportRules()
} );
this.captionFieldset = new OO.ui.FieldsetLayout( {
+   $overlay: this.$overlay,
label: ve.msg( 'visualeditor-dialog-media-content-section' ),
help: ve.msg( 'visualeditor-dialog-media-content-section-help' 
),
icon: 'parameter',
@@ -253,6 +254,7 @@
 
// Alt text
altTextFieldset = new OO.ui.FieldsetLayout( {
+   $overlay: this.$overlay,
label: ve.msg( 'visualeditor-dialog-media-alttext-section' ),
help: ve.msg( 'visualeditor-dialog-media-alttext-section-help' 
),
icon: 'parameter'
@@ -273,12 +275,14 @@
 
this.positionCheckbox = new OO.ui.CheckboxInputWidget();
positionField = new OO.ui.FieldLayout( this.positionCheckbox, {
+   $overlay: this.$overlay,
align: 'inline',
label: ve.msg( 'visualeditor-dialog-media-position-checkbox' ),
help: ve.msg( 
'visualeditor-dialog-media-position-checkbox-help' )
} );
 
positionFieldset = new OO.ui.FieldsetLayout( {
+   $overlay: this.$overlay,
label: ve.msg( 'visualeditor-dialog-media-position-section' ),
help: ve.msg( 'visualeditor-dialog-media-position-section-help' 
),
icon: 'parameter'
@@ -292,6 +296,7 @@
 
// Type
this.typeFieldset = new OO.ui.FieldsetLayout( {
+   $overlay: this.$overlay,
label: ve.msg( 'visualeditor-dialog-media-type-section' ),
help: ve.msg( 'visualeditor-dialog-media-type-section-help' ),
icon: 'parameter'
@@ -337,6 +342,7 @@
 
// Size
this.sizeFieldset = new OO.ui.FieldsetLayout( {
+   $overlay: this.$overlay,
label: ve.msg( 'visualeditor-dialog-media-size-section' ),
icon: 'parameter',
help: ve.msg( 'visualeditor-dialog-media-size-section-help' )
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js
index fd204d4..a0520d2 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js
@@ -64,11 +64,8 @@
this.panels = new OO.ui.StackLayout();
this.bookletLayout = new OO.ui.BookletLayout( { outlined: true } );
this.categoriesPage = new ve.ui.MWCategoriesPage( 'categories', { 
$overlay: this.$overlay } );
-   this.settingsPage = new ve.ui.MWSettingsPage(
-   'settings',
-   { $overlay: this.$overlay }
-   );
-   this.advancedSettingsPage = new ve.ui.MWAdvancedSettingsPage( 
'advancedSettings' );
+   this.settingsPage = new ve.ui.MWSettingsPage( 'settings', { $overlay: 
this.$overlay } );
+   this.advancedSettingsPage = new ve.ui.MWAdvancedSettingsPage( 
'advancedSettings', { $overlay: this.$overlay } );
this.languagesPage = new ve.ui.MWLanguagesPage( 'languages' );
this.templatesUsedPage = new ve.ui.MWTemplatesUsedPage( 'templatesUsed' 
);
 
diff --git a/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js
index 0e13cd4..ef8aeac 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js
@@ -14,8 +14,9 @@
  * @constructor
  * @param {string} name Unique symbolic name of page
  * @param {Object} [config] Configuration options
+ * @cfg {jQuery} [$overlay] Overlay to render dropdowns in
  */
-ve.ui.MWAdvancedSettingsPage = function VeUiMWAdvancedSettingsPage() {
+ve.ui.MWAdvancedSettingsPage = function VeUiMWAdvancedSettingsPage( name, 
config ) {
var advanc

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Pass $overlay to FieldsetLayout and FieldLayout in various p...

2017-02-15 Thread Code Review
Bartosz DziewoƄski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/338041 )

Change subject: Pass $overlay to FieldsetLayout and FieldLayout in various 
places
..

Pass $overlay to FieldsetLayout and FieldLayout in various places

We now use dialog's overlay in every case where we have a FieldsetLayout
or a FieldLayout with a help popup inside a dialog.

Bug: T100571
Change-Id: I8bd0ed430637feca63ec0f13cb7e1e1c659391a5
---
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js
M modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js
M modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
M modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
5 files changed, 19 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/41/338041/1

diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
index 00d460d..ce26902 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
@@ -244,6 +244,7 @@
importRules: this.constructor.static.getImportRules()
} );
this.captionFieldset = new OO.ui.FieldsetLayout( {
+   $overlay: this.$overlay,
label: ve.msg( 'visualeditor-dialog-media-content-section' ),
help: ve.msg( 'visualeditor-dialog-media-content-section-help' 
),
icon: 'parameter',
@@ -253,6 +254,7 @@
 
// Alt text
altTextFieldset = new OO.ui.FieldsetLayout( {
+   $overlay: this.$overlay,
label: ve.msg( 'visualeditor-dialog-media-alttext-section' ),
help: ve.msg( 'visualeditor-dialog-media-alttext-section-help' 
),
icon: 'parameter'
@@ -273,12 +275,14 @@
 
this.positionCheckbox = new OO.ui.CheckboxInputWidget();
positionField = new OO.ui.FieldLayout( this.positionCheckbox, {
+   $overlay: this.$overlay,
align: 'inline',
label: ve.msg( 'visualeditor-dialog-media-position-checkbox' ),
help: ve.msg( 
'visualeditor-dialog-media-position-checkbox-help' )
} );
 
positionFieldset = new OO.ui.FieldsetLayout( {
+   $overlay: this.$overlay,
label: ve.msg( 'visualeditor-dialog-media-position-section' ),
help: ve.msg( 'visualeditor-dialog-media-position-section-help' 
),
icon: 'parameter'
@@ -292,6 +296,7 @@
 
// Type
this.typeFieldset = new OO.ui.FieldsetLayout( {
+   $overlay: this.$overlay,
label: ve.msg( 'visualeditor-dialog-media-type-section' ),
help: ve.msg( 'visualeditor-dialog-media-type-section-help' ),
icon: 'parameter'
@@ -337,6 +342,7 @@
 
// Size
this.sizeFieldset = new OO.ui.FieldsetLayout( {
+   $overlay: this.$overlay,
label: ve.msg( 'visualeditor-dialog-media-size-section' ),
icon: 'parameter',
help: ve.msg( 'visualeditor-dialog-media-size-section-help' )
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js
index fd204d4..a0520d2 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js
@@ -64,11 +64,8 @@
this.panels = new OO.ui.StackLayout();
this.bookletLayout = new OO.ui.BookletLayout( { outlined: true } );
this.categoriesPage = new ve.ui.MWCategoriesPage( 'categories', { 
$overlay: this.$overlay } );
-   this.settingsPage = new ve.ui.MWSettingsPage(
-   'settings',
-   { $overlay: this.$overlay }
-   );
-   this.advancedSettingsPage = new ve.ui.MWAdvancedSettingsPage( 
'advancedSettings' );
+   this.settingsPage = new ve.ui.MWSettingsPage( 'settings', { $overlay: 
this.$overlay } );
+   this.advancedSettingsPage = new ve.ui.MWAdvancedSettingsPage( 
'advancedSettings', { $overlay: this.$overlay } );
this.languagesPage = new ve.ui.MWLanguagesPage( 'languages' );
this.templatesUsedPage = new ve.ui.MWTemplatesUsedPage( 'templatesUsed' 
);
 
diff --git a/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js
index 0e13cd4..ef8aeac 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js
@@ -14,8 +14,9 @@
  * @constructor
  * @param {string} name Unique symbolic name of page
  * @param {Object} [config] Configuration options
+ * @cfg {jQuery} [$overlay] Overlay to render dropdowns in
  */
-ve.ui.MWAdvancedSettingsPage = function VeUiMWAdvancedSettingsPage() {
+ve.ui.MWAdvancedSettingsPage = function VeUiMWAdvancedSettingsPage( name, 
con