2011-11-02 21:00:55 +00:00
|
|
|
/**
|
|
|
|
* Creates an es.TableRowModel 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.TableRowModel = function( element, contents ) {
|
|
|
|
// Inheritance
|
2011-11-03 21:48:40 +00:00
|
|
|
es.DocumentModelBranchNode.call( this, 'tableRow', element, contents );
|
2011-11-02 21:00:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Methods */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a table row view for this model.
|
|
|
|
*
|
|
|
|
* @method
|
|
|
|
* @returns {es.TableRowView}
|
|
|
|
*/
|
|
|
|
es.TableRowModel.prototype.createView = function() {
|
|
|
|
return new es.TableRowView( this );
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Registration */
|
|
|
|
|
|
|
|
es.DocumentModel.nodeModels.tableRow = es.TableRowModel;
|
|
|
|
|
2011-11-16 18:17:24 +00:00
|
|
|
es.DocumentModel.nodeRules.tableRow = {
|
2011-11-02 21:00:55 +00:00
|
|
|
'parents': ['table'],
|
2011-11-16 19:28:13 +00:00
|
|
|
'children': ['tableCell']
|
2011-11-02 21:00:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
2011-11-03 21:48:40 +00:00
|
|
|
es.extendClass( es.TableRowModel, es.DocumentModelBranchNode );
|