Skip to content

Commit

Permalink
flag the new results added by ontology search. see comment for issue #…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouji2013 committed Aug 9, 2021
1 parent d9425cc commit 4b022af
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 10 additions & 2 deletions web/src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -1686,9 +1686,13 @@
<script type="text/template" id="search-result-row-tmpl">
<tr>
<td id="search-image-{{dashboardEntity.id}}"></td>
<td>
<td style="position:relative">
<a href="#{{dashboardEntity.stableURL}}">{{dashboardEntity.displayName}}</a><br>
<i>{{dashboardEntity.organism.displayName != '-' ? "(" + dashboardEntity.organism.displayName + ")" : ""}}</i>
<svg height="10" width="10" style="position:absolute;top:0;right:0" display={{ontology?'block':'none'}}>
<polygon points="10,10 0,0 10,0" style="fill:DodgerBlue;stroke:black;stroke-width:1" />
Sorry, your browser does not support inline SVG.
</svg>
</td>
<td>
<ul id="synonyms-{{dashboardEntity.id}}">
Expand All @@ -1713,11 +1717,15 @@
<script type="text/template" id="search-result-gene-row-tmpl">
<tr>
<td id="search-image-{{dashboardEntity.id}}"></td>
<td>
<td style="position:relative">
<a href="#{{dashboardEntity.stableURL}}">{{dashboardEntity.displayName}}</a>
<a href="#" class="addGene-{{dashboardEntity.displayName}} cartAddPlus" data-content="Add gene to cart" >+</a>
<br>
<i>{{dashboardEntity.organism.displayName != '-' ? "(" + dashboardEntity.organism.displayName + ")" : ""}}</i>
<svg height="10" width="10" style="position:absolute;top:0;right:0" display={{ontology?'block':'none'}}>
<polygon points="10,10 0,0 10,0" style="fill:DodgerBlue;stroke:black;stroke-width:1" />
Sorry, your browser does not support inline SVG.
</svg>
</td>
<td>
<ul id="synonyms-{{dashboardEntity.id}}">
Expand Down
4 changes: 4 additions & 0 deletions web/src/main/webapp/js/ctd2.js
Original file line number Diff line number Diff line change
Expand Up @@ -3009,6 +3009,9 @@
template: _.template($("#search-result-row-tmpl").html()),
render: function () {
const model = this.model;
if(!model.ontology) {
model.ontology = false
}
const result = model.dashboardEntity;

if (result.class != "Gene") {
Expand Down Expand Up @@ -3158,6 +3161,7 @@
displayName: "-"
};
}
one_result.ontology = true;
new SearchResultsRowView({
model: one_result,
el: $(thatEl).find("tbody")
Expand Down

0 comments on commit 4b022af

Please sign in to comment.