2012-07-19 00:11:26 +00:00
|
|
|
/**
|
|
|
|
* VisualEditor content editable TableNode class.
|
2012-07-19 21:25:16 +00:00
|
|
|
*
|
2012-07-19 00:11:26 +00:00
|
|
|
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
|
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
2012-03-08 12:27:02 +00:00
|
|
|
/**
|
2012-06-20 01:20:28 +00:00
|
|
|
* ContentEditable node for a table.
|
|
|
|
*
|
2012-03-08 12:27:02 +00:00
|
|
|
* @class
|
|
|
|
* @constructor
|
|
|
|
* @extends {ve.ce.BranchNode}
|
2012-06-20 01:20:28 +00:00
|
|
|
* @param model {ve.dm.TableNode} Model to observe
|
2012-03-08 12:27:02 +00:00
|
|
|
*/
|
2012-08-07 01:50:44 +00:00
|
|
|
ve.ce.TableNode = function ( model ) {
|
2012-03-08 12:27:02 +00:00
|
|
|
// Inheritance
|
2012-08-28 22:06:34 +00:00
|
|
|
ve.ce.BranchNode.call(
|
|
|
|
this, 'table', model, $( '<table border="1" cellpadding="5" cellspacing="5"></table>' )
|
|
|
|
);
|
2012-03-08 12:27:02 +00:00
|
|
|
};
|
|
|
|
|
2012-06-20 01:20:28 +00:00
|
|
|
/* Static Members */
|
2012-03-08 12:27:02 +00:00
|
|
|
|
2012-06-20 01:20:28 +00:00
|
|
|
/**
|
|
|
|
* Node rules.
|
|
|
|
*
|
|
|
|
* @see ve.ce.NodeFactory
|
|
|
|
* @static
|
|
|
|
* @member
|
|
|
|
*/
|
|
|
|
ve.ce.TableNode.rules = {
|
|
|
|
'canBeSplit': false
|
2012-03-08 12:27:02 +00:00
|
|
|
};
|
|
|
|
|
2012-06-20 01:20:28 +00:00
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
ve.ce.nodeFactory.register( 'table', ve.ce.TableNode );
|
|
|
|
|
2012-03-08 12:27:02 +00:00
|
|
|
/* Inheritance */
|
|
|
|
|
|
|
|
ve.extendClass( ve.ce.TableNode, ve.ce.BranchNode );
|