2013-11-15 20:02:34 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor DataModel MWNoEditSectionMetaItem class.
|
|
|
|
*
|
2017-01-03 16:58:33 +00:00
|
|
|
* @copyright 2011-2017 VisualEditor Team and others; see AUTHORS.txt
|
2013-11-15 20:02:34 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* DataModel disable section edit links meta item.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @extends ve.dm.MetaItem
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} element Reference to element in meta-linmod
|
|
|
|
*/
|
2016-08-22 21:44:59 +00:00
|
|
|
ve.dm.MWNoEditSectionMetaItem = function VeDmMWNoEditSectionMetaItem() {
|
2013-11-15 20:02:34 +00:00
|
|
|
// Parent constructor
|
2016-08-22 21:44:59 +00:00
|
|
|
ve.dm.MWNoEditSectionMetaItem.super.apply( this, arguments );
|
2013-11-15 20:02:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
OO.inheritClass( ve.dm.MWNoEditSectionMetaItem, ve.dm.MetaItem );
|
|
|
|
|
|
|
|
/* Static Properties */
|
|
|
|
|
|
|
|
ve.dm.MWNoEditSectionMetaItem.static.name = 'mwNoEditSection';
|
|
|
|
|
|
|
|
ve.dm.MWNoEditSectionMetaItem.static.group = 'mwNoEditSection';
|
|
|
|
|
|
|
|
ve.dm.MWNoEditSectionMetaItem.static.matchTagNames = [ 'meta' ];
|
|
|
|
|
|
|
|
ve.dm.MWNoEditSectionMetaItem.static.matchRdfaTypes = [ 'mw:PageProp/noeditsection' ];
|
|
|
|
|
|
|
|
ve.dm.MWNoEditSectionMetaItem.static.toDomElements = function ( dataElement, doc ) {
|
|
|
|
var meta = doc.createElement( 'meta' );
|
|
|
|
meta.setAttribute( 'property', 'mw:PageProp/noeditsection' );
|
|
|
|
return [ meta ];
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.dm.modelRegistry.register( ve.dm.MWNoEditSectionMetaItem );
|