Merge branch 'release_23.1' into release_23.2

This commit is contained in:
mvdbeek
2024-01-17 10:57:25 +01:00
8 changed files with 25 additions and 27 deletions
@@ -29,7 +29,6 @@ function listCollectionCreatorModal(elements, options) {
*/
function createListCollection(contents, defaultHideSourceItems = true) {
const elements = contents.toJSON();
let copyElements;
const promise = listCollectionCreatorModal(elements, {
defaultHideSourceItems: defaultHideSourceItems,
creationFn: function (elements, name, hideSourceItems) {
@@ -39,8 +38,7 @@ function createListCollection(contents, defaultHideSourceItems = true) {
//TODO: this allows for list:list even if the filter above does not - reconcile
src: element.src || (element.history_content_type == "dataset" ? "hda" : "hdca"),
}));
copyElements = !hideSourceItems;
return contents.createHDCA(elements, "list", name, hideSourceItems, copyElements);
return contents.createHDCA(elements, "list", name, hideSourceItems);
},
});
return promise;
@@ -25,7 +25,6 @@ function pairCollectionCreatorModal(elements, options) {
}
function createPairCollection(contents, defaultHideSourceItems = true) {
var elements = contents.toJSON();
var copyElements;
var promise = pairCollectionCreatorModal(elements, {
defaultHideSourceItems: defaultHideSourceItems,
creationFn: function (elements, name, hideSourceItems) {
@@ -33,8 +32,7 @@ function createPairCollection(contents, defaultHideSourceItems = true) {
{ name: "forward", src: elements[0].src || "hda", id: elements[0].id },
{ name: "reverse", src: elements[1].src || "hda", id: elements[1].id },
];
copyElements = !hideSourceItems;
return contents.createHDCA(elements, "paired", name, hideSourceItems, copyElements);
return contents.createHDCA(elements, "paired", name, hideSourceItems);
},
});
return promise;
@@ -29,7 +29,6 @@ function pairedListCollectionCreatorModal(elements, options) {
*/
function createPairedListCollection(contents, defaultHideSourceItems) {
const elements = contents.toJSON();
var copyElements;
const promise = pairedListCollectionCreatorModal(elements, {
defaultHideSourceItems: defaultHideSourceItems,
creationFn: function (elements, name, hideSourceItems) {
@@ -50,8 +49,7 @@ function createPairedListCollection(contents, defaultHideSourceItems) {
},
],
}));
copyElements = !hideSourceItems;
return contents.createHDCA(elements, "list:paired", name, hideSourceItems, copyElements);
return contents.createHDCA(elements, "list:paired", name, hideSourceItems);
},
});
return promise;
@@ -48,7 +48,6 @@ function createCollectionViaRules(selection, defaultHideSourceItems = true) {
let elementsType;
let importType;
const selectionType = selection.selectionType;
const copyElements = !defaultHideSourceItems;
if (!selectionType) {
// Have HDAs from the history panel.
elements = selection.toJSON();
@@ -82,7 +81,7 @@ function createCollectionViaRules(selection, defaultHideSourceItems = true) {
ftpUploadSite: selection.ftpUploadSite,
defaultHideSourceItems: defaultHideSourceItems,
creationFn: function (elements, collectionType, name, hideSourceItems) {
return selection.createHDCA(elements, collectionType, name, hideSourceItems, copyElements);
return selection.createHDCA(elements, collectionType, name, hideSourceItems);
},
});
return promise;
@@ -45,12 +45,11 @@ const createBackboneContent = (historyId, selection) => {
toJSON: () => selectionJson,
// result must be a $.Deferred object instead of a promise because
// that's the kind of deprecated data format that backbone likes to use.
createHDCA(element_identifiers, collection_type, name, hide_source_items, copy_elements, options = {}) {
createHDCA(element_identifiers, collection_type, name, hide_source_items, options = {}) {
const def = jQuery.Deferred();
return def.resolve(null, {
collection_type,
name,
copy_elements,
hide_source_items,
element_identifiers,
options,