Merge pull request #8040 from mvdbeek/bwlang_editor_fixes

[19.05] Update node.post_job_actions when changing post job actions
This commit is contained in:
John Chilton
2019-05-28 09:37:13 -04:00
committed by GitHub
2 changed files with 9 additions and 9 deletions
@@ -65,7 +65,15 @@ var Node = Backbone.Model.extend({
const output = this.nodeView.outputViews[outputName].output;
output_terminal.force_datatype = datatype;
output.force_datatype = datatype;
this.nodeView.updateDataOutputView(output);
if (datatype) {
this.post_job_actions['ChangeDatatypeAction' + outputName] = {
action_arguments: {newtype: datatype},
action_type: "ChangeDatatypeAction",
output_name: outputName,
};
} else {
delete this.post_job_actions['ChangeDatatypeAction' + outputName];
}
this.markChanged();
output_terminal.destroyInvalidConnections();
},
@@ -115,14 +115,6 @@ export default Backbone.View.extend({
this.tool_body.append(outputView.$el.append(terminalView.terminalElements()));
},
updateDataOutputView: function(output) {
const terminalView = this.terminalViewForOutput(output);
const outputView = this.outputViews[output.name];
const newOutputView = this.outputViewforOutput(output, terminalView);
newOutputView.$el.append(terminalView.terminalElements());
outputView.$el.html(newOutputView.$el);
},
redrawWorkflowOutputs: function() {
_.each(this.outputViews, outputView => {
outputView.redrawWorkflowOutput();