1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/92fb946f5c7b/ changeset: 92fb946f5c7b user: kanwei date: 2011-06-08 21:30:40 summary: Workflows: - Fix for postjob rename not escaping quotes. Closes #511 - Tabs->Spaces - Slight reordering to have Save as first option, renamed Layout to Auto Re-layout for clarity affected #: 2 files (210 bytes) --- a/lib/galaxy/jobs/actions/post.py Wed Jun 08 15:16:20 2011 -0400 +++ b/lib/galaxy/jobs/actions/post.py Wed Jun 08 15:30:40 2011 -0400 @@ -10,16 +10,16 @@ if on_output: form = """ if (pja.action_type == "%s"){ - p_str = "<div class='pjaForm toolForm'><span class='action_tag' style='display:none'>"+ pja.action_type + pja.output_name + "</span><div class='toolFormTitle'> %s <br/> on " + pja.output_name + "\ - <div style='float: right;' class='buttons'><img src='/static/images/delete_icon.png'></div></div><div class='toolFormBody'>"; + p_str = "<div class='pjaForm toolForm'><span class='action_tag' style='display:none'>"+ pja.action_type + pja.output_name + "</span><div class='toolFormTitle'> %s <br/> on " + pja.output_name + "\ + <div style='float: right;' class='buttons'><img src='/static/images/delete_icon.png'></div></div><div class='toolFormBody'>"; %s p_str += "</div><div class='toolParamHelp'>%s</div></div>"; }""" % (action_type, title, content, help) else: - form = """ + form = """ if (pja.action_type == "%s"){ - p_str = "<div class='pjaForm toolForm'><span class='action_tag' style='display:none'>"+ pja.action_type + "</span><div class='toolFormTitle'> %s \ - <div style='float: right;' class='buttons'><img src='/static/images/delete_icon.png'></div></div><div class='toolFormBody'>"; + p_str = "<div class='pjaForm toolForm'><span class='action_tag' style='display:none'>"+ pja.action_type + "</span><div class='toolFormTitle'> %s \ + <div style='float: right;' class='buttons'><img src='/static/images/delete_icon.png'></div></div><div class='toolFormBody'>"; %s p_str += "</div><div class='toolParamHelp'>%s</div></div>"; }""" % (action_type, title, content, help) @@ -75,8 +75,8 @@ @classmethod def get_config_form(cls, trans): form = """ - p_str += "<label for='pja__"+pja.output_name+"__EmailAction'>There are no additional options for this action. You will be emailed upon job completion.</label>\ - <input type='hidden' value='%s' name='pja__"+pja.output_name+"__EmailAction__host'/><input type='hidden' name='pja__"+pja.output_name+"__EmailAction'/>"; + p_str += "<label for='pja__"+pja.output_name+"__EmailAction'>There are no additional options for this action. You will be emailed upon job completion.</label>\ + <input type='hidden' value='%s' name='pja__"+pja.output_name+"__EmailAction__host'/><input type='hidden' name='pja__"+pja.output_name+"__EmailAction'/>"; """ % trans.request.host return get_form_template(cls.name, cls.verbose_name, form, "This action will send an email notifying you when the job is done.", on_output = False) @@ -105,14 +105,14 @@ for dt_name in dtnames: dt_list += """<option id='pja__"+pja.output_name+"__ChangeDatatypeAction__newtype__%s' value='%s'>%s</option>""" % (dt_name, dt_name, dt_name) ps = """ - p_str += "<label for='pja__"+pja.output_name+"__ChangeDatatypeAction__newtype'>New Datatype:</label>\ - <select id='pja__"+pja.output_name+"__ChangeDatatypeAction__newtype' name='pja__"+pja.output_name+"__ChangeDatatypeAction__newtype'>\ - %s\ - </select>"; - if (pja.action_arguments !== undefined && pja.action_arguments.newtype !== undefined){ + p_str += "<label for='pja__"+pja.output_name+"__ChangeDatatypeAction__newtype'>New Datatype:</label>\ + <select id='pja__"+pja.output_name+"__ChangeDatatypeAction__newtype' name='pja__"+pja.output_name+"__ChangeDatatypeAction__newtype'>\ + %s\ + </select>"; + if (pja.action_arguments !== undefined && pja.action_arguments.newtype !== undefined){ p_str += "<scrip" + "t type='text/javascript'>$('#pja__" + pja.output_name + "__ChangeDatatypeAction__newtype').val('" + pja.action_arguments.newtype + "');</scrip" + "t>"; - } - """ % dt_list + } + """ % dt_list # Note the scrip + t hack above. Is there a better way? return get_form_template(cls.name, cls.verbose_name, ps, 'This action will change the datatype of the output to the indicated value.') @@ -140,15 +140,16 @@ @classmethod def get_config_form(cls, trans): form = """ - if ((pja.action_arguments !== undefined) && (pja.action_arguments.newname !== undefined)){ - p_str += "<label for='pja__"+pja.output_name+"__RenameDatasetAction__newname'>New output name:</label>\ - <input type='text' name='pja__"+pja.output_name+"__RenameDatasetAction__newname' value='"+pja.action_arguments.newname + "'/>"; - } - else{ - p_str += "<label for='pja__"+pja.output_name+"__RenameDatasetAction__newname'>New output name:</label>\ - <input type='text' name='pja__"+pja.output_name+"__RenameDatasetAction__newname' value=''/>"; - } - """ + if ((pja.action_arguments !== undefined) && (pja.action_arguments.newname !== undefined)){ + p_str += "<label for='pja__"+pja.output_name+"__RenameDatasetAction__newname'>New output name:</label>\ + <input type='text' name='pja__"+pja.output_name+"__RenameDatasetAction__newname' value=\\"" + pja.action_arguments.newname.replace(/"/g, """) + "\\"/>"; + } + + else{ + p_str += "<label for='pja__"+pja.output_name+"__RenameDatasetAction__newname'>New output name:</label>\ + <input type='text' name='pja__"+pja.output_name+"__RenameDatasetAction__newname' value=''/>"; + } + """ return get_form_template(cls.name, cls.verbose_name, form, "This action will rename the result dataset.") @classmethod @@ -195,8 +196,8 @@ @classmethod def get_config_form(cls, trans): form = """ - p_str += "<label for='pja__"+pja.output_name+"__DeleteDatasetAction'>There are no additional options for this action. This dataset will be marked deleted.</label>\ - <input type='hidden' name='pja__"+pja.output_name+"__DeleteDatasetAction'/>"; + p_str += "<label for='pja__"+pja.output_name+"__DeleteDatasetAction'>There are no additional options for this action. This dataset will be marked deleted.</label>\ + <input type='hidden' name='pja__"+pja.output_name+"__DeleteDatasetAction'/>"; """ return get_form_template(cls.name, cls.verbose_name, form, "This action will rename the result dataset.") --- a/templates/workflow/editor.mako Wed Jun 08 15:16:20 2011 -0400 +++ b/templates/workflow/editor.mako Wed Jun 08 15:30:40 2011 -0400 @@ -242,13 +242,13 @@ }); make_popupmenu( $("#workflow-options-button"), { - ##"Create New" : create_new_workflow_dialog, - "Edit Attributes" : edit_workflow_attributes, + "Save" : save_current_workflow, + ##"Create New" : create_new_workflow_dialog, + "Edit Attributes" : edit_workflow_attributes, ##"Edit Workflow Outputs": edit_workflow_outputs, - "Layout": layout_editor, - "Save" : save_current_workflow, - ##"Load a Workflow" : load_workflow, - "Close": close_editor + "Auto Re-layout": layout_editor, + ##"Load a Workflow" : load_workflow, + "Close": close_editor }); function edit_workflow_outputs(){ @@ -556,8 +556,6 @@ } } - - function show_form_for_tool( text, node ) { $('.right-content').hide(); $("#right-content").show().html( text ); 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.