Apply 'original size' to images and enable apply button in ve-MW

Depends on core change I243cff5a2d56db48882c343a8bb91153edd96a43

Bug: 66863
Change-Id: If7914c254b70f4b2b9e2788f5755550eb020b21c
This commit is contained in:
Moriel Schottlender 2014-07-08 01:42:31 -04:00
parent f30c4d6e8d
commit c2c046620b

View file

@ -697,6 +697,7 @@ ve.ui.MWMediaDialog.prototype.setImageModel = function ( node ) {
if ( this.imageModel ) {
this.imageModel.disconnect( this );
this.sizeWidget.disconnect( this );
}
dir = node.getDocument() ?
@ -709,7 +710,8 @@ ve.ui.MWMediaDialog.prototype.setImageModel = function ( node ) {
// Events
this.imageModel.connect( this, {
'alignmentChange': 'onImageModelAlignmentChange',
'typeChange': 'onImageModelTypeChange'
'typeChange': 'onImageModelTypeChange',
'sizeDefaultChange': 'setChanged'
} );
// Check if there are changes to apply
@ -725,6 +727,7 @@ ve.ui.MWMediaDialog.prototype.setImageModel = function ( node ) {
// Size widget
this.sizeErrorLabel.$element.hide();
this.sizeWidget.setScalable( this.imageModel.getScalable() );
this.sizeWidget.connect( this, { 'changeSizeType': 'setChanged' } );
// Initialize size
this.sizeWidget.setSizeType(