Commit 46241de0 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '874-submap-checkboxes' into 'devel_13.1.x'

submap checkbox must be selected

See merge request !881
parents f092b0ce bc5f6e96
Pipeline #12768 passed with stage
in 14 minutes and 24 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,10 +146,8 @@ 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;
}
if ($.inArray(reaction.getModelId(), submapIds) === -1) {
return false;
}
var count = 0;
reaction.getElements().forEach(function (element) {
......
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