2012-05-01 00:36:22 +00:00
|
|
|
/**
|
|
|
|
* ContentEditable node for a table.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @constructor
|
|
|
|
* @extends {ve.ce.BranchNode}
|
|
|
|
* @param model {ve.dm.TableNode} Model to observe
|
|
|
|
*/
|
|
|
|
ve.ce.TableNode = function( model ) {
|
|
|
|
// Inheritance
|
2012-05-01 02:38:42 +00:00
|
|
|
ve.ce.BranchNode.call( this, model, $( '<table></table>' ) );
|
2012-05-01 00:36:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Static Members */
|
|
|
|
|
|
|
|
/**
|
2012-05-02 18:29:44 +00:00
|
|
|
* Node rules.
|
|
|
|
*
|
2012-05-01 00:36:22 +00:00
|
|
|
* @see ve.ce.NodeFactory
|
2012-05-02 18:29:44 +00:00
|
|
|
* @static
|
|
|
|
* @member
|
2012-05-01 00:36:22 +00:00
|
|
|
*/
|
|
|
|
ve.ce.TableNode.rules = {
|
|
|
|
'canHaveChildren': true,
|
|
|
|
'canHaveGrandchildren': true,
|
|
|
|
'canBeSplit': false
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.ce.factory.register( 'table', ve.ce.TableNode );
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
ve.extendClass( ve.ce.TableNode, ve.ce.BranchNode );
|