Commit 71aee6d2 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

filtering by submap implemented

parent d7f142ab
......@@ -20,7 +20,7 @@ minerva (12.3.0~alpha.0) unstable; urgency=low
whitespace, "_" used as separator (#596)
* Small improvement: list of references in drug panel contains PUBMED prefix
(#666)
* Small improvement: list of projects is aut refreshed every 5 seconds if at
* Small improvement: list of projects is auto refreshed every 5 seconds if at
least one of the project is uploading/removing (#610)
* Small improvement: passwords to email account and ldap are not sent over
API (#732)
......@@ -35,8 +35,8 @@ minerva (12.3.0~alpha.0) unstable; urgency=low
type (#784)
* Small improvement: when plugin listeners crash the system notifies user
about problem with a plugin (#767)
* Small improvement: when exporting list of reaction there is possibility to
filter by (sub)map (#615)
* Small improvement: when exporting reaction and elements there is
possibility to filter by (sub)map (#615)
* Bug fix: progress bar of gene genome mapping upload is refreshing properly
(#728)
* Bug fix: when editing project Disease and Organism could not be removed
......
......@@ -6,6 +6,8 @@ var AbstractExportPanel = require('./AbstractExportPanel');
var ValidationError = require('../../ValidationError');
var IdentifiedElement = require('../../map/data/IdentifiedElement');
var Functions = require('../../Functions');
// noinspection JSUnusedLocalSymbols
var logger = require('../../logger');
......@@ -40,6 +42,9 @@ ElementExportPanel.prototype.init = function () {
var configuration = self.getConfiguration();
var typeDiv = self._createSelectTypeDiv(configuration.getElementTypes());
element.appendChild(typeDiv);
var submapDiv = Functions.createElement({type: "div", name: "submapTypes"});
submapDiv.appendChild(self._createSelectSubmapDiv(self.getProject().getModels()));
element.appendChild(submapDiv);
element.appendChild(self._createSelectColumnDiv(self.getAllColumns()));
return self.getServerConnector().getProjectStatistics(self.getProject().getProjectId()).then(function (statistics) {
return self._createMiriamTypeDiv(statistics.getElementAnnotations());
......@@ -66,6 +71,7 @@ ElementExportPanel.prototype.createResponseString = function () {
var types, miriamTypes;
var includedCompartmentIds = [];
var excludedCompartmentIds = [];
var submapIds = self.getSelectedSubmapIds();
var models = self.getProject().getModels();
var elements = [];
......@@ -87,12 +93,15 @@ ElementExportPanel.prototype.createResponseString = function () {
var promises = [];
for (var i = 0; i < models.length; i++) {
promises.push(models[i].getAliases({
type: types,
complete: true,
includedCompartmentIds: includedCompartmentIds,
excludedCompartmentIds: excludedCompartmentIds
}));
var model = models[i];
if (submapIds.length === 0 || $.inArray(model.getId(), submapIds) >= 0) {
promises.push(model.getAliases({
type: types,
complete: true,
includedCompartmentIds: includedCompartmentIds,
excludedCompartmentIds: excludedCompartmentIds
}));
}
}
return Promise.all(promises);
}).then(function (aliasesByModel) {
......
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