Merge "Fix "Add new image" button in the gallery dialog"

This commit is contained in:
jenkins-bot 2016-12-01 00:25:49 +00:00 committed by Gerrit Code Review
commit 551b6db912
2 changed files with 38 additions and 9 deletions

View file

@ -42,7 +42,8 @@ ve.ui.MWGalleryDialog.static.modelClasses = [ ve.dm.MWGalleryNode ];
* @inheritdoc * @inheritdoc
*/ */
ve.ui.MWGalleryDialog.prototype.initialize = function () { ve.ui.MWGalleryDialog.prototype.initialize = function () {
var imagesCard, optionsCard, menuLayout, menuPanel, var imagesCard, optionsCard, menuLayout,
innerMenuLayout, innerMenuPanel, innerContentPanel,
modeField, captionField, widthsField, heightsField, modeField, captionField, widthsField, heightsField,
perrowField, showFilenameField, classesField, stylesField; perrowField, showFilenameField, classesField, stylesField;
@ -79,12 +80,22 @@ ve.ui.MWGalleryDialog.prototype.initialize = function () {
// Images card // Images card
// General layout // General layout
menuLayout = new OO.ui.MenuLayout(); menuLayout = new OO.ui.MenuLayout( {
menuPanel = new OO.ui.PanelLayout( { classes: [ 've-ui-mwGalleryDialog-menuLayout' ]
} );
innerMenuLayout = new OO.ui.MenuLayout( {
menuPosition: 'bottom',
classes: [ 've-ui-mwGalleryDialog-innerMenuLayout' ]
} );
innerMenuPanel = new OO.ui.PanelLayout( {
padded: true, padded: true,
expanded: true, expanded: true,
scrollable: true scrollable: true
} ); } );
innerContentPanel = new OO.ui.PanelLayout( {
padded: true,
expanded: true
} );
this.editPanel = new OO.ui.PanelLayout( { this.editPanel = new OO.ui.PanelLayout( {
padded: true, padded: true,
expanded: true, expanded: true,
@ -216,13 +227,20 @@ ve.ui.MWGalleryDialog.prototype.initialize = function () {
} ); } );
// Append everything // Append everything
menuLayout.$menu.append( innerMenuLayout.$menu.append(
menuPanel.$element.append( innerContentPanel.$element.append(
this.$emptyGalleryMessage,
this.galleryGroup.$element,
this.showSearchPanelButton.$element this.showSearchPanelButton.$element
) )
); );
innerMenuLayout.$content.append(
innerMenuPanel.$element.append(
this.$emptyGalleryMessage,
this.galleryGroup.$element
)
);
menuLayout.$menu.append(
innerMenuLayout.$element
);
menuLayout.$content.append( menuLayout.$content.append(
this.editPanel.$element.append( this.editPanel.$element.append(
this.$highlightedImage, this.$highlightedImage,

View file

@ -41,13 +41,24 @@
margin-top: 0.5em; margin-top: 0.5em;
} }
.ve-ui-mwGalleryDialog .oo-ui-menuLayout-menu { .ve-ui-mwGalleryDialog-menuLayout > .oo-ui-menuLayout-menu {
width: 14em; width: 14em;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
border-right: 1px solid #ccc; border-right: 1px solid #ccc;
} }
.ve-ui-mwGalleryDialog .oo-ui-menuLayout-content { .ve-ui-mwGalleryDialog-menuLayout > .oo-ui-menuLayout-content {
left: 14em; left: 14em;
right: 14em; right: 14em;
} }
.ve-ui-mwGalleryDialog-innerMenuLayout > .oo-ui-menuLayout-content {
bottom: 5em;
}
.ve-ui-mwGalleryDialog-innerMenuLayout > .oo-ui-menuLayout-menu {
height: 5em;
border-top: 1px solid #e6e6e6;
box-shadow: 0 -1px 0 0 rgba( 0, 0, 0, 0.05 ); /* stylelint-disable-line no-unsupported-browser-features */
text-align: center;
}