Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7418161
ve.ce.TableCellableNode.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.ce.TableCellableNode.js
View Options
/*!
* VisualEditor ContentEditable TableCellableNode class.
*
* @copyright See AUTHORS.txt
*/
/**
* ContentEditable node which can behave as a table cell
*
* @class
*
* @abstract
* @constructor
*/
ve
.
ce
.
TableCellableNode
=
function
VeCeTableCellableNode
()
{
if
(
this
.
isCellable
()
&&
!
this
.
isCellEditable
()
)
{
this
.
$element
.
attr
(
'title'
,
ve
.
msg
(
'visualeditor-aliennode-tooltip'
)
);
}
this
.
$element
.
addClass
(
've-ce-tableCellableNode'
);
};
/* Inheritance */
OO
.
initClass
(
ve
.
ce
.
TableCellableNode
);
/* Static Methods */
/* Methods */
/**
* Set the editing mode of a table cell node
*
* @param {boolean} enable Enable editing
*/
ve
.
ce
.
TableCellableNode
.
prototype
.
setEditing
=
function
()
{
};
/**
* Get the HTML tag name.
*
* Tag name is selected based on the model's style attribute.
*
* @return {string} HTML tag name
* @throws {Error} Invalid style
*/
ve
.
ce
.
TableCellableNode
.
prototype
.
getTagName
=
function
()
{
const
style
=
this
.
model
.
getAttribute
(
'style'
),
types
=
{
data
:
'td'
,
header
:
'th'
};
if
(
!
Object
.
prototype
.
hasOwnProperty
.
call
(
types
,
style
)
)
{
throw
new
Error
(
'Invalid style'
);
}
return
types
[
style
];
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 22, 03:46 (1 d, 7 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
4c/e5/04af11bd5ca7bb9d6147d86ecb11
Default Alt Text
ve.ce.TableCellableNode.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment