diff --git a/CHANGELOG b/CHANGELOG index 71510373a87174cd4c22c6c6e492264a79a69fbe..34e4b4e661492a744fd36167fa72bf524f69fa1f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,10 @@ minerva (12.3.1~beta.1) unstable; urgency=low * Bug fix: invisible layer shouldn't be shown in the on th map (#813) * Bug fix: list of availbale annotators is sorted alphabetically (#815) * Bug fix: redirect url from export panel is fixed (#819) + * Bug fix: allow to reupload the same file without closing add overlay dialog + (#833) + * Bug fix: gene_name column is allowed only in the genetic variant data + overlay * Bug fix: protein types are sorted properly in "Select valid annotations" dialog (#815) * Bug fix: if there is a description of (sub)map then it is available in diff --git a/frontend-js/src/main/js/gui/AddOverlayDialog.js b/frontend-js/src/main/js/gui/AddOverlayDialog.js index 5fff0a74a24f93d0e8dedc1227d98d7af8aa1459..f860127ded2f141821f87ad83edc94ec3b74a559 100644 --- a/frontend-js/src/main/js/gui/AddOverlayDialog.js +++ b/frontend-js/src/main/js/gui/AddOverlayDialog.js @@ -94,7 +94,9 @@ AddOverlayDialog.prototype.createGui = function () { name: "overlay-file" }); fileInput.addEventListener("change", function () { - return self.processFile(fileInput.files[0]).then(null, GuiConnector.alert); + return self.processFile(fileInput.files[0]).then(function () { + $(fileInput).val(""); + }).catch(GuiConnector.alert); }, false); content.appendChild(fileInput); content.appendChild(guiUtils.createNewLine()); diff --git a/service/src/main/java/lcsb/mapviewer/services/utils/ColorSchemaReader.java b/service/src/main/java/lcsb/mapviewer/services/utils/ColorSchemaReader.java index 93f0517170e9eacc52896733cb34508405b86ef6..3b2eb71dc6ed4bc53e74ff4eefa8102a6c535c38 100644 --- a/service/src/main/java/lcsb/mapviewer/services/utils/ColorSchemaReader.java +++ b/service/src/main/java/lcsb/mapviewer/services/utils/ColorSchemaReader.java @@ -162,6 +162,9 @@ public class ColorSchemaReader { Integer nameColumn = schemaColumns.get(ColorSchemaColumn.NAME); if (nameColumn == null) { nameColumn = schemaColumns.get(ColorSchemaColumn.GENE_NAME); + } else if (schemaColumns.get(ColorSchemaColumn.GENE_NAME) != null) { + throw new InvalidColorSchemaException(ColorSchemaColumn.GENE_NAME + " and " + ColorSchemaColumn.NAME + + " column cannot appear in the same dataset"); } Integer modelNameColumn = schemaColumns.get(ColorSchemaColumn.MODEL_NAME); Integer identifierColumn = schemaColumns.get(ColorSchemaColumn.IDENTIFIER); @@ -292,7 +295,7 @@ public class ColorSchemaReader { gv.setContig(values[contigColumn]); schema.addGeneVariation(gv); - if (schema.getName()!=null && schema.getName().contains(";")) { + if (schema.getName() != null && schema.getName().contains(";")) { String[] names = schema.getName().split(";"); for (String string : names) { if (!string.trim().isEmpty()) { diff --git a/service/src/main/java/lcsb/mapviewer/services/utils/data/ColorSchemaColumn.java b/service/src/main/java/lcsb/mapviewer/services/utils/data/ColorSchemaColumn.java index 8fd9276dfe5579067dca98d62c7c731ece156f82..5cbcc2e705d9551376089163c832de4a38150096 100644 --- a/service/src/main/java/lcsb/mapviewer/services/utils/data/ColorSchemaColumn.java +++ b/service/src/main/java/lcsb/mapviewer/services/utils/data/ColorSchemaColumn.java @@ -21,7 +21,7 @@ public enum ColorSchemaColumn { */ NAME(new ColorSchemaType[] { ColorSchemaType.GENERIC, ColorSchemaType.GENETIC_VARIANT }), - GENE_NAME(new ColorSchemaType[] { ColorSchemaType.GENERIC, ColorSchemaType.GENETIC_VARIANT }), + GENE_NAME(new ColorSchemaType[] { ColorSchemaType.GENETIC_VARIANT }), /** * Name of the element.