mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 08:20:02 +00:00
Parent is shown as HTML in the subref edit dialog
Minor tweak to render the parent as HTML, without fixing anything else about the layout. Bug: T370873 Change-Id: I507acf7b86a20d1965bbb32fdc0132b41c929d0c
This commit is contained in:
parent
8aa889dbe6
commit
7691f49ea8
|
@ -214,11 +214,12 @@ ve.ui.MWReferenceDialog.prototype.updateExtendsWarningFromRef = function ( ref )
|
|||
if ( ref.extendsRef ) {
|
||||
const list = this.getFragment().getDocument().getInternalList();
|
||||
const itemNode = list.getItemNode( list.keys.indexOf( ref.extendsRef ) );
|
||||
const parentRefText = new ve.ui.MWPreviewElement( itemNode, { useView: true } ).$element.text();
|
||||
// TODO extends i18n
|
||||
this.editPanel.extendsWarning.setLabel( new OO.ui.HtmlSnippet(
|
||||
`${ mw.msg( 'cite-ve-dialog-reference-editing-extends' ) }</br>${ parentRefText }`
|
||||
) );
|
||||
const $parentRefPreview = new ve.ui.MWPreviewElement( itemNode, { useView: true } ).$element;
|
||||
this.editPanel.extendsWarning.setLabel(
|
||||
$( '<p>' )
|
||||
.text( mw.msg( 'cite-ve-dialog-reference-editing-extends' ) )
|
||||
.append( $parentRefPreview )
|
||||
);
|
||||
}
|
||||
|
||||
this.editPanel.extendsWarning.toggle( !!ref.extendsRef );
|
||||
|
|
Loading…
Reference in a new issue