commit/galaxy-central: carlfeberhard: library upload: sort dbkeys, default to unspecified, remove unneeded call to replace_big_select_inputs
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/3a2753976434/ Changeset: 3a2753976434 User: carlfeberhard Date: 2013-07-22 21:48:50 Summary: library upload: sort dbkeys, default to unspecified, remove unneeded call to replace_big_select_inputs Affected #: 2 files diff -r b72d967e0cf4a506f0bfbcef0f068fe1709659e9 -r 3a27539764348d4099669bc7fe94c9432e62aff0 lib/galaxy/webapps/galaxy/controllers/library_common.py --- a/lib/galaxy/webapps/galaxy/controllers/library_common.py +++ b/lib/galaxy/webapps/galaxy/controllers/library_common.py @@ -949,7 +949,10 @@ # Send list of data formats to the upload form so the "extension" select list can be populated dynamically file_formats = trans.app.datatypes_registry.upload_file_formats + dbkeys = trans.app.genomes.get_dbkeys( trans ) + dbkeys.sort( key=lambda dbkey: dbkey[0].lower() ) + # Send the current history to the form to enable importing datasets from history to library history = trans.get_history() if history is not None: diff -r b72d967e0cf4a506f0bfbcef0f068fe1709659e9 -r 3a27539764348d4099669bc7fe94c9432e62aff0 templates/webapps/galaxy/library/common/common.mako --- a/templates/webapps/galaxy/library/common/common.mako +++ b/templates/webapps/galaxy/library/common/common.mako @@ -271,8 +271,16 @@ <label>Genome:</label><div class="form-row-input"><select name="dbkey" last_selected_value="?"> + <% + # move unspecified to the first option and set as default if not last_used_build + #TODO: remove when we decide on a common dbkey selector widget + unspecified = ('unspecified (?)', '?') + dbkeys.remove( unspecified ) + dbkeys.insert( 0, unspecified ) + default_selected = last_used_build or '?' + %> %for dbkey in dbkeys: - %if dbkey[1] == last_used_build: + %if dbkey[1] == default_selected: <option value="${dbkey[1]}" selected>${dbkey[0]}</option> %else: <option value="${dbkey[1]}">${dbkey[0]}</option> @@ -331,13 +339,6 @@ </form></div></div> - ## Script to replace dbkey select with select+search. - <script type="text/javascript"> - // Replace dbkey select with search+select. - jQuery(document).ready( function() { - replace_big_select_inputs(); - }); - </script> %elif upload_option == 'import_from_history': <div class="toolForm"><div class="toolFormTitle">Active datasets in your current history (${ util.unicodify( history.name )})</div> Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org