1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-15 23:00:57 +00:00

Table bug repair (#2731)

* repair table bug

* repair repo-detail bug
This commit is contained in:
杨顺强
2018-12-28 17:50:06 +08:00
committed by Daniel Pan
parent 8c2944d124
commit cb6065cfd0
4 changed files with 15 additions and 13 deletions

View File

@@ -78,9 +78,11 @@ class DetailListView extends React.Component {
let direntPath = this.getDirentPath();
if (direntType === 'dir') {
return (
<table>
<table className="table-thead-hidden">
<thead>
<tr><th width="35%"></th><th width="65%"></th></tr>
</thead>
<tbody>
<tr><th width="35%"></th><td width="65%"></td></tr>
<tr><th>{gettext('Folder')}</th><td>{direntDetail.dir_count}</td></tr>
<tr><th>{gettext('File')}</th><td>{direntDetail.file_count}</td></tr>
<tr><th>{gettext('Size')}</th><td>{Utils.bytesToSize(direntDetail.size)}</td></tr>
@@ -92,9 +94,11 @@ class DetailListView extends React.Component {
} else {
return (
<Fragment>
<table>
<table className="table-thead-hidden">
<thead>
<tr><th width="35%"></th><th width="65%"></th></tr>
</thead>
<tbody>
<tr><th width="35%"></th><td width="65%"></td></tr>
<tr><th>{gettext('Size')}</th><td>{direntDetail.size}</td></tr>
<tr><th>{gettext('Position')}</th><td>{position}</td></tr>
<tr><th>{gettext('Last Update')}</th><td>{moment(direntDetail.last_modified).fromNow()}</td></tr>
@@ -126,7 +130,7 @@ class DetailListView extends React.Component {
);
})}
</ul>
<i className='fa fa-pencil tag-edit-icon' onClick={this.onListRelatedFileToggle}></i>
<i className='fa fa-pencil attr-action-icon' onClick={this.onListRelatedFileToggle}></i>
</td>
</tr>
</tbody>

View File

@@ -44,11 +44,13 @@ class LibDetail extends React.Component {
<img src={siteRoot + 'media/img/lib/256/lib.png'} alt="icon"></img>
</div>
<div className="dirent-table-container">
<table>
<table className="table-thead-hidden">
<thead>
<tr><th width="35%"></th><th width="65%"></th></tr>
</thead>
<tbody>
<tr><th width="35%"></th><td width="65%"></td></tr>
<tr><th>{gettext('Files')}</th><td>{this.state.fileCount}</td></tr>
<tr><th>{gettext('Size')}</th><td>{Utils.bytesToSize(repo.size)}</td></tr>
<tr><th>{gettext('Size')}</th><td>{repo.size}</td></tr>
<tr><th>{gettext('Last Update')}</th><td>{ moment(repo.last_modified).fromNow()}</td></tr>
</tbody>
</table>

View File

@@ -110,10 +110,6 @@
margin-left: 0.5rem;
}
.dirent-table-container .file-tag-container .tag-edit-icon {
padding: 0;
}
.file-related-files th {
vertical-align: top;
}