mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 08:34:54 +00:00
Listen to widget changes in MediaDialog
Attach event listener to the alternate text and the media size widget in the MediaDialog, so that when either of those are changed the 'Apply Changes' button is enabled. Related to I88c3f3dcc7667b3ffdd2a8a8433cb47b82ba1531 Bug: 67684 Change-Id: I03efbed2f9b2909b055d96b9ae1e27b6d5e2bdbf
This commit is contained in:
parent
e5fba68036
commit
2a114815ab
|
@ -374,6 +374,7 @@ ve.ui.MWMediaDialog.prototype.initialize = function () {
|
|||
this.positionInput.connect( this, { 'choose': 'onPositionInputChoose' } );
|
||||
this.typeInput.connect( this, { 'choose': 'onTypeInputChoose' } );
|
||||
this.search.connect( this, { 'select': 'onSearchSelect' } );
|
||||
this.altTextInput.connect( this, { 'change': 'setChanged' } );
|
||||
|
||||
// Panel classes
|
||||
this.mediaSearchPanel.$element.addClass( 've-ui-mwMediaDialog-panel-search' );
|
||||
|
@ -735,6 +736,7 @@ ve.ui.MWMediaDialog.prototype.setImageModel = function ( node ) {
|
|||
this.sizeErrorLabel.$element.hide();
|
||||
this.sizeWidget.setScalable( this.imageModel.getScalable() );
|
||||
this.sizeWidget.connect( this, { 'changeSizeType': 'setChanged' } );
|
||||
this.sizeWidget.connect( this, { 'change': 'setChanged' } );
|
||||
|
||||
// Initialize size
|
||||
this.sizeWidget.setSizeType(
|
||||
|
|
Loading…
Reference in a new issue