2011-11-02 21:00:55 +00:00
|
|
|
/**
|
|
|
|
* Creates an es.TableCellModel object.
|
|
|
|
*
|
|
|
|
* @class
|
|
|
|
* @constructor
|
2011-11-03 21:48:40 +00:00
|
|
|
* @extends {es.DocumentModelBranchNode}
|
2011-11-02 21:00:55 +00:00
|
|
|
* @param {Object} element Document data element of this node
|
|
|
|
* @param {es.DocumentModelNode[]} contents List of child nodes to initially add
|
|
|
|
*/
|
|
|
|
es.TableCellModel = function( element, contents ) {
|
|
|
|
// Inheritance
|
2011-11-03 21:48:40 +00:00
|
|
|
es.DocumentModelBranchNode.call( this, 'tableCell', element, contents );
|
2011-11-02 21:00:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Methods */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a table cell view for this model.
|
|
|
|
*
|
|
|
|
* @method
|
|
|
|
* @returns {es.TableCellView}
|
|
|
|
*/
|
|
|
|
es.TableCellModel.prototype.createView = function() {
|
|
|
|
return new es.TableCellView( this );
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
es.DocumentModel.nodeModels.tableCell = es.TableCellModel;
|
|
|
|
|
2011-11-16 18:17:24 +00:00
|
|
|
es.DocumentModel.nodeRules.tableCell = {
|
2011-11-02 21:00:55 +00:00
|
|
|
'parents': ['tableRow'],
|
2011-11-15 19:01:47 +00:00
|
|
|
'children': null,
|
|
|
|
'droppable': false
|
2011-11-02 21:00:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
2011-11-03 21:48:40 +00:00
|
|
|
es.extendClass( es.TableCellModel, es.DocumentModelBranchNode );
|