mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-13 17:53:09 +00:00
Merge "Fix preview of parent reference in context item"
This commit is contained in:
commit
c197e9e519
|
@ -126,7 +126,7 @@ ve.ui.MWReferenceContextItem.prototype.getDescription = function () {
|
||||||
* Get the text of the parent reference.
|
* Get the text of the parent reference.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @return {string|null}
|
* @return {jQuery|null}
|
||||||
*/
|
*/
|
||||||
ve.ui.MWReferenceContextItem.prototype.getParentRef = function () {
|
ve.ui.MWReferenceContextItem.prototype.getParentRef = function () {
|
||||||
const extendsRef = this.model.getAttribute( 'extendsRef' );
|
const extendsRef = this.model.getAttribute( 'extendsRef' );
|
||||||
|
@ -135,9 +135,7 @@ ve.ui.MWReferenceContextItem.prototype.getParentRef = function () {
|
||||||
}
|
}
|
||||||
const list = this.getFragment().getDocument().getInternalList();
|
const list = this.getFragment().getDocument().getInternalList();
|
||||||
const itemNode = list.getItemNode( list.keys.indexOf( extendsRef ) );
|
const itemNode = list.getItemNode( list.keys.indexOf( extendsRef ) );
|
||||||
const $element = new ve.ui.MWPreviewElement( itemNode, { useView: true } ).$element;
|
return new ve.ui.MWPreviewElement( itemNode, { useView: true } ).$element;
|
||||||
|
|
||||||
return $element.text();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
// Disable click events in the preview
|
||||||
|
pointer-events: none;
|
||||||
|
|
||||||
+ .ve-ui-mwReferenceContextItem-muted {
|
+ .ve-ui-mwReferenceContextItem-muted {
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
|
|
Loading…
Reference in a new issue