Mooeypoo has uploaded a new change for review.

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

Change subject: Emit change event when dimensions change in MediaSizeWidget
......................................................................

Emit change event when dimensions change in MediaSizeWidget

Whether the dimensions are valid or not, the 'change' event should
be emitted when the dimension inputs are changed. This will cause
the dialog to revalidate the size widget in general and hide or
show the 'apply' button accordingly.

Bug: 70861
Change-Id: Idb82d597d5b2b6664401208a54d33d26edbf6d31
---
M src/ui/widgets/ve.ui.MediaSizeWidget.js
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/84/164784/1

diff --git a/src/ui/widgets/ve.ui.MediaSizeWidget.js 
b/src/ui/widgets/ve.ui.MediaSizeWidget.js
index db1123e..2093196 100644
--- a/src/ui/widgets/ve.ui.MediaSizeWidget.js
+++ b/src/ui/widgets/ve.ui.MediaSizeWidget.js
@@ -193,6 +193,7 @@
  * the value is numeric. Invoke validation for every change.
  * @param {string} type The input that was updated, 'width' or 'height'
  * @param {string} value The new value of the input
+ * @fires change
  */
 ve.ui.MediaSizeWidget.prototype.onDimensionsChange = function ( type, value ) {
        var dimensions = {};
@@ -208,6 +209,9 @@
                        this.validateDimensions();
                }
        }
+
+       // Emit change event
+       this.emit( 'change', this.currentDimensions );
 };
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb82d597d5b2b6664401208a54d33d26edbf6d31
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/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