diff --git a/CHANGELOG b/CHANGELOG index 9b047981e4dabf0155bf89d52380bceffacae6f4..8c261f3e044ec89109a20f1b00445726b6bb5b67 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,9 +6,11 @@ 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: protein types are sorted properly in "Select valid annotations" + * Bug fix: protein types are sorted properly in "Select valid annotations" dialog (#815) - * Bug fix: when changing data in edit user dialog there was a need to click + * Bug fix: if there is a description of (sub)map then it is available in + info/submap panel (#824) + * Bug fix: when changing data in edit user dialog there was a need to click close button twice (#818) minerva (13.1.0~beta.0) unstable; urgency=low diff --git a/frontend-js/src/main/js/gui/leftPanel/ProjectInfoPanel.js b/frontend-js/src/main/js/gui/leftPanel/ProjectInfoPanel.js index 4c61b833f0c665c2eaba220ceb8477ab2db4ba1c..0ed1dc7a4c51b4d495ad274ddda3460f60a9b464 100644 --- a/frontend-js/src/main/js/gui/leftPanel/ProjectInfoPanel.js +++ b/frontend-js/src/main/js/gui/leftPanel/ProjectInfoPanel.js @@ -235,6 +235,22 @@ ProjectInfoPanel.prototype._createInfoPanelGui = function () { authorsTab.appendChild(guiUtils.createAuthorsList(self.getProject().getModels()[0].getAuthors())); } + if (self.getProject().getModels()[0].getDescription() !== null && self.getProject().getModels()[0].getDescription() !== "") { + var descriptionTab = Functions.createElement({ + type: "div" + }); + infoDiv.appendChild(descriptionTab); + + descriptionTab.appendChild(Functions.createElement({ + type: "h4", + content: 'Description:' + })); + descriptionTab.appendChild(Functions.createElement({ + type: "p", + content: self.getProject().getModels()[0].getDescription() + })); + } + }; diff --git a/frontend-js/src/main/js/gui/leftPanel/SubmapPanel.js b/frontend-js/src/main/js/gui/leftPanel/SubmapPanel.js index 150c09f77133a1f6aebb220e8b1dfdf941203590..dfe1ea7c4d00cb842a7ae455df6736c5b079ca77 100644 --- a/frontend-js/src/main/js/gui/leftPanel/SubmapPanel.js +++ b/frontend-js/src/main/js/gui/leftPanel/SubmapPanel.js @@ -64,7 +64,8 @@ SubmapPanel.prototype.createRow = function (model) { var nameTd = Functions.createElement({type: "td", content: model.getName(), style: "position:relative"}); - if (model.getReferences().length > 0 || model.getAuthors().length > 0) { + if (model.getReferences().length > 0 || model.getAuthors().length > 0 || + (model.getDescription() !== null && model.getDescription() !== "")) { var referencesTab = Functions.createElement({ type: "div", className: "minerva-search-data-hidden" @@ -88,6 +89,16 @@ SubmapPanel.prototype.createRow = function (model) { referencesTab.appendChild(authors); referencesTab.appendChild(guiUtils.createAuthorsList(model.getAuthors())); } + if (model.getDescription() !== null && model.getDescription() !== "") { + referencesTab.appendChild(Functions.createElement({ + type: "div", + content: 'Description:' + })); + referencesTab.appendChild(Functions.createElement({ + type: "p", + content: model.getDescription() + })); + } var expandButton = Functions.createElement({ type: "button", diff --git a/frontend-js/src/main/js/map/data/MapModel.js b/frontend-js/src/main/js/map/data/MapModel.js index 0149eed1f912ed013393b045ab521cfe01cc0d9d..ed7ff8b9c8e7ddfabd5133ad26f3e458d0333f92 100644 --- a/frontend-js/src/main/js/map/data/MapModel.js +++ b/frontend-js/src/main/js/map/data/MapModel.js @@ -23,6 +23,7 @@ var Reaction = require('./Reaction'); * @typedef {Object} MapModelOptions * @property {number} idObject * @property {string} name + * @property {string} description * @property {number} tileSize * @property {number} width * @property {number} height @@ -90,6 +91,7 @@ function MapModel(configuration) { this.setAuthors(configuration.getAuthors()); this.setModificationDates(configuration.getModificationDates()); this.setCreationDate(configuration.getCreationDate()); + this.setDescription(configuration.getDescription()); } else { this.setId(configuration.idObject); this.setName(configuration.name); @@ -106,6 +108,7 @@ function MapModel(configuration) { this.setAuthors(configuration.authors); this.setModificationDates(configuration.modificationDates); this.setCreationDate(configuration.creationDate); + this.setDescription(configuration.description); } } } @@ -980,4 +983,21 @@ MapModel.prototype.setCreationDate = function (creationDate) { this._creationDate = creationDate; }; +/** + * + * @returns {string|null} + */ +MapModel.prototype.getDescription = function () { + return this._description; +}; + +/** + * + * @param {string} description + */ +MapModel.prototype.setDescription = function (description) { + this._description = description; +}; + + module.exports = MapModel; diff --git a/rest-api/src/main/java/lcsb/mapviewer/api/projects/models/ModelRestImpl.java b/rest-api/src/main/java/lcsb/mapviewer/api/projects/models/ModelRestImpl.java index 133f407c2fb7e45dc48667f19b8a87cdec98e501..17926f3816c8dcf5aa680f82b9dc9348ac595ca8 100644 --- a/rest-api/src/main/java/lcsb/mapviewer/api/projects/models/ModelRestImpl.java +++ b/rest-api/src/main/java/lcsb/mapviewer/api/projects/models/ModelRestImpl.java @@ -116,6 +116,7 @@ public class ModelRestImpl extends BaseRestImpl { result.put("authors", submodel.getAuthors()); result.put("creationDate", super.prepareDate(submodel.getCreationDate())); result.put("modificationDates", super.prepareDates(submodel.getModificationDates())); + result.put("description", submodel.getNotes()); return result; } }