Mooeypoo has uploaded a new change for review.

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

Change subject: Fix border checkbox
......................................................................

Fix border checkbox

Make sure border is enabled for unframed types and disabled for
framed images.

Change-Id: I716e9bc4140fbc09aac52930d1dd8213f31617a3
---
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js
1 file changed, 9 insertions(+), 2 deletions(-)


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

diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js
index bde1dd1..fadbe71 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js
@@ -363,12 +363,19 @@
                        // enforce any max size
                        this.scalable.setEnforcedMax( false );
                }
+       } else {
+               // Don't limit maximum dimensions on basic and frameless images
+               this.scalable.setEnforcedMax( false );
+       }
+
+       // Disable border checkbox for framed images
+       // According to documentation:
+       // https://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax#Border
+       if ( selectedType === 'frame' ) {
                // Disable border option
                this.borderCheckbox.setDisabled( true );
                this.borderCheckbox.setValue( false );
        } else {
-               // Don't limit maximum dimensions on basic and frameless images
-               this.scalable.setEnforcedMax( false );
                // Enable border option
                this.borderCheckbox.setDisabled( false );
        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I716e9bc4140fbc09aac52930d1dd8213f31617a3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <mor...@gmail.com>

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

Reply via email to