Commit 523553e2 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

layout improved

parent c72fb9e6
Pipeline #46858 failed with stage
in 11 minutes and 13 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)
* Bug fix: correct background order for old projects restored (#1533)
* Bug fix: search chemicals by target returned chemicals not bounded by
disease (#1535)
......
......@@ -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