Followup 7994eae8c2: fix MWLinkInspector breakage

getAnnotationFromText was renamed to getAnnotationFromFragment,
update MWLinkInspector for this.

Bug: 60374
Bug: 60378
Change-Id: I202a2777f0202dcf42c5968daf8bdf5583b0a11b
This commit is contained in:
Roan Kattouw 2014-01-27 13:11:06 -08:00
parent 0e7d5eb397
commit 3acd206a6a

View file

@ -41,16 +41,17 @@ ve.ui.MWLinkInspector.static.linkTargetInputWidget = ve.ui.MWLinkTargetInputWidg
/* Methods */
/**
* Gets an annotation object from a target.
* Gets an annotation object from a fragment.
*
* The type of link is automatically detected based on some crude heuristics.
*
* @method
* @param {string} target Link target
* @param {ve.dm.SurfaceFragment} fragment Current selection
* @returns {ve.dm.MWInternalLinkAnnotation|ve.dm.MWExternalLinkAnnotation|null}
*/
ve.ui.MWLinkInspector.prototype.getAnnotationFromText = function ( target ) {
var title = mw.Title.newFromText( target );
ve.ui.MWLinkInspector.prototype.getAnnotationFromFragment = function ( fragment ) {
var target = fragment.getText(),
title = mw.Title.newFromText( target );
// Figure out if this is an internal or external link
if ( ve.init.platform.getExternalLinkUrlProtocolsRegExp().test( target ) ) {