Page MenuHomePhabricator
Paste P7185

MWInternalLink References in VE Code
ActivePublic

Authored by santhosh on May 30 2018, 11:54 AM.
Tags
None
Referenced Files
F18613568: MWInternalLink References in VE Code
May 30 2018, 11:54 AM
Subscribers
None
ve.ui.MWLinkAction#getLinkAnnotation in ve.ui.actionFactorory with 'link'
/**
* Open either the 'link' or 'linkNode' window, depending on what is selected.
*
* @method
* @return {boolean} Action was executed
*/
ve.ui.MWLinkAction.prototype.open = function () {
var fragment = this.surface.getModel().getFragment(),
selectedNode = fragment.getSelectedNode(),
windowName = 'link';
if ( selectedNode instanceof ve.dm.MWNumberedExternalLinkNode ) {
windowName = 'linkNode';
} else if ( selectedNode instanceof ve.dm.MWMagicLinkNode ) {
windowName = 'linkMagicNode';
}
this.surface.execute( 'window', 'open', windowName );
return true;
};
> ve.init.target.targetSurface.execute( 'window', 'open', 'link' ); // opens ve.ui.MWLinkInspectorTool
ve.ui.MWInternalLinkAnnotationWidget.static.getAnnotationFromText
ve.dm.MWInternalLinkAnnotation.static.newFromTitle( title, trimmed );
ve.ui.MWLinkInspectorTool
ve.ui.MWLinkInspectorTool.static.commandName = 'link'; in ve.ui.toolFactory with 'link'