Commit bc5f6e96 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

submap checkbox must be selected

parent ca1661e8
Pipeline #12764 passed with stage
in 13 minutes and 2 seconds
minerva (13.1.3) stable; urgency=medium
* Bug fix: refreshing list of projects or list of users doesn't change active
page (#870)
* Bug fix: submap list must be selected to export from every submap (#874)
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 14 Aug 2019 17:00:00 +0200
......
......@@ -222,7 +222,7 @@ AbstractExportPanel.prototype._createSelectSubmapDiv = function (models) {
var id = model.getId();
var row = Functions.createElement({
type: "li",
content: "<div class=\"checkbox\"><label> <input type=\"checkbox\" name=\"" + name + "\" value=\"" + id + "\" />" + name + "</label></div>",
content: "<div class=\"checkbox\"><label> <input type=\"checkbox\" name=\"" + name + "\" value=\"" + id + "\" checked/>" + name + "</label></div>",
xss: false
});
choicesContainer.appendChild(row);
......
......@@ -94,7 +94,7 @@ ElementExportPanel.prototype.createResponseString = function () {
var promises = [];
for (var i = 0; i < models.length; i++) {
var model = models[i];
if (submapIds.length === 0 || $.inArray(model.getId(), submapIds) >= 0) {
if ($.inArray(model.getId(), submapIds) >= 0) {
promises.push(model.getAliases({
type: types,
complete: true,
......
......@@ -146,11 +146,9 @@ function matchReaction(reaction, elementIds, reactionTypes, submapIds) {
if ($.inArray(reaction.getType(), reactionTypes) === -1) {
return false;
}
if (submapIds.length > 0) {
if ($.inArray(reaction.getModelId(), submapIds) === -1) {
return false;
}
}
var count = 0;
reaction.getElements().forEach(function (element) {
if (elementIds[element.getId()]) {
......
Supports Markdown
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