This commit is contained in:
oahzeved 2020-08-01 17:41:37 +08:00
parent 349aa30207
commit f2050117ba
2 changed files with 12 additions and 2 deletions

View file

@ -1345,6 +1345,9 @@ class ClassificationSelector extends React.Component {
// see `reference-search.jsp`
// eslint-disable-next-line no-unused-vars
var referenceSearch__call = function (selected) {/* NOOP */ }
// eslint-disable-next-line no-unused-vars
var referenceSearch__dialog
class ReferenceSearcher extends RbModal {
constructor(props) {
@ -1361,13 +1364,18 @@ class ReferenceSearcher extends RbModal {
<button className="close" type="button" onClick={() => this.hide()}><span className="zmdi zmdi-close" /></button>
</div>
<div className="modal-body iframe">
<iframe src={this.props.url} frameBorder="0" style={{ minHeight: 430, maxHeight: '100%' }} />
<iframe src={this.props.url} frameBorder="0" style={{ minHeight: 368 }} />
</div>
</div>
</div>
</div>
)
}
componentDidMount() {
super.componentDidMount()
referenceSearch__dialog = this
}
}
//

View file

@ -57,11 +57,13 @@ window.__PageConfig = {
</script>
<script src="${baseUrl}/assets/js/rb-datalist.jsx" type="text/babel"></script>
<script type="text/babel">
RbList.renderAfter = function() {
parent && parent.referenceSearch__dialog && parent.referenceSearch__dialog.resize()
}
$(document).ready(function () {
$('.J_select').click(function () {
const ss = RbListPage._RbList.getSelectedIds()
if (ss.length > 0 && parent && parent.referenceSearch__call) parent.referenceSearch__call(ss)
else console.log(ss)
})
})
</script>