mediawiki-extensions-Visual.../modules/ve/ce/nodes/ve.ce.TableNode.js

29 lines
575 B
JavaScript
Raw Normal View History

2012-03-08 12:27:02 +00:00
/**
* Creates an ve.ce.TableNode object.
*
* @class
* @constructor
* @extends {ve.ce.BranchNode}
* @param {ve.dm.TableNode} model Table model to view
*/
ve.ce.TableNode = function( model ) {
// Inheritance
ve.ce.BranchNode.call( this, model, $( '<table></table>' ) );
2012-03-08 12:27:02 +00:00
// DOM Changes
this.$
.attr( 'style', model.getElementAttribute( 'html/style' ) )
.addClass( 've-ce-tableNode' );
2012-03-08 12:27:02 +00:00
};
/* Registration */
ve.ce.DocumentNode.splitRules.table = {
'self': false,
'children': false
};
/* Inheritance */
ve.extendClass( ve.ce.TableNode, ve.ce.BranchNode );