/*! * VisualEditor UserInterface MWTocWidget class. * * @copyright See AUTHORS.txt * @license The MIT License (MIT); see LICENSE.txt */ /** * Creates a ve.ui.MWTocWidget object. * * @class * @extends OO.ui.Widget * * @constructor * @param {ve.ui.Surface} surface * @param {Object} [config] Configuration options */ ve.ui.MWTocWidget = function VeUiMWTocWidget( surface, config ) { // Parent constructor ve.ui.MWTocWidget.super.call( this, config ); // Properties this.surface = surface; this.doc = surface.getModel().getDocument(); this.metaList = surface.getModel().metaList; // Topic level 0 lives inside of a toc item this.rootLength = 0; this.initialized = false; // Page settings cache this.mwTOCForce = false; this.mwTOCDisable = false; this.$tocList = $( '