1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 00:20:07 +00:00

Code optimized (#2388)

This commit is contained in:
shanshuirenjia
2018-09-21 14:16:15 +08:00
committed by Daniel Pan
parent 6b62d3e653
commit 490a15deed
34 changed files with 306 additions and 318 deletions

View File

@@ -9,23 +9,25 @@ class TreeDirView extends React.Component {
let children = node.hasChildren() ? node.children : null;
return (
<table>
<thead>
<tr>
<th style={{width: "4%"}}></th>
<th style={{width: "60%"}}>{gettext('Name')}</th>
<th style={{width: "16%"}}>{gettext('Size')}</th>
<th style={{width: "20%"}}>{gettext('Last Update')}</th>
</tr>
</thead>
<tbody>
{children && children.map((node, index) => {
return (
<TreeDirList key={index} node={node} onMainNodeClick={this.props.onMainNodeClick}></TreeDirList>
)
})}
</tbody>
</table>
<div className="table-container">
<table>
<thead>
<tr>
<th style={{width: "4%"}}></th>
<th style={{width: "60%"}}>{gettext('Name')}</th>
<th style={{width: "16%"}}>{gettext('Size')}</th>
<th style={{width: "20%"}}>{gettext('Last Update')}</th>
</tr>
</thead>
<tbody>
{children && children.map((node, index) => {
return (
<TreeDirList key={index} node={node} onMainNodeClick={this.props.onMainNodeClick}></TreeDirList>
)
})}
</tbody>
</table>
</div>
)
}
}