mediawiki-extensions-Visual.../modules/ve-mw/dm/metaitems/ve.dm.MWIndexMetaItem.js
James D. Forrester 57a06a6e75 dm.metaitems: Turn grouped metas into variadic ones
We're getting rid of meta item grouping, so we need to prepare.

Merged:
* ve.dm.MWIndexMetaItem
  from ve.dm.MWIndexDisableMetaItem and ve.dm.MWIndexForceMetaItem
* ve.dm.MWNewSectionEditMetaItem
  from ve.dm.MWNewSectionEditDisableMetaItem and ve.dm.MWNewSectionEditForceMetaItem
* ve.dm.MWTOCMetaItem
  from ve.dm.MWTOCDisableMetaItem and ve.dm.MWTOCForceMetaItem

These three now inherit from ve.dm.MWFlaggedMetaItem to avoid code duplication.

Change-Id: Ic8a9cdb1226dccac2c27e7f4b965c1590a7387c0
2017-04-11 11:13:18 -07:00

36 lines
900 B
JavaScript

/*!
* VisualEditor DataModel MWIndexMetaItem class.
*
* @copyright 2011-2017 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* DataModel index meta item (for __INDEX__ and __NOINDEX__).
*
* @class
* @extends ve.dm.MWFlaggedMetaItem
* @constructor
* @param {Object} [element] Reference to element in meta-linmod
*/
ve.dm.MWIndexMetaItem = function VeDmMWIndexMetaItem() {
// Parent constructor
ve.dm.MWIndexMetaItem.super.apply( this, arguments );
};
/* Inheritance */
OO.inheritClass( ve.dm.MWIndexMetaItem, ve.dm.MWFlaggedMetaItem );
/* Static Properties */
ve.dm.MWIndexMetaItem.static.name = 'mwIndex';
ve.dm.MWIndexMetaItem.static.group = 'mwIndex';
ve.dm.MWIndexMetaItem.static.matchRdfaTypes = [ 'mw:PageProp/index', 'mw:PageProp/noindex' ];
/* Registration */
ve.dm.modelRegistry.register( ve.dm.MWIndexMetaItem );