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

Processing picture gap (#3184)

* Processing picture gap

* Delete tr-style-nav from dirent-list-item.css

* Use onther method

* ues pl10 replace pl-2
This commit is contained in:
zxj96
2019-03-28 13:32:22 +08:00
committed by Daniel Pan
parent 4393ca49c2
commit 2f4b421685
4 changed files with 16 additions and 9 deletions

View File

@@ -415,17 +415,20 @@ class DirentListItem extends React.Component {
(canGenerateShareLink || canGenerateUploadLink || (isRepoOwner || isAdmin));
}
let trClass = this.state.highlight ? 'tr-highlight ' : '';
trClass += this.state.isDropTipshow ? 'tr-drop-effect' : '';
return (
<Fragment>
<tr className={`${this.state.isDropTipshow ? 'tr-dragenter' : ''} ${this.state.isDragTipShow ? 'tr-style-nav' : ''} ${this.state.highlight ? 'tr-highlight' : ''}`} draggable="true" onMouseEnter={this.onMouseEnter} onMouseOver={this.onMouseOver} onMouseLeave={this.onMouseLeave} onClick={this.onDirentClick} onDragStart={this.onItemDragStart} onDragEnter={this.onItemDragEnter} onDragOver={this.onItemDragOver} onDragLeave={this.onItemDragLeave} onDrop={this.onItemDragDrop}>
<td className="text-center">
<tr className={trClass} draggable="true" onMouseEnter={this.onMouseEnter} onMouseOver={this.onMouseOver} onMouseLeave={this.onMouseLeave} onClick={this.onDirentClick} onDragStart={this.onItemDragStart} onDragEnter={this.onItemDragEnter} onDragOver={this.onItemDragOver} onDragLeave={this.onItemDragLeave} onDrop={this.onItemDragDrop}>
<td className={`pl10 ${this.state.isDragTipShow ? 'tr-drag-effect' : ''}`}>
<input type="checkbox" className="vam" onChange={this.onItemSelected} checked={dirent.isSelected}/>
</td>
<td className="text-center">
<td className="pl10">
{dirent.starred !== undefined && !dirent.starred && <i className="far fa-star star-empty cursor-pointer" onClick={this.onItemStarred}></i>}
{dirent.starred !== undefined && dirent.starred && <i className="fas fa-star cursor-pointer" onClick={this.onItemStarred}></i>}
</td>
<td className="text-center">
<td className="pl10">
<div className="dir-icon">
{dirent.encoded_thumbnail_src ?
<img ref='drag_icon' src={`${siteRoot}${dirent.encoded_thumbnail_src}`} className="thumbnail cursor-pointer" onClick={this.onItemClick} alt="" /> :

View File

@@ -240,11 +240,11 @@ class DirentListView extends React.Component {
<table>
<thead>
<tr>
<th width="3%" className="text-center">
<th width="3%" className="pl10">
<input type="checkbox" className="vam" onChange={this.props.onAllItemSelected} checked={this.props.isAllItemSelected}/>
</th>
<th width="3%">{/*icon */}</th>
<th width="5%">{/*star */}</th>
<th width="3%" className="pl10">{/*icon */}</th>
<th width="5%" className="pl10">{/*star */}</th>
<th width="39%"><a className="d-block table-sort-op" href="#" onClick={this.sortByName}>{gettext('Name')} {sortByName && sortIcon}</a></th>
<th width="6%">{/*tag */}</th>
<th width="18%">{/*operation */}</th>

View File

@@ -1,4 +1,4 @@
.tr-dragenter {
.tr-drop-effect {
background-color: #f8f8f8;
}
.operations {

View File

@@ -146,6 +146,10 @@ ul,ol,li {
visibility: hidden;
}
.pl10 {
padding-left: 10px;
}
.a-simulate {
color: #eb8205 !important;
text-decoration: none;
@@ -161,7 +165,7 @@ ul,ol,li {
cursor: pointer;
}
.tr-style-nav { /* just for drag&drop item */
.tr-drag-effect{ /* just for drag&drop item */
background-image: url('../img/grippy_large.png');
background-repeat: no-repeat;
background-position: 0px;