From d448001fe6ef5bcd6c5ba763a7e5a0718c2909d4 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 31 Dec 2017 20:18:02 +0200 Subject: [PATCH] Also update tool_id when switching versions in workflow editor --- client/galaxy/scripts/mvc/workflow/workflow-node.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/galaxy/scripts/mvc/workflow/workflow-node.js b/client/galaxy/scripts/mvc/workflow/workflow-node.js index 6beff7dcc41..f6b0ff20b58 100644 --- a/client/galaxy/scripts/mvc/workflow/workflow-node.js +++ b/client/galaxy/scripts/mvc/workflow/workflow-node.js @@ -148,13 +148,19 @@ define(['mvc/workflow/workflow-view-node'], function( NodeView ) { // Remove active class $(element).removeClass( "toolForm-active" ); }, + set_tool_version: function () { + if (this.config_form) { + this.tool_version = this.config_form.version; + this.content_id = this.config_form.id; + } + }, init_field_data : function ( data ) { if ( data.type ) { this.type = data.type; } this.name = data.name; this.config_form = data.config_form; - this.tool_version = this.config_form && this.config_form.version; + this.set_tool_version(); this.tool_state = data.tool_state; this.errors = data.errors; this.tooltip = data.tooltip ? data.tooltip : ""; @@ -232,7 +238,7 @@ define(['mvc/workflow/workflow-view-node'], function( NodeView ) { }); this.tool_state = data.tool_state; this.config_form = data.config_form; - this.tool_version = this.config_form && this.config_form.version; + this.set_tool_version(); this.errors = data.errors; this.annotation = data['annotation']; this.label = data.label;