mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 02:51:50 +00:00
01eda7f36a
This node stores the rendered in the index-value store, hashed on a custom hash of the dm (type + mw) which makes it unique it its parameters. Bug: 46571 Change-Id: I0ab4c9f7bca207121d5b42e83c821771b6139da8
43 lines
972 B
JavaScript
43 lines
972 B
JavaScript
/*!
|
|
* VisualEditor ContentEditable MWTemplate class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* ContentEditable MediaWiki template node.
|
|
*
|
|
* @class
|
|
* @abstract
|
|
* @extends ve.ce.GeneratedContentNode
|
|
* @constructor
|
|
* @param {ve.dm.MWTemplateNode} model Model to observe
|
|
*/
|
|
ve.ce.MWTemplateNode = function VeCeMWTemplateNode( model ) {
|
|
// Parent constructor
|
|
ve.ce.GeneratedContentNode.call( this, model );
|
|
|
|
// DOM Changes
|
|
this.$.addClass( 've-ce-MWTemplateNode' );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
ve.inheritClass( ve.ce.MWTemplateNode, ve.ce.GeneratedContentNode );
|
|
|
|
/* Static Properties */
|
|
|
|
ve.ce.MWTemplateNode.static.name = 'MWtemplate';
|
|
|
|
/* Methods */
|
|
|
|
ve.ce.MWTemplateNode.prototype.generateContents = function () {
|
|
// TODO: return $.ajax( api call to get new contents )
|
|
return new $.Deferred();
|
|
};
|
|
|
|
/* Registration */
|
|
|
|
ve.ce.nodeFactory.register( ve.ce.MWTemplateNode );
|