mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
ve.dm.MWReferenceNode: Override static cloneElement instead of getter
The getter isn't always used, but the static method is. Change-Id: I9b3df7f4e8056cdb554c3ed9a27c39148b2b3237
This commit is contained in:
parent
3d86dbeed3
commit
06376669d9
|
@ -295,6 +295,17 @@ ve.dm.MWReferenceNode.static.getIndexLabel = function ( dataElement, internalLis
|
||||||
return '[' + ( refGroup ? refGroup + ' ' : '' ) + index + ']';
|
return '[' + ( refGroup ? refGroup + ' ' : '' ) + index + ']';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
ve.dm.MWReferenceNode.static.cloneElement = function () {
|
||||||
|
var clone = ve.dm.MWReferenceNode.super.static.cloneElement.apply( this, arguments );
|
||||||
|
delete clone.attributes.contentsUsed;
|
||||||
|
delete clone.attributes.mw;
|
||||||
|
delete clone.attributes.originalMw;
|
||||||
|
return clone;
|
||||||
|
};
|
||||||
|
|
||||||
/* Methods */
|
/* Methods */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -386,15 +397,6 @@ ve.dm.MWReferenceNode.prototype.removeFromInternalList = function () {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** */
|
|
||||||
ve.dm.MWReferenceNode.prototype.getClonedElement = function () {
|
|
||||||
var clone = ve.dm.LeafNode.prototype.getClonedElement.call( this );
|
|
||||||
delete clone.attributes.contentsUsed;
|
|
||||||
delete clone.attributes.mw;
|
|
||||||
delete clone.attributes.originalMw;
|
|
||||||
return clone;
|
|
||||||
};
|
|
||||||
|
|
||||||
ve.dm.MWReferenceNode.prototype.onAttributeChange = function ( key, from, to ) {
|
ve.dm.MWReferenceNode.prototype.onAttributeChange = function ( key, from, to ) {
|
||||||
if (
|
if (
|
||||||
( key !== 'listGroup' && key !== 'listKey' ) ||
|
( key !== 'listGroup' && key !== 'listKey' ) ||
|
||||||
|
|
Loading…
Reference in a new issue