Remove some _blank

This commit is contained in:
devezhao-mbp 2020-04-29 23:13:56 +08:00
parent d4888e1a18
commit bc14589c0f
5 changed files with 19 additions and 22 deletions

View file

@ -235,7 +235,7 @@
<label class="col-md-12 col-xl-3 col-lg-4 col-form-label text-lg-right">分类数据</label>
<div class="col-md-12 col-xl-6 col-lg-8">
<div class="form-control-plaintext" id="useClassification">
<a title="查看/编辑分类数据" target="_blank" href="${baseUrl}/admin/entityhub/classifications">加载中</a>
<a title="查看/编辑分类数据" href="${baseUrl}/admin/entityhub/classifications">加载中</a>
<i class="zmdi zmdi-layers fs-14 ml-1 text-muted"></i>
</div>
</div>

View file

@ -16,7 +16,7 @@ class BaseChart extends React.Component {
render() {
const opers = (
<div className="chart-oper">
{!this.props.builtin && <a title="查看来源数据" target="_blank" href={`${rb.baseUrl}/dashboard/view-chart-sources?id=${this.props.id}`}><i className="zmdi zmdi-rss" /></a>}
{!this.props.builtin && <a title="查看来源数据" href={`${rb.baseUrl}/dashboard/view-chart-sources?id=${this.props.id}`}><i className="zmdi zmdi-rss" /></a>}
<a onClick={() => this.loadChartData()}><i className="zmdi zmdi-refresh" /></a>
{this.props.editable && (
<React.Fragment>
@ -560,7 +560,7 @@ class ApprovalList extends BaseChart {
<span className="cell-detail-description">{item[2]}</span>
</td>
<td className="cell-detail">
<a href={`${rb.baseUrl}/app/list-and-view?id=${item[3]}`} target="_blank">{item[4]}</a>
<a href={`${rb.baseUrl}/app/list-and-view?id=${item[3]}`}>{item[4]}</a>
<span className="cell-detail-description">{item[6]}</span>
</td>
<td className="actions text-right">
@ -643,7 +643,7 @@ class FeedsSchedule extends BaseChart {
return <tr key={'schedule-' + idx}>
<td>
<a title="查看详情" href={`${rb.baseUrl}/app/list-and-view?id=${item.id}`} target="_blank" className="content" dangerouslySetInnerHTML={{ __html: item.content }} />
<a title="查看详情" href={`${rb.baseUrl}/app/list-and-view?id=${item.id}`} className="content" dangerouslySetInnerHTML={{ __html: item.content }} />
</td>
<td className="cell-detail">
<div>{item.scheduleTime}</div>

View file

@ -414,7 +414,7 @@ function __renderRichContent(e) {
}
{e.relatedRecord && <div>
<span><i className={`icon zmdi zmdi-${e.relatedRecord.icon}`} /> {e.relatedRecord.entityLabel} : </span>
<a target="_blank" href={`${rb.baseUrl}/app/list-and-view?id=${e.relatedRecord.id}`} title="查看相关记录">{e.relatedRecord.text}</a>
<a href={`${rb.baseUrl}/app/list-and-view?id=${e.relatedRecord.id}`} title="查看相关记录">{e.relatedRecord.text}</a>
</div>
}
{e.type === 3 && <div>

View file

@ -58,7 +58,7 @@ class FilesList extends React.Component {
renderExtras(item) {
return <React.Fragment >
<span>{item.fileSize}</span>
{item.relatedRecord && <span><a target="_blank" title="点击查看相关记录" onClick={(e) => $stopEvent(e)} href={`${rb.baseUrl}/app/list-and-view?id=${item.relatedRecord[0]}`}>{item.relatedRecord[1]}</a></span>}
{item.relatedRecord && <span><a title="点击查看相关记录" onClick={(e) => $stopEvent(e)} href={`${rb.baseUrl}/app/list-and-view?id=${item.relatedRecord[0]}`}>{item.relatedRecord[1]}</a></span>}
</React.Fragment>
}

View file

@ -41,9 +41,13 @@ class MessageList extends React.Component {
{(this.state.page > 1 || msglist.length >= this.state.pageSize) &&
<div className="notification-page">
<ul className="pagination pagination-rounded mb-0">
<li className={`page-item ${this.state.page < 2 ? 'disabled' : ''}`}><a onClick={() => this.gotoPage(-1)} className="page-link"><i className="icon zmdi zmdi-chevron-left" /></a></li>
<li className={`page-item ${this.state.page < 2 ? 'disabled' : ''}`}>
<a onClick={() => this.gotoPage(-1)} className="page-link"><i className="icon zmdi zmdi-chevron-left" /></a>
</li>
<li className="page-no"><span>{this.state.page}</span></li>
<li className={`page-item ${msglist.length < this.state.pageSize ? 'disabled' : ''}`}><a onClick={() => this.gotoPage(1)} className="page-link"><i className="icon zmdi zmdi-chevron-right" /></a></li>
<li className={`page-item ${msglist.length < this.state.pageSize ? 'disabled' : ''}`}>
<a onClick={() => this.gotoPage(1)} className="page-link"><i className="icon zmdi zmdi-chevron-right" /></a>
</li>
</ul>
</div>}
</div>
@ -63,7 +67,8 @@ class MessageList extends React.Component {
<div className="text" dangerouslySetInnerHTML={{ __html: item[1] }}></div>
<div className="date">{item[2]}</div>
</div>
{append && <a title="查看相关记录" target="_blank" className="badge link" href={`${rb.baseUrl}/app/list-and-view?id=${item[5]}`}>查看</a>}
{append
&& <a title="查看相关记录" className="badge link" href={`${rb.baseUrl}/app/list-and-view?id=${item[5]}`}>查看</a>}
</span>
</li>
}
@ -79,22 +84,14 @@ class MessageList extends React.Component {
type: type || this.state.type
}, () => {
$.get(`/notification/messages?type=${this.state.type}&pageNo=${this.state.page}`, (res) => {
this.setState({ list: res.data || [] }, this.__loadAfter)
this.setState({ list: res.data || [] }, () => {
if (focusItem) setTimeout(() => $gotoSection($('.notification.focus').offset().top - 66), 200)
focusItem = null
})
})
})
}
__loadAfter = () => {
$(this._list).find('.notification-info a')
.attr('target', '_blank')
.addClass('link')
.click('click', (e) => {
if (e && e.stopPropagation) e.stopPropagation()
})
setTimeout(() => $gotoSection(), 200)
focusItem = null
}
gotoPage(p) {
if (p === -1 && this.state.page === 1) return
if (p === 1 && (this.state.list || []).length < this.state.pageSize) return
@ -127,7 +124,7 @@ class ApprovalList extends MessageList {
page: page || this.state.page
}, () => {
$.get(`/notification/approvals?pageNo=${this.state.page || 1}`, (res) => {
this.setState({ list: res.data || [] }, this.__loadAfter)
this.setState({ list: res.data || [] })
})
})
}