Skip to content

Commit

Permalink
hide link to advanced parameters if blast algorithm is unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazy-poet committed Jun 23, 2023
1 parent 837b7b1 commit 1e0eca9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions public/js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ export class Options extends Component {
showAdvancedOptions(e) {
const ids = ['blastn', 'tblastn', 'blastp', 'blastx', 'tblastx'];
const method = this.state.method.toLowerCase();
if (!method) {
// prevent modal from opening if no algorithm is selected
e.preventDefault();
e.stopPropagation();
return;
}
// hide options for other algorithms and only show for selected algorithm
for (const id of ids) {
$(`#${id}`)[id === method ? 'show' : 'hide']();
Expand All @@ -64,13 +58,14 @@ export class Options extends Component {
<div className="input-group">
<label className="control-label" htmlFor="advanced">
Advanced parameters:
<sup style={{ marginLeft: '2px' }}>
{/* only show link to advanced parameters if blast method is known */}
{this.state.method && <sup style={{ marginLeft: '2px' }}>
<a href=''
onClick={this.showAdvancedOptions}
data-toggle="modal" data-target="#help">
<i className="fa fa-question-circle"></i>
</a>
</sup>
</sup>}
</label>
<input type="text" className={classNames}
onChange={e => this.updateBox(e.target.value)}
Expand Down
Loading

0 comments on commit 1e0eca9

Please sign in to comment.