diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js index 8696e56b4b..2ca281be58 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js @@ -125,6 +125,7 @@ ve.ui.MWGalleryDialog.prototype.initialize = function () { } ); this.$highlightedImage = $( '
' ) .addClass( 've-ui-mwGalleryDialog-highlighted-image' ); + this.filenameFieldset.$element.append( this.$highlightedImage ); // TODO: make into a ve.ui.MWTargetWidget once Parsoid handles galleries this.highlightedCaptionInput = new OO.ui.TextInputWidget( { placeholder: ve.msg( 'visualeditor-mwgallerydialog-image-caption-placeholder' ), @@ -133,8 +134,7 @@ ve.ui.MWGalleryDialog.prototype.initialize = function () { } ); this.highlightedCaptionFieldset = new OO.ui.FieldsetLayout( { label: ve.msg( 'visualeditor-dialog-media-content-section' ), - icon: 'parameter', - classes: [ 've-ui-mwGalleryDialog-caption-fieldset' ] + icon: 'parameter' } ); this.highlightedCaptionFieldset.$element.append( this.highlightedCaptionInput.$element ); this.removeButton = new OO.ui.ButtonWidget( { @@ -255,7 +255,6 @@ ve.ui.MWGalleryDialog.prototype.initialize = function () { ); menuLayout.$content.append( this.editPanel.$element.append( - this.$highlightedImage, this.filenameFieldset.$element, this.highlightedCaptionFieldset.$element, this.removeButton.$element diff --git a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css index c618409f24..ad7a687bbd 100644 --- a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css +++ b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWGalleryDialog.css @@ -27,9 +27,9 @@ box-shadow: inset 0 0 0 0.1em #36c; } -/* HACK: Override ooui specific 2em top margin */ -.ve-ui-mwGalleryDialog-caption-fieldset.oo-ui-labelElement.oo-ui-fieldsetLayout { - margin-top: 0; +.ve-ui-mwGalleryDialog .oo-ui-fieldsetLayout + .oo-ui-fieldsetLayout, +.ve-ui-mwGalleryDialog-remove-button { + margin-top: 1em; } .ve-ui-mwGalleryDialog-highlighted-image { @@ -40,11 +40,6 @@ background-repeat: no-repeat; background-position: 50% 50%; background-size: contain; - margin-bottom: 0.5em; -} - -.ve-ui-mwGalleryDialog-remove-button { - margin-top: 0.5em; } .ve-ui-mwGalleryDialog-menuLayout > .oo-ui-menuLayout-menu {