mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
svn:eol-style native
This commit is contained in:
parent
a8b80bc1fd
commit
fa172d1592
|
@ -1,38 +1,38 @@
|
|||
/**
|
||||
* Creates an es.PreModel object.
|
||||
*
|
||||
* @class
|
||||
* @constructor
|
||||
* @extends {es.DocumentModelLeafNode}
|
||||
* @param {Object} element Document data element of this node
|
||||
* @param {Integer} length Length of document data element
|
||||
*/
|
||||
es.PreModel = function( element, length ) {
|
||||
// Inheritance
|
||||
es.DocumentModelLeafNode.call( this, 'pre', element, length );
|
||||
};
|
||||
|
||||
/* Methods */
|
||||
|
||||
/**
|
||||
* Creates a pre view for this model.
|
||||
*
|
||||
* @method
|
||||
* @returns {es.PreView}
|
||||
*/
|
||||
es.PreModel.prototype.createView = function() {
|
||||
return new es.PreView( this );
|
||||
};
|
||||
|
||||
/* Registration */
|
||||
|
||||
es.DocumentModel.nodeModels.pre = es.PreModel;
|
||||
|
||||
es.DocumentModel.nodeRules.pre = {
|
||||
'parents': null,
|
||||
'children': []
|
||||
};
|
||||
|
||||
/* Inheritance */
|
||||
|
||||
es.extendClass( es.PreModel, es.DocumentModelLeafNode );
|
||||
/**
|
||||
* Creates an es.PreModel object.
|
||||
*
|
||||
* @class
|
||||
* @constructor
|
||||
* @extends {es.DocumentModelLeafNode}
|
||||
* @param {Object} element Document data element of this node
|
||||
* @param {Integer} length Length of document data element
|
||||
*/
|
||||
es.PreModel = function( element, length ) {
|
||||
// Inheritance
|
||||
es.DocumentModelLeafNode.call( this, 'pre', element, length );
|
||||
};
|
||||
|
||||
/* Methods */
|
||||
|
||||
/**
|
||||
* Creates a pre view for this model.
|
||||
*
|
||||
* @method
|
||||
* @returns {es.PreView}
|
||||
*/
|
||||
es.PreModel.prototype.createView = function() {
|
||||
return new es.PreView( this );
|
||||
};
|
||||
|
||||
/* Registration */
|
||||
|
||||
es.DocumentModel.nodeModels.pre = es.PreModel;
|
||||
|
||||
es.DocumentModel.nodeRules.pre = {
|
||||
'parents': null,
|
||||
'children': []
|
||||
};
|
||||
|
||||
/* Inheritance */
|
||||
|
||||
es.extendClass( es.PreModel, es.DocumentModelLeafNode );
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
/**
|
||||
* Creates an es.PreView object.
|
||||
*
|
||||
* @class
|
||||
* @constructor
|
||||
* @extends {es.DocumentViewLeafNode}
|
||||
* @param {es.PreModel} model Pre model to view
|
||||
*/
|
||||
es.PreView = function( model ) {
|
||||
// Inheritance
|
||||
es.DocumentViewLeafNode.call( this, model );
|
||||
|
||||
// DOM Changes
|
||||
this.$.addClass( 'es-preView' );
|
||||
};
|
||||
|
||||
/* Inheritance */
|
||||
|
||||
es.extendClass( es.PreView, es.DocumentViewLeafNode );
|
||||
/**
|
||||
* Creates an es.PreView object.
|
||||
*
|
||||
* @class
|
||||
* @constructor
|
||||
* @extends {es.DocumentViewLeafNode}
|
||||
* @param {es.PreModel} model Pre model to view
|
||||
*/
|
||||
es.PreView = function( model ) {
|
||||
// Inheritance
|
||||
es.DocumentViewLeafNode.call( this, model );
|
||||
|
||||
// DOM Changes
|
||||
this.$.addClass( 'es-preView' );
|
||||
};
|
||||
|
||||
/* Inheritance */
|
||||
|
||||
es.extendClass( es.PreView, es.DocumentViewLeafNode );
|
||||
|
|
Loading…
Reference in a new issue