Commit ace4aa80 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

show number of hits per map

parent 523553e2
Pipeline #46860 canceled with stage
in 1 minute and 23 seconds
minerva (16.0.0~beta.2) stable; urgency=medium minerva (16.0.0~beta.2) stable; urgency=medium
* Small improvement: backgrounds are separated from general overlays (#1532) * Small improvement: backgrounds are separated from general overlays (#1532)
* Small improvement: layout of pin popup window is slitghly improved (#1493) * Small improvement: layout of pin popup window is slitghly improved (#1493)
* Small improvement: search results are grouped by submap with hits (#1505)
* Bug fix: correct background order for old projects restored (#1533) * Bug fix: correct background order for old projects restored (#1533)
* Bug fix: search chemicals by target returned chemicals not bounded by * Bug fix: search chemicals by target returned chemicals not bounded by
disease (#1535) disease (#1535)
......
...@@ -124,16 +124,16 @@ GenericSearchPanel.prototype.createTableElement = function (element, icon) { ...@@ -124,16 +124,16 @@ GenericSearchPanel.prototype.createTableElement = function (element, icon) {
var result = document.createElement("div"); var result = document.createElement("div");
var table = document.createElement("table"); var table = document.createElement("table");
var expandStyle = "fa-eye"; var expandStyle = "fa-eye";
var headerDiv; var label = "";
if (element.getModelId() !== self.getMap().getId()) { if (element.getModelId() !== self.getMap().getId()) {
headerDiv = guiUtils.createSubMapLink({ label = "Submap: ";
label: "Submap: ",
mapId: element.getModelId()
});
} else { } else {
headerDiv = document.createElement("div"); label = "Top map: ";
$(headerDiv).css("height", "21px");
} }
var headerDiv = guiUtils.createSubMapLink({
label: label + "("+element.getBioEntities().length + " hits): ",
mapId: element.getModelId()
});
$(headerDiv).css("padding", "5px"); $(headerDiv).css("padding", "5px");
$(table).hide(); $(table).hide();
result.appendChild(headerDiv); result.appendChild(headerDiv);
...@@ -189,13 +189,7 @@ GenericSearchPanel.prototype.addResultTab = function (query, elements) { ...@@ -189,13 +189,7 @@ GenericSearchPanel.prototype.addResultTab = function (query, elements) {
groupsByMap[element.getModelId()].addBioEntity(element); groupsByMap[element.getModelId()].addBioEntity(element);
} }
} }
return AbstractDbPanel.prototype.addResultTab.call(this, query, groups).then(function () { return AbstractDbPanel.prototype.addResultTab.call(this, query, groups);
var contentElement = self.getControlElement(PanelControlElementType.SEARCH_RESULTS_CONTENT_TAB);
var links = $(".table div>a.minerva-toggle-hide-show", contentElement);
if (links.length > 0) {
links[0].onclick();
}
});
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment