Use padding on save dialog panels so scrollbar is correctly positioned

Previously was using a margin so the scrollbar floated 1.25em from the
edge of the dialog.

Remove Apex-specific hack.

Change-Id: Idc953c492a6527a9216b77256d406fc3435ec0a9
This commit is contained in:
Ed Sanders 2015-01-30 18:14:07 -08:00
parent 7ff36511e4
commit e0d9b062d4
2 changed files with 16 additions and 13 deletions

View file

@ -355,6 +355,7 @@ ve.ui.MWSaveDialog.prototype.initialize = function () {
this.savePanel = new OO.ui.PanelLayout( {
$: this.$,
scrollable: true,
padded: true,
classes: ['ve-ui-mwSaveDialog-savePanel']
} );
@ -407,7 +408,11 @@ ve.ui.MWSaveDialog.prototype.initialize = function () {
);
// Review panel
this.reviewPanel = new OO.ui.PanelLayout( { $: this.$, scrollable: true } );
this.reviewPanel = new OO.ui.PanelLayout( {
$: this.$,
scrollable: true,
padded: true
} );
this.$reviewViewer = this.$( '<div>' ).addClass( 've-ui-mwSaveDialog-viewer' );
this.$reviewEditSummary = this.$( '<span>' ).addClass( 've-ui-mwSaveDialog-summaryPreview' ).addClass( 'comment' );
this.$reviewActions = this.$( '<div>' ).addClass( 've-ui-mwSaveDialog-actions' );
@ -422,21 +427,28 @@ ve.ui.MWSaveDialog.prototype.initialize = function () {
);
// Conflict panel
this.conflictPanel = new OO.ui.PanelLayout( { $: this.$, scrollable: true } );
this.conflictPanel = new OO.ui.PanelLayout( {
$: this.$,
scrollable: true,
padded: true
} );
this.$conflict = this.$( '<div>' ).addClass( 've-ui-mwSaveDialog-conflict' )
.html( ve.init.platform.getParsedMessage( 'visualeditor-editconflict' ) )
.find( 'a' ).attr( 'target', '_blank' ).end();
this.conflictPanel.$element.append( this.$conflict );
// No changes panel
this.nochangesPanel = new OO.ui.PanelLayout( { $: this.$, scrollable: true } );
this.nochangesPanel = new OO.ui.PanelLayout( {
$: this.$,
scrollable: true,
padded: true
} );
this.$noChanges = this.$( '<div>' ).addClass( 've-ui-mwSaveDialog-nochanges' )
.html( ve.init.platform.getParsedMessage( 'visualeditor-diff-nochanges' ) )
.find( 'a' ).attr( 'target', '_blank' ).end();
this.nochangesPanel.$element.append( this.$noChanges );
// Panel stack
this.panels.$element.addClass( 've-ui-mwSaveDialog-panel' );
this.panels.addItems( [
this.savePanel,
this.reviewPanel,

View file

@ -5,19 +5,10 @@
* @license The MIT License (MIT); see LICENSE.txt
*/
.ve-ui-mwSaveDialog-panel {
margin: 1.25em;
}
.ve-ui-mwSaveDialog-summaryLabel {
padding: 0.25em 0;
}
.ve-ui-mwSaveDialog-savePanel {
/* Make room for input box shadow */
padding: 0 0.5em;
}
.ve-ui-mwSaveDialog-summary {
width: 100%;
background-color: #fff;