Commit 2eb8f24e authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '998-data-overlay-type' into 'devel_14.0.x'

disable select type button when type is defined in the file

See merge request minerva/core!1000
parents 098df4d0 06772034
minerva (14.0.3) stable; urgency=medium
* Bug fix: some SBGN files uploaded to minerva could not be exported to SBML
due to problems with identifiers used by SBGN (#1006)
* Bug fix: upload of data overlay with conflicting overlay types caused error
(#998)
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 06 Nov 2019 12:00:00 +0200
......
......@@ -163,10 +163,13 @@ AddOverlayDialog.prototype.processFile = function (file) {
descriptionInput.value = overlay.getDescription();
}
var typeSelect = $("[name='overlay-type']", self.getElement())[0];
$(typeSelect).attr("disabled", false);
if (overlay.getType() !== undefined) {
var typeSelect = $("[name='overlay-type']", self.getElement())[0];
if ($("option[value='" + overlay.getType() + "']", typeSelect).length === 0) {
GuiConnector.warn("Invalid type: " + overlay.getType());
} else {
$(typeSelect).attr("disabled", true);
}
self.setType(overlay.getType());
} else {
......
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