Commit 67b8c7ef authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '818-need-to-close-edit-project' into 819-redirect-from-export

parents c9ddb411 80b9bd0a
......@@ -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
......
......@@ -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;
}
}
......
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