From 4d554b605f541431ed738dbb4c55c114916eca7e Mon Sep 17 00:00:00 2001 From: Aysam Guerler Date: Tue, 19 Nov 2013 16:30:55 -0500 Subject: [PATCH] Upload: Transfer first genome selection to unselected genome selectors --- static/scripts/galaxy.upload.js | 15 ++++++++++++++- static/scripts/utils/galaxy.uploadbox.js | 1 - 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/static/scripts/galaxy.upload.js b/static/scripts/galaxy.upload.js index e1005cb95da..04ed0c518cb 100644 --- a/static/scripts/galaxy.upload.js +++ b/static/scripts/galaxy.upload.js @@ -151,13 +151,26 @@ var GalaxyUpload = Backbone.View.extend( // update info it.find('#size').html(this.size_to_string (file.size)); - // add functionality to remove button + // add functionality to new row elements var self = this; it.find('#symbol').on('click', function() { self.event_remove (index) }); it.find('#text-content').on('keyup', function() { var count = it.find('#text-content').val().length; it.find('#size').html(self.size_to_string (count)); }); + it.find('#genome').on('change', function(e) { + // identify target + var $target = $(e.target); + var selected_genome = $target.val(); + + // identify other genome selectors + var genomes = (self.$el).find('.genome'); + genomes.each(function() { + var $select = $(this); + if ($select.val() == '?') + $select.val(selected_genome); + }); + }); // initialize progress this.event_progress(index, file, 0); diff --git a/static/scripts/utils/galaxy.uploadbox.js b/static/scripts/utils/galaxy.uploadbox.js index 0cb1a445bda..4999c7f8821 100755 --- a/static/scripts/utils/galaxy.uploadbox.js +++ b/static/scripts/utils/galaxy.uploadbox.js @@ -24,7 +24,6 @@ error_filesize : "File exceeds 2GB. Please use an FTP client.", error_default : "Please make sure the file is available.", error_server : "Upload request failed.", - error_toomany : "You can only queue <20 files per upload session.", error_login : "Uploads require you to log in.", error_missing : "No upload content available." }