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
* 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: search chemicals by target returned chemicals not bounded by
disease (#1535)
......@@ -12,7 +14,7 @@ minerva (16.0.0~beta.2) stable; urgency=medium
caused issue (#1546)
* 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
* Backward incompatibility: layout parameter in minerva url is not supported
......
......@@ -124,16 +124,16 @@ GenericSearchPanel.prototype.createTableElement = function (element, icon) {
var result = document.createElement("div");
var table = document.createElement("table");
var expandStyle = "fa-eye";
var headerDiv;
var label = "";
if (element.getModelId() !== self.getMap().getId()) {
headerDiv = guiUtils.createSubMapLink({
label: "Submap: ",
mapId: element.getModelId()
});
label = "Submap: ";
} else {
headerDiv = document.createElement("div");
$(headerDiv).css("height", "21px");
label = "Top map: ";
}
var headerDiv = guiUtils.createSubMapLink({
label: label + "("+element.getBioEntities().length + " hits): ",
mapId: element.getModelId()
});
$(headerDiv).css("padding", "5px");
$(table).hide();
result.appendChild(headerDiv);
......@@ -189,13 +189,7 @@ GenericSearchPanel.prototype.addResultTab = function (query, elements) {
groupsByMap[element.getModelId()].addBioEntity(element);
}
}
return AbstractDbPanel.prototype.addResultTab.call(this, query, groups).then(function () {
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();
}
});
return AbstractDbPanel.prototype.addResultTab.call(this, query, groups);
}
/**
......
......@@ -464,11 +464,11 @@ AbstractInfoWindow.prototype._createTargetInfoDiv = function (params) {
result.appendChild(titleElement);
if (overlay.allowGeneralSearch()) {
var checkboxDiv = document.createElement("div");
checkboxDiv.style.textAlign = "center";
var showAllButton = document.createElement("button");
var hideAllButton = document.createElement("button");
var checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.checked = self.isOverlayFullView(overlay.getName());
checkbox.onclick = function () {
var toggleAll = function (show) {
var ie = new IdentifiedElement(self.alias);
result.removeChild(table);
var messageImg = Functions.createElement({
......@@ -476,20 +476,42 @@ AbstractInfoWindow.prototype._createTargetInfoDiv = function (params) {
src: 'resources/images/icons/ajax-loader.gif'
});
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);
result.appendChild(table);
}).finally(function () {
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);
}
var count = 0;
......@@ -529,7 +551,10 @@ AbstractInfoWindow.prototype._createTableForTargetDiv = function (data, overlay)
},
columns: [{
title: 'Name'
}]
}],
language: {
emptyTable: "Currently not showing any " + overlay.getName() + " entries"
}
});
$(table).on("click", "a", function () {
......
......@@ -297,6 +297,7 @@ AliasInfoWindow.prototype.createChartDiv = function (params) {
result.appendChild(rows[i][j]);
}
}
result.appendChild( document.createElement("br"));
return result;
});
};
......@@ -555,6 +556,7 @@ AliasInfoWindow.prototype.createGenomicDiv = function (params) {
zoomOut.appendTo(zoomControls);
}
result.appendChild( document.createElement("br"));
return result;
} else {
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