diff --git a/client/galaxy/scripts/mvc/collection/list-of-pairs-collection-creator.js b/client/galaxy/scripts/mvc/collection/list-of-pairs-collection-creator.js index d2754caae16..15a2998f08a 100644 --- a/client/galaxy/scripts/mvc/collection/list-of-pairs-collection-creator.js +++ b/client/galaxy/scripts/mvc/collection/list-of-pairs-collection-creator.js @@ -1796,7 +1796,8 @@ var pairedCollectionCreatorModal = function _pairedCollectionCreatorModal(datase oncreate: function(creator, response) { Galaxy.modal.hide(); deferred.resolve(response); - } + }, + title: _l("Create a collection of paired datasets") }); if (!window.Galaxy || !Galaxy.modal) { @@ -1805,7 +1806,7 @@ var pairedCollectionCreatorModal = function _pairedCollectionCreatorModal(datase creator = new PairedCollectionCreator(options); Galaxy.modal.show({ - title: _l("Create a collection of paired datasets"), + title: options.title, body: creator.$el, width: "80%", height: "800px", diff --git a/client/galaxy/scripts/mvc/library/library-foldertoolbar-view.js b/client/galaxy/scripts/mvc/library/library-foldertoolbar-view.js index d6ffa738cd6..f8e85f9ced9 100644 --- a/client/galaxy/scripts/mvc/library/library-foldertoolbar-view.js +++ b/client/galaxy/scripts/mvc/library/library-foldertoolbar-view.js @@ -1216,7 +1216,6 @@ var FolderToolbarView = Backbone.View.extend({ var checked_items = this.findCheckedItems(); var template = this.templateCollectionSelectModal(); this.modal = Galaxy.modal; - console.log('checked: ', checked_items.dataset_ids.length); this.modal.show({ closing_events: true, title: "Create History Collection from Datasets", @@ -1322,9 +1321,13 @@ var FolderToolbarView = Backbone.View.extend({ name: element.name, src: "ldda" })); - console.log('list elements: ', elements); return this.createHDCA(elements, this.collectionType, name, hideSourceItems, history_id); }; + LIST_CREATOR.collectionCreatorModal( + collection_elements, + {creationFn: creationFn, title: modal_title}, + creator_class + ); } else if (this.collectionType === "paired"){ creator_class = PAIR_CREATOR.PairCollectionCreator; creationFn = (elements, name, hideSourceItems) => { @@ -1332,27 +1335,21 @@ var FolderToolbarView = Backbone.View.extend({ { name: "forward", src: "ldda", id: elements[0].id }, { name: "reverse", src: "ldda", id: elements[1].id } ]; - console.log('pair elements: ', elements); return this.createHDCA(elements, this.collectionType, name, hideSourceItems, history_id); }; + LIST_CREATOR.collectionCreatorModal( + collection_elements, + {creationFn: creationFn, title: modal_title}, + creator_class + ); } else if (this.collectionType === "list:paired"){ - creator_class = PAIRED_CREATOR.PairedCollectionCreator; - creationFn = (elements, hideSourceItems) => { - console.log('PRE list:pair elements: ', elements); - elements = elements.map(element => ({ + let elements = collection_elements.map(element => ({ id: element.id, name: element.name, src: "ldda" })); - console.log('POST list:pair elements: ', elements); - return PAIRED_CREATOR.pairedCollectionCreatorModal(elements, {historyId: history_id, defaultHideSourceItems: hideSourceItems}); - }; + PAIRED_CREATOR.pairedCollectionCreatorModal(elements, {historyId: history_id, title: modal_title}); } - LIST_CREATOR.collectionCreatorModal( - collection_elements, - {creationFn: creationFn, title: modal_title}, - creator_class - ); }, createHDCA: function(elementIdentifiers, collectionType, name, hideSourceItems, history_id, options) { @@ -1828,7 +1825,7 @@ var FolderToolbarView = Backbone.View.extend({ "
", // elements selection '
', - "

From which datasets?

", + "

Which datasets?

", '
', '