4 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/757412c63654/ Changeset: 757412c63654 Branch: edit_workflow User: saketkc Date: 2014-07-04 13:29:24 Summary: Fix: Allow editing workflows on the fly for radio buttons too. See https://bitbucket.org/galaxy/galaxy-central/pull-request/301/add-ability-to-... Affected #: 1 file diff -r 4bcf8ca400aee4f72900de8a375707256f0ae369 -r 757412c63654ff16f6cd6a0b6ff776b25e0b5b03 templates/webapps/galaxy/workflow/run.mako --- a/templates/webapps/galaxy/workflow/run.mako +++ b/templates/webapps/galaxy/workflow/run.mako @@ -154,18 +154,28 @@ $(".workflow-edit-button").on("click",function(){ var state = $(this).attr("name"); - var stepToolBox = $(this).parent().find('input:not([class]), select:not([class])'); + var stepToolBox = $(this).parent().find('input:not([class]):not([type="hidden"]), select:not([class])'); + var labels = $(this).parent().find('label'); var split_name=stepToolBox.attr("name").split("|"); var step_id = split_name[0]; - var step_name = split_name[split_name.length-1]; + var step_name = split_name.slice(1, split_name.length).join("|"); hidden_html = "<input type='hidden' name='"+step_id+"|__runtime__"+step_name+"' value='true' />"; + var html = ""; if (state === "edit"){ stepToolBoxClone = stepToolBox.clone(); - stepToolBoxClone.attr({"name":step_id+"|"+step_name}); - stepToolBoxClone.show() + stepToolBoxClone.each(function(index){$(stepToolBoxClone[index]).attr({"name":step_id+"|"+step_name})}); + stepToolBoxClone.show(); + if (labels.length > 0){ + stepToolBoxClone.each(function(index){ + html += stepToolBoxClone[index].outerHTML + labels[index].outerHTML + "<br/>"}); + } + else{ + html = stepToolBoxClone.outerHTML(); + } $(this).parent().find(".editable").show(); $(this).parent().parent().find(".uneditable_field").hide(); - $(this).parent().find(".editable").html(stepToolBoxClone.outerHTML()+hidden_html); + console.log(hidden_html) + $(this).parent().find(".editable").html(html+hidden_html); editingParameter($(this)); } else{ @@ -439,7 +449,7 @@ </span><span class="editable_field"><span class="editable"> - ${param.get_html_field( t, value, other_values).get_html( str(step.id) + "|" + "editable" + "|"+ prefix )} + ${param.get_html_field( t, value, other_values).get_html( str(step.id) + "|"+ prefix )} </span><i class="fa workflow-edit-button"></i> https://bitbucket.org/galaxy/galaxy-central/commits/3a52ec2a1015/ Changeset: 3a52ec2a1015 Branch: edit_workflow User: saketkc Date: 2014-07-04 15:41:09 Summary: Make hidden_html local Affected #: 1 file diff -r 757412c63654ff16f6cd6a0b6ff776b25e0b5b03 -r 3a52ec2a1015de51b55ec109de711d9f3adaeb12 templates/webapps/galaxy/workflow/run.mako --- a/templates/webapps/galaxy/workflow/run.mako +++ b/templates/webapps/galaxy/workflow/run.mako @@ -156,10 +156,10 @@ var state = $(this).attr("name"); var stepToolBox = $(this).parent().find('input:not([class]):not([type="hidden"]), select:not([class])'); var labels = $(this).parent().find('label'); - var split_name=stepToolBox.attr("name").split("|"); + var split_name = stepToolBox.attr("name").split("|"); var step_id = split_name[0]; var step_name = split_name.slice(1, split_name.length).join("|"); - hidden_html = "<input type='hidden' name='"+step_id+"|__runtime__"+step_name+"' value='true' />"; + var hidden_html = "<input type='hidden' name='"+step_id+"|__runtime__"+step_name+"' value='true' />"; var html = ""; if (state === "edit"){ stepToolBoxClone = stepToolBox.clone(); https://bitbucket.org/galaxy/galaxy-central/commits/b609ee31197c/ Changeset: b609ee31197c Branch: edit_workflow User: saketkc Date: 2014-07-04 15:45:54 Summary: Remove console log Affected #: 1 file diff -r 3a52ec2a1015de51b55ec109de711d9f3adaeb12 -r b609ee31197cc9f1abe2fe8e2c355d14bfa9984a templates/webapps/galaxy/workflow/run.mako --- a/templates/webapps/galaxy/workflow/run.mako +++ b/templates/webapps/galaxy/workflow/run.mako @@ -174,7 +174,6 @@ } $(this).parent().find(".editable").show(); $(this).parent().parent().find(".uneditable_field").hide(); - console.log(hidden_html) $(this).parent().find(".editable").html(html+hidden_html); editingParameter($(this)); } https://bitbucket.org/galaxy/galaxy-central/commits/c6e4969dfcbb/ Changeset: c6e4969dfcbb User: dannon Date: 2014-07-08 20:00:24 Summary: Merged in saketkc/galaxy-central-310/edit_workflow (pull request #433) Fix: Allow editing workflows on the fly for radio buttons too Affected #: 1 file diff -r 158302d1405755306533ad44b2284acad31e421a -r c6e4969dfcbb0a5ecf8ff7f8cdb8b8c727c4063a templates/webapps/galaxy/workflow/run.mako --- a/templates/webapps/galaxy/workflow/run.mako +++ b/templates/webapps/galaxy/workflow/run.mako @@ -154,18 +154,27 @@ $(".workflow-edit-button").on("click",function(){ var state = $(this).attr("name"); - var stepToolBox = $(this).parent().find('input:not([class]), select:not([class])'); - var split_name=stepToolBox.attr("name").split("|"); + var stepToolBox = $(this).parent().find('input:not([class]):not([type="hidden"]), select:not([class])'); + var labels = $(this).parent().find('label'); + var split_name = stepToolBox.attr("name").split("|"); var step_id = split_name[0]; - var step_name = split_name[split_name.length-1]; - hidden_html = "<input type='hidden' name='"+step_id+"|__runtime__"+step_name+"' value='true' />"; + var step_name = split_name.slice(1, split_name.length).join("|"); + var hidden_html = "<input type='hidden' name='"+step_id+"|__runtime__"+step_name+"' value='true' />"; + var html = ""; if (state === "edit"){ stepToolBoxClone = stepToolBox.clone(); - stepToolBoxClone.attr({"name":step_id+"|"+step_name}); - stepToolBoxClone.show() + stepToolBoxClone.each(function(index){$(stepToolBoxClone[index]).attr({"name":step_id+"|"+step_name})}); + stepToolBoxClone.show(); + if (labels.length > 0){ + stepToolBoxClone.each(function(index){ + html += stepToolBoxClone[index].outerHTML + labels[index].outerHTML + "<br/>"}); + } + else{ + html = stepToolBoxClone.outerHTML(); + } $(this).parent().find(".editable").show(); $(this).parent().parent().find(".uneditable_field").hide(); - $(this).parent().find(".editable").html(stepToolBoxClone.outerHTML()+hidden_html); + $(this).parent().find(".editable").html(html+hidden_html); editingParameter($(this)); } else{ @@ -439,7 +448,7 @@ </span><span class="editable_field"><span class="editable"> - ${param.get_html_field( t, value, other_values).get_html( str(step.id) + "|" + "editable" + "|"+ prefix )} + ${param.get_html_field( t, value, other_values).get_html( str(step.id) + "|"+ prefix )} </span><i class="fa workflow-edit-button"></i> 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.