mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
Remove unused overrides in internal link annotation inspector
Removes an unused call to mw.util.getUrl. Change-Id: I3988311b7160af628ea4ceeafcfdc3cc0a7a3774
This commit is contained in:
parent
3b4923fa74
commit
b54f427078
|
@ -361,13 +361,8 @@ ve.ui.MWLinkAnnotationInspector.prototype.getInsertionData = function () {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* ve.ui.MWInternalLinkAnnotationWidget.prototype.getHref will try to return an href, obviously,
|
||||
* but we don't want this to go into the text and can just call its parent instead.
|
||||
*/
|
||||
ve.ui.MWLinkAnnotationInspector.prototype.getInsertionText = function () {
|
||||
return this.annotationInput.constructor.super.prototype.getHref.call( this.annotationInput );
|
||||
};
|
||||
// #getInsertionText call annotationInput#getHref, which returns the link title,
|
||||
// so no custmisation is needed.
|
||||
|
||||
/* Registration */
|
||||
|
||||
|
|
|
@ -77,13 +77,10 @@ ve.ui.MWInternalLinkAnnotationWidget.prototype.getTextInputWidget = function ()
|
|||
return this.input.query;
|
||||
};
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
ve.ui.MWInternalLinkAnnotationWidget.prototype.getHref = function () {
|
||||
var title = ve.ui.MWInternalLinkAnnotationWidget.super.prototype.getHref.call( this );
|
||||
return mw.util.getUrl( title );
|
||||
};
|
||||
// #getHref returns the link title, not a fully resolved URL, however the only
|
||||
// use case of widget.getHref is for link insertion text, which expects a title.
|
||||
//
|
||||
// Callers needing the full resolved URL should use ve.resolveUrl
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
|
|
Loading…
Reference in a new issue