Skip to content

Commit

Permalink
do not suggest wildcard if it is quoted
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouji2013 committed Apr 23, 2022
1 parent a2b209a commit 45dded5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h3>Sorry, no results found</h3>
<p>
<p id=suggesting-wildcard>
Would you like to extend your search with a wildcard?
(<i>e.g.</i> <a href="#/search/{{encodeURIComponent(term)}}*">{{term.replaceAll("`","'")}}*</a>)
</p>
Expand Down
5 changes: 4 additions & 1 deletion web/src/main/webapp/js/ctd2.js
Original file line number Diff line number Diff line change
Expand Up @@ -2396,7 +2396,10 @@ import ObservationView from './observation.view.js'
template: _.template($("#search-empty-tmpl").html()),
render: function () {
$(this.el).append(this.template(this.model));

if (this.model.term.endsWith('"')) {
$("#suggesting-wildcard").hide()
$("#suggesting-wildcard").parent().width("100%")
}
return this;
}
});
Expand Down

0 comments on commit 45dded5

Please sign in to comment.