Skip to content
Snippets Groups Projects
Commit dd0ccb13 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

submap description is available

parent 2180ef48
No related branches found
No related tags found
2 merge requests!805Merge 13.1.0 beta.1,!794Resolve "CellDesigner Model Notes are not displayed in MINERVA"
Pipeline #10512 failed
......@@ -7,6 +7,8 @@ minerva (12.3.1~beta.1) unstable; urgency=low
* Bug fix: list of availbale annotators is sorted alphabetically (#815)
* 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
info/submap panel (#824)
minerva (13.1.0~beta.0) unstable; urgency=low
* Feature: annotators are more flexible - you can define set of input and
......
......@@ -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()
}));
}
};
......
......@@ -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",
......
......@@ -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;
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment