Commit 9a86f6b9 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '1493-pin-dispaly' into 'devel_16.0.x'

layout improved

See merge request !1346
parents bd31515b ae7ad1b7
Pipeline #47653 passed with stage
in 37 minutes and 3 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: 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)
...@@ -12,7 +14,7 @@ minerva (16.0.0~beta.2) stable; urgency=medium ...@@ -12,7 +14,7 @@ minerva (16.0.0~beta.2) stable; urgency=medium
caused issue (#1546) caused issue (#1546)
* Bug fix: search results were limited to 10 elements * Bug fix: search results were limited to 10 elements
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 3 Sep 2021 11:00:00 +0200 -- Piotr Gawron <piotr.gawron@uni.lu> Thu, 9 Sep 2021 11:00:00 +0200
minerva (16.0.0~beta.1) stable; urgency=medium minerva (16.0.0~beta.1) stable; urgency=medium
* Backward incompatibility: layout parameter in minerva url is not supported * Backward incompatibility: layout parameter in minerva url is not supported
......
...@@ -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();
}
});
} }
/** /**
......
...@@ -464,11 +464,11 @@ AbstractInfoWindow.prototype._createTargetInfoDiv = function (params) { ...@@ -464,11 +464,11 @@ AbstractInfoWindow.prototype._createTargetInfoDiv = function (params) {
result.appendChild(titleElement); result.appendChild(titleElement);
if (overlay.allowGeneralSearch()) { if (overlay.allowGeneralSearch()) {
var checkboxDiv = document.createElement("div"); var checkboxDiv = document.createElement("div");
checkboxDiv.style.textAlign = "center";
var showAllButton = document.createElement("button");
var hideAllButton = document.createElement("button");
var checkbox = document.createElement("input"); var toggleAll = function (show) {
checkbox.type = "checkbox";
checkbox.checked = self.isOverlayFullView(overlay.getName());
checkbox.onclick = function () {
var ie = new IdentifiedElement(self.alias); var ie = new IdentifiedElement(self.alias);
result.removeChild(table); result.removeChild(table);
var messageImg = Functions.createElement({ var messageImg = Functions.createElement({
...@@ -476,20 +476,42 @@ AbstractInfoWindow.prototype._createTargetInfoDiv = function (params) { ...@@ -476,20 +476,42 @@ AbstractInfoWindow.prototype._createTargetInfoDiv = function (params) {
src: 'resources/images/icons/ajax-loader.gif' src: 'resources/images/icons/ajax-loader.gif'
}); });
result.appendChild(messageImg); result.appendChild(messageImg);
return overlay.getDetailDataByIdentifiedElement(ie, this.checked).then(function (data) { return overlay.getDetailDataByIdentifiedElement(ie, show).then(function (data) {
table = self._createTableForTargetDiv(data, overlay); table = self._createTableForTargetDiv(data, overlay);
result.appendChild(table); result.appendChild(table);
}).finally(function () { }).finally(function () {
result.removeChild(messageImg); result.removeChild(messageImg);
if (show) {
$(showAllButton).hide();
$(hideAllButton).show();
} else {
$(hideAllButton).hide();
$(showAllButton).show();
}
}) })
}; };
checkboxDiv.appendChild(checkbox); showAllButton.style.display = "inline-block";
showAllButton.innerHTML = "Click to show all " + overlay.getName() + "s for ths element";
showAllButton.onclick = function () {
toggleAll(true);
}
checkboxDiv.appendChild(showAllButton);
hideAllButton.style.display = "inline-block";
hideAllButton.innerHTML = "Click to hide all " + overlay.getName() + "s for ths element";
hideAllButton.onclick = function () {
toggleAll(false);
}
checkboxDiv.appendChild(hideAllButton);
if (self.isOverlayFullView(overlay.getName())) {
$(showAllButton).hide();
} else {
$(hideAllButton).hide();
}
var description = document.createElement("div");
description.style.display = "inline-block";
description.innerHTML = "Show all";
checkboxDiv.appendChild(description);
result.appendChild(checkboxDiv); result.appendChild(checkboxDiv);
} }
var count = 0; var count = 0;
...@@ -529,7 +551,10 @@ AbstractInfoWindow.prototype._createTableForTargetDiv = function (data, overlay) ...@@ -529,7 +551,10 @@ AbstractInfoWindow.prototype._createTableForTargetDiv = function (data, overlay)
}, },
columns: [{ columns: [{
title: 'Name' title: 'Name'
}] }],
language: {
emptyTable: "Currently not showing any " + overlay.getName() + " entries"
}
}); });
$(table).on("click", "a", function () { $(table).on("click", "a", function () {
......
...@@ -297,6 +297,7 @@ AliasInfoWindow.prototype.createChartDiv = function (params) { ...@@ -297,6 +297,7 @@ AliasInfoWindow.prototype.createChartDiv = function (params) {
result.appendChild(rows[i][j]); result.appendChild(rows[i][j]);
} }
} }
result.appendChild( document.createElement("br"));
return result; return result;
}); });
}; };
...@@ -555,6 +556,7 @@ AliasInfoWindow.prototype.createGenomicDiv = function (params) { ...@@ -555,6 +556,7 @@ AliasInfoWindow.prototype.createGenomicDiv = function (params) {
zoomOut.appendTo(zoomControls); zoomOut.appendTo(zoomControls);
} }
result.appendChild( document.createElement("br"));
return result; return result;
} else { } else {
return document.createElement("div"); return document.createElement("div");
......
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