[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Disable heights option in gallery dialog when mode is slideshow

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

Change subject: Disable heights option in gallery dialog when mode is slideshow
..


Disable heights option in gallery dialog when mode is slideshow

Also disable relevant fields the first time the dialog is
opened, not just when the dropdown is changed.

Bug: T151482
Bug: T151512
Change-Id: Ic511e1832a9fcaaeaed71c1d495aecc65fdd1d3b
---
M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
index 63726c3..ee2c407 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
@@ -339,6 +339,9 @@
this.classesInput.setValue( classes );
this.stylesInput.setValue( styles );
 
+   // Disable fields depending on mode
+   this.onModeDropdownChange();
+
// Add event handlers
this.indexLayout.connect( this, { set: 
'updateDialogSize' } );
this.searchWidget.getResults().connect( this, { choose: 
'onSearchResultsChoose' } );
@@ -550,6 +553,9 @@
 
this.widthsInput.setDisabled( disabled );
this.perrowInput.setDisabled( disabled );
+
+   // heights is only ignored in slideshow mode
+   this.heightsInput.setDisabled( mode === 'slideshow' );
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic511e1832a9fcaaeaed71c1d495aecc65fdd1d3b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Tchanders 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Disable heights option in gallery dialog when mode is slideshow

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

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

Change subject: Disable heights option in gallery dialog when mode is slideshow
..

Disable heights option in gallery dialog when mode is slideshow

Bug: T151482
Change-Id: Ic511e1832a9fcaaeaed71c1d495aecc65fdd1d3b
---
M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
index 63726c3..9cbd3a9 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
@@ -550,6 +550,9 @@
 
this.widthsInput.setDisabled( disabled );
this.perrowInput.setDisabled( disabled );
+
+   // heights is only ignored in slideshow mode
+   this.heightsInput.setDisabled( mode === 'slideshow' );
 };
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic511e1832a9fcaaeaed71c1d495aecc65fdd1d3b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Tchanders 

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