mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 09:51:26 +00:00
modify a-simulate to a tag (#2581)
This commit is contained in:
@@ -26,18 +26,22 @@ class TreeDirList extends React.Component {
|
||||
this.setState({highlight: false});
|
||||
}
|
||||
|
||||
onMainNodeClick = () => {
|
||||
onMainNodeClick = (e) => {
|
||||
e.preventDefault();
|
||||
this.props.onMainNodeClick(this.props.node);
|
||||
}
|
||||
|
||||
render() {
|
||||
let node = this.props.node;
|
||||
let href = siteRoot + 'wikis' + node.path;
|
||||
return (
|
||||
<tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
|
||||
<td className="icon">
|
||||
<img src={node.type === 'dir' ? siteRoot + 'media/img/folder-192.png' : siteRoot + 'media/img/file/192/txt.png'} alt='icon'></img>
|
||||
</td>
|
||||
<td className="name a-simulate" onClick={this.onMainNodeClick}>{node.name}</td>
|
||||
<td className="name">
|
||||
<a href={href} onClick={this.onMainNodeClick}>{node.name}</a>
|
||||
</td>
|
||||
<td>{node.size}</td>
|
||||
<td title={node.last_update_time}>{node.last_update_time}</td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user