GalleryDialog: Re-order and make margins even

Move image inside filename fieldset, and make
margins between fieldsets and button 1em.

Change-Id: I7f6789043f873f9da4e960c94e22a7ee096a352f
This commit is contained in:
Ed Sanders 2017-06-23 12:12:45 -07:00
parent 9eb637e933
commit 15af26876a
2 changed files with 5 additions and 11 deletions

View file

@ -125,6 +125,7 @@ ve.ui.MWGalleryDialog.prototype.initialize = function () {
} );
this.$highlightedImage = $( '<div>' )
.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

View file

@ -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 {