Add spacer above basic reference option

Also add classes to basic/reuse so they can be differently styled.

Bug: T108725
Change-Id: I4d128afe86c7fae2d8cbd8a57749970942e39e76
This commit is contained in:
Ed Sanders 2015-08-23 20:04:00 +01:00
parent 544421a31d
commit e59ee87887
3 changed files with 19 additions and 2 deletions

View file

@ -495,6 +495,7 @@ class VisualEditorHooks {
'modules/ve-mw/ui/styles/widgets/ve.ui.MWReferenceGroupInputWidget.css',
'modules/ve-mw/ui/styles/widgets/ve.ui.MWReferenceResultWidget.css',
'modules/ve-mw/ui/styles/widgets/ve.ui.MWReferenceSearchWidget.css',
'modules/ve-mw/ui/styles/widgets/ve.ui.MWReferenceSourceSelectWidget.css',
),
'dependencies' => array(
'ext.visualEditor.mwreference.core',

View file

@ -0,0 +1,10 @@
/*!
* VisualEditor MediaWiki UserInterface MWReferenceSearchWidget styles.
*
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
.ve-ui-mwReferenceSourceSelectWidget-separator {
border-top: 1px solid #ccc;
}

View file

@ -50,7 +50,8 @@ ve.ui.MWReferenceSourceSelectWidget = function VeUiMWReferenceSourceSelectWidget
this.refBasic = new OO.ui.DecoratedOptionWidget( {
icon: 'reference',
label: ve.msg( 'visualeditor-dialogbutton-reference-full-label' ),
data: { windowName: 'reference' }
data: { windowName: 'reference' },
classes: [ 've-ui-mwReferenceSourceSelectWidget-basic' ]
} );
items.push( this.refBasic );
@ -61,13 +62,18 @@ ve.ui.MWReferenceSourceSelectWidget = function VeUiMWReferenceSourceSelectWidget
data: {
windowName: 'reference',
dialogData: { useExisting: true }
}
},
classes: [ 've-ui-mwReferenceSourceSelectWidget-reuse' ]
} );
items.push( this.refExisting );
}
this.addItems( items );
$( '<div>' )
.addClass( 've-ui-mwReferenceSourceSelectWidget-separator' )
.insertBefore( this.refBasic.$element );
// Initialization
this.$element.addClass( 've-ui-mwReferenceSourceSelectWidget' );
};