Skip to content

Commit

Permalink
added build files
Browse files Browse the repository at this point in the history
  • Loading branch information
wachterjohannes committed Apr 20, 2015
1 parent 580e418 commit 04b9955
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 31 deletions.
58 changes: 28 additions & 30 deletions dist/husky.js
Original file line number Diff line number Diff line change
Expand Up @@ -29830,38 +29830,36 @@ define('husky_components/datagrid/decorators/table-view',[],function() {
renderBodyRow: function(record, prepend) {
this.removeNewRecordRow();

if (!this.table.rows[record.id]) {
var $row = this.sandbox.dom.createElement(templates.row),
$overrideElement = (!!this.table.rows[record.id]) ? this.table.rows[record.id].$el : null,
hasParent = this.hasParent(record);

record.id = (!!record.id) ? record.id : constants.newRecordId;
this.sandbox.dom.data($row, 'id', record.id);

// render the parents before rendering the children
if (hasParent) {
if (!this.table.rows[record.parent]) {
this.renderBodyRow(this.data.embedded[this.datagrid.getRecordIndexById(record.parent)], prepend);
}
this.table.rows[record.parent].childrenLoaded = true;
}

this.table.rows[record.id] = {
$el: $row,
cells: {},
childrenLoaded: !!this.table.rows[record.id] ? this.table.rows[record.id].childrenLoaded : false,
childrenExpanded: false,
parent: hasParent ? record.parent : null,
hasChildren: (!!record[this.datagrid.options.childrenPropertyName]) ? record[this.datagrid.options.childrenPropertyName] : false,
level: 1
};
var $row = this.sandbox.dom.createElement(templates.row),
$overrideElement = (!!this.table.rows[record.id]) ? this.table.rows[record.id].$el : null,
hasParent = this.hasParent(record);

record.id = (!!record.id) ? record.id : constants.newRecordId;
this.sandbox.dom.data($row, 'id', record.id);

this.renderRowSelectItem(record.id);
this.renderBodyCellsForRow(record);
this.renderRowRemoveItem(record.id);
this.insertBodyRow(record, $overrideElement, prepend);
this.executeRowPostRenderActions(record);
// render the parents before rendering the children
if (hasParent) {
if (!this.table.rows[record.parent]) {
this.renderBodyRow(this.data.embedded[this.datagrid.getRecordIndexById(record.parent)], prepend);
}
this.table.rows[record.parent].childrenLoaded = true;
}

this.table.rows[record.id] = {
$el: $row,
cells: {},
childrenLoaded: !!this.table.rows[record.id] ? this.table.rows[record.id].childrenLoaded : false,
childrenExpanded: false,
parent: hasParent ? record.parent : null,
hasChildren: (!!record[this.datagrid.options.childrenPropertyName]) ? record[this.datagrid.options.childrenPropertyName] : false,
level: 1
};

this.renderRowSelectItem(record.id);
this.renderBodyCellsForRow(record);
this.renderRowRemoveItem(record.id);
this.insertBodyRow(record, $overrideElement, prepend);
this.executeRowPostRenderActions(record);
},

/**
Expand Down
2 changes: 1 addition & 1 deletion dist/husky.min.js

Large diffs are not rendered by default.

0 comments on commit 04b9955

Please sign in to comment.