1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 16:10:26 +00:00

Prop type check repair (#2919)

* repair intent check wraning

* change doublequote to singlequote, add semicolon

* optimized code

* modify type-check wraning
This commit is contained in:
杨顺强
2019-01-31 17:37:02 +08:00
committed by Daniel Pan
parent 06f25f05f2
commit e57701fa38
74 changed files with 714 additions and 700 deletions

View File

@@ -178,7 +178,7 @@ class SharedRepoListItem extends React.Component {
if (folderPermEnabled) {
operations = ['Rename', 'Folder Permission', 'Details'];
} else {
operations = ['Rename', 'Details']
operations = ['Rename', 'Details'];
}
} else {
operations.push('Unshare');
@@ -252,8 +252,8 @@ class SharedRepoListItem extends React.Component {
// scene two: (share, unshare), (share), (unshare)
operations = this.generatorOperations();
}
const shareOperation = <a href="#" className="op-icon sf2-icon-share" title={gettext("Share")} onClick={this.onItemShare}></a>;
const unshareOperation = <a href="#" className="op-icon sf2-icon-x3" title={gettext("Unshare")} onClick={this.onItemUnshare}></a>
const shareOperation = <a href="#" className="op-icon sf2-icon-share" title={gettext('Share')} onClick={this.onItemShare}></a>;
const unshareOperation = <a href="#" className="op-icon sf2-icon-x3" title={gettext('Unshare')} onClick={this.onItemUnshare}></a>;
const deleteOperation = <a href="#" className="op-icon sf2-icon-delete" title={gettext('Delete')} onClick={this.onItemDelete}></a>;
if (this.isDeparementOnwerGroupMember) {
@@ -272,7 +272,7 @@ class SharedRepoListItem extends React.Component {
/>
<DropdownMenu>
{operations.map((item, index) => {
return <DropdownItem key={index} data-toggle={item} onClick={this.onMenuItemClick}>{this.translateMenuItem(item)}</DropdownItem>
return <DropdownItem key={index} data-toggle={item} onClick={this.onMenuItemClick}>{this.translateMenuItem(item)}</DropdownItem>;
})}
</DropdownMenu>
</Dropdown>

View File

@@ -84,12 +84,12 @@ class SharedRepoListView extends React.Component {
<table className={isShowTableThread ? '' : 'table-thead-hidden'}>
<thead>
<tr>
<th width="4%"><span className="sr-only">{gettext("Library Type")}</span></th>
<th width="4%"><span className="sr-only">{gettext('Library Type')}</span></th>
<th width="40%"><a className="d-block table-sort-op" href="#" onClick={this.sortByName}>{gettext('Name')} {sortByName && sortIcon}</a></th>
<th width="12%"><span className="sr-only">{gettext("Actions")}</span></th>
<th width={'14%'}>{gettext("Size")}</th>
<th width="12%"><span className="sr-only">{gettext('Actions')}</span></th>
<th width={'14%'}>{gettext('Size')}</th>
<th width={'14%'}><a className="d-block table-sort-op" href="#" onClick={this.sortByTime}>{gettext('Last Update')} {sortByTime && sortIcon}</a></th>
<th width="16%">{gettext("Owner")}</th>
<th width="16%">{gettext('Owner')}</th>
</tr>
</thead>
<tbody>
@@ -108,13 +108,13 @@ class SharedRepoListView extends React.Component {
<table className={isShowTableThread ? '' : 'table-thead-hidden'}>
<thead>
<tr>
<th width="18%"><span className="sr-only">{gettext("Library Type")}</span></th>
<th width="18%"><span className="sr-only">{gettext('Library Type')}</span></th>
<th width="68%">
{gettext("Sort:")}
<a className="table-sort-op" href="#" onClick={this.sortByName}>{gettext("name")} {sortByName && sortIcon}</a>
<a className="table-sort-op" href="#" onClick={this.sortByTime}>{gettext("last update")} {sortByTime && sortIcon}</a>
{gettext('Sort:')}
<a className="table-sort-op" href="#" onClick={this.sortByName}>{gettext('name')} {sortByName && sortIcon}</a>
<a className="table-sort-op" href="#" onClick={this.sortByTime}>{gettext('last update')} {sortByTime && sortIcon}</a>
</th>
<th width="14%"><span className="sr-only">{gettext("Actions")}</span></th>
<th width="14%"><span className="sr-only">{gettext('Actions')}</span></th>
</tr>
</thead>
<tbody>