Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7413930
ve.ui.LinkInspectorTool.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ve.ui.LinkInspectorTool.js
View Options
/*!
* VisualEditor UserInterface LinkInspectorTool classes.
*
* @copyright See AUTHORS.txt
*/
/**
* UserInterface link tool.
*
* @class
* @extends ve.ui.FragmentInspectorTool
* @constructor
* @param {OO.ui.ToolGroup} toolGroup
* @param {Object} [config] Configuration options
*/
ve
.
ui
.
LinkInspectorTool
=
function
VeUiLinkInspectorTool
()
{
ve
.
ui
.
LinkInspectorTool
.
super
.
apply
(
this
,
arguments
);
};
OO
.
inheritClass
(
ve
.
ui
.
LinkInspectorTool
,
ve
.
ui
.
FragmentInspectorTool
);
ve
.
ui
.
LinkInspectorTool
.
static
.
name
=
'link'
;
ve
.
ui
.
LinkInspectorTool
.
static
.
group
=
'meta'
;
ve
.
ui
.
LinkInspectorTool
.
static
.
icon
=
'link'
;
ve
.
ui
.
LinkInspectorTool
.
static
.
title
=
OO
.
ui
.
deferMsg
(
'visualeditor-annotationbutton-link-tooltip'
);
ve
.
ui
.
LinkInspectorTool
.
static
.
modelClasses
=
[
ve
.
dm
.
LinkAnnotation
];
ve
.
ui
.
LinkInspectorTool
.
static
.
commandName
=
'link'
;
ve
.
ui
.
LinkInspectorTool
.
prototype
.
getSelectedModels
=
function
(
fragment
)
{
const
selection
=
fragment
&&
fragment
.
getSelection
();
// Ask the CE surface about selected models, so it can give the right
// answer about links based on the CE selection.
if
(
selection
instanceof
ve
.
dm
.
LinearSelection
)
{
const
surfaceView
=
this
.
toolbar
.
getSurface
().
getView
();
if
(
selection
.
equals
(
surfaceView
.
getModel
().
getSelection
()
)
)
{
return
surfaceView
.
getSelectedModels
();
}
}
return
ve
.
ui
.
LinkInspectorTool
.
super
.
prototype
.
getSelectedModels
.
apply
(
this
,
arguments
);
};
ve
.
ui
.
toolFactory
.
register
(
ve
.
ui
.
LinkInspectorTool
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 22, 01:18 (1 d, 17 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
d2/3e/9600dfb3ebec39827a979fa0b27c
Default Alt Text
ve.ui.LinkInspectorTool.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment