From cf647412fb952cbc27307aea060260805843b1f8 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 24 Mar 2021 11:33:10 +0100 Subject: [PATCH 1/3] Make sure elements are ldda when importing from library --- .../TopToolbar/import-to-history/import-collection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js b/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js index aa28e937636..92f7105c253 100644 --- a/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js +++ b/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js @@ -155,12 +155,12 @@ var ImportCollectionModal = Backbone.View.extend({ { name: "forward", id: pair.forward.id, - src: pair.forward.src || "hda", + src: "ldda", }, { name: "reverse", id: pair.reverse.id, - src: pair.reverse.src || "hda", + src: "ldda", }, ], })); From ba6dbe951382e7aa1539b14ede82c1b3631aae8b Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 24 Mar 2021 11:48:22 +0100 Subject: [PATCH 2/3] Fix importing collection from library into new history --- .../TopToolbar/import-to-history/import-collection.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js b/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js index 92f7105c253..30aaa0b1fec 100644 --- a/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js +++ b/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js @@ -34,8 +34,9 @@ var ImportCollectionModal = Backbone.View.extend({ this.histories = new mod_library_model.GalaxyHistories(); return this.histories.fetch(); }, - createNewHistory: function (new_history_name) { - return axios.post(`${getAppRoot()}api/histories`, { name: new_history_name }); + async createNewHistory(new_history_name) { + const { data } = await axios.post(`${getAppRoot()}api/histories`, { name: new_history_name }); + return data; }, showCollectionSelect: function (e) { const Galaxy = getGalaxyInstance(); From 5292bedabd0250bd54a02a99538c8041f96bebb2 Mon Sep 17 00:00:00 2001 From: Marius van den Beek Date: Wed, 24 Mar 2021 14:54:24 +0100 Subject: [PATCH 3/3] Switch to newly created history Co-authored-by: Oleg Zharkov --- .../TopToolbar/import-to-history/import-collection.js | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js b/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js index 30aaa0b1fec..b1325b50c9c 100644 --- a/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js +++ b/client/src/components/LibraryFolder/TopToolbar/import-to-history/import-collection.js @@ -36,6 +36,7 @@ var ImportCollectionModal = Backbone.View.extend({ }, async createNewHistory(new_history_name) { const { data } = await axios.post(`${getAppRoot()}api/histories`, { name: new_history_name }); + getGalaxyInstance().currHistoryPanel.switchToHistory(data.id); return data; }, showCollectionSelect: function (e) {