1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/5a17ab5f5466/ changeset: 5a17ab5f5466 user: dan date: 2013-03-13 18:50:11 summary: Move build_tool_version_select_field() to ToolBox, to follow move of get_tool_components() in a8caad109542661a7222c504a529ab5afbe303fb. affected #: 2 files diff -r 8a3d271d79bb6736b88b76918e4820d771c12250 -r 5a17ab5f5466eaf61e80d6efda90c394c601f4ad lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -56,6 +56,7 @@ from galaxy.util.template import fill_template from galaxy.visualization.genome.visual_analytics import TracksterConfig from galaxy.web import url_for +from galaxy.web.form_builder import SelectField from tool_shed.util import shed_util_common log = logging.getLogger( __name__ ) @@ -425,7 +426,23 @@ tool_version_select_field = self.build_tool_version_select_field( tools, tool.id, set_selected ) break return tool_version_select_field, tools, tool - + + def build_tool_version_select_field( self, tools, tool_id, set_selected ): + """Build a SelectField whose options are the ids for the received list of tools.""" + options = [] + refresh_on_change_values = [] + for tool in tools: + options.insert( 0, ( tool.version, tool.id ) ) + refresh_on_change_values.append( tool.id ) + select_field = SelectField( name='tool_id', refresh_on_change=True, refresh_on_change_values=refresh_on_change_values ) + for option_tup in options: + selected = set_selected and option_tup[1] == tool_id + if selected: + select_field.add_option( 'version %s' % option_tup[0], option_tup[1], selected=True ) + else: + select_field.add_option( 'version %s' % option_tup[0], option_tup[1] ) + return select_field + def load_tool_tag_set( self, elem, panel_dict, integrated_panel_dict, tool_path, load_panel_dict, guid=None, index=None ): try: path = elem.get( "file" ) diff -r 8a3d271d79bb6736b88b76918e4820d771c12250 -r 5a17ab5f5466eaf61e80d6efda90c394c601f4ad lib/galaxy/webapps/galaxy/controllers/tool_runner.py --- a/lib/galaxy/webapps/galaxy/controllers/tool_runner.py +++ b/lib/galaxy/webapps/galaxy/controllers/tool_runner.py @@ -14,7 +14,6 @@ from galaxy.util.hash_util import is_hashable from galaxy.web import error, url_for from galaxy.web.base.controller import BaseUIController -from galaxy.web.form_builder import SelectField log = logging.getLogger( __name__ ) @@ -219,21 +218,7 @@ add_frame=add_frame, tool_id_version_message=tool_id_version_message, **vars ) - def build_tool_version_select_field( self, tools, tool_id, set_selected ): - """Build a SelectField whose options are the ids for the received list of tools.""" - options = [] - refresh_on_change_values = [] - for tool in tools: - options.insert( 0, ( tool.version, tool.id ) ) - refresh_on_change_values.append( tool.id ) - select_field = SelectField( name='tool_id', refresh_on_change=True, refresh_on_change_values=refresh_on_change_values ) - for option_tup in options: - selected = set_selected and option_tup[1] == tool_id - if selected: - select_field.add_option( 'version %s' % option_tup[0], option_tup[1], selected=True ) - else: - select_field.add_option( 'version %s' % option_tup[0], option_tup[1] ) - return select_field + @web.expose def redirect( self, trans, redirect_url=None, **kwd ): if not redirect_url: 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.