Use new TabSelectWidget in link inspector

Don't use the full IndexLayout for now as it doesn't
work easily in variable height situations.

Depends on this feature being preset in MW core.

Bug: T97878
Change-Id: I5d949bf69b0721b288c37c1f12210b0265658eb5
This commit is contained in:
Ed Sanders 2015-05-04 11:32:11 +01:00 committed by Trevor Parscal
parent ff9bf1fcb3
commit ec8a813dce
2 changed files with 5 additions and 16 deletions

View file

@ -48,11 +48,11 @@ ve.ui.MWLinkAnnotationInspector.prototype.initialize = function () {
} );
this.externalAnnotationInput = new ve.ui.MWExternalLinkAnnotationWidget();
this.linkTypeSelect = new OO.ui.ButtonSelectWidget( {
this.linkTypeSelect = new OO.ui.TabSelectWidget( {
classes: [ 've-ui-mwLinkAnnotationInspector-linkTypeSelect' ],
items: [
new OO.ui.ButtonOptionWidget( { framed: false, data: 'internal', label: ve.msg( 'visualeditor-linkinspector-button-link-internal' ) } ),
new OO.ui.ButtonOptionWidget( { framed: false, data: 'external', label: ve.msg( 'visualeditor-linkinspector-button-link-external' ) } )
new OO.ui.TabOptionWidget( { data: 'internal', label: ve.msg( 'visualeditor-linkinspector-button-link-internal' ) } ),
new OO.ui.TabOptionWidget( { data: 'external', label: ve.msg( 'visualeditor-linkinspector-button-link-external' ) } )
]
} );

View file

@ -5,17 +5,6 @@
* @license The MIT License (MIT); see LICENSE.txt
*/
.ve-ui-mwLinkAnnotationInspector-linkTypeSelect .oo-ui-buttonOptionWidget .oo-ui-buttonElement-button {
height: auto;
margin: 0;
padding: 0 0.5em;
color: #888;
}
.ve-ui-mwLinkAnnotationInspector-linkTypeSelect .oo-ui-optionWidget-selected .oo-ui-buttonElement-button {
background: #eee;
}
.ve-ui-mwLinkAnnotationInspector .oo-ui-iconElement-icon {
opacity: 0.4;
.ve-ui-mwLinkAnnotationInspector-linkTypeSelect {
margin: -0.75em -0.75em 0.75em -0.75em;
}