diff --git a/client/galaxy/scripts/mvc/workflow/workflow.js b/client/galaxy/scripts/mvc/workflow/workflow.js index d2a57c2cff9..0fed312b841 100644 --- a/client/galaxy/scripts/mvc/workflow/workflow.js +++ b/client/galaxy/scripts/mvc/workflow/workflow.js @@ -5,7 +5,7 @@ import WORKFLOWS from "mvc/workflow/workflow-model"; import QueryStringParsing from "utils/query-string-parsing"; import _l from "utils/localization"; /** View of the individual workflows */ -var WorkflowItemView = Backbone.View.extend({ +const WorkflowItemView = Backbone.View.extend({ tagName: "tr", // name of (orphan) root tag in this.el initialize: function() { _.bindAll( @@ -46,7 +46,7 @@ var WorkflowItemView = Backbone.View.extend({ }, removeWorkflow: function() { - var wfName = this.model.get("name"); + const wfName = this.model.get("name"); if (window.confirm(`Are you sure you want to delete workflow '${wfName}'?`)) { this.model.destroy({ success: function() { @@ -58,8 +58,8 @@ var WorkflowItemView = Backbone.View.extend({ }, renameWorkflow: function() { - var oldName = this.model.get("name"); - var newName = window.prompt(`Enter a new Name for workflow '${oldName}'`, oldName); + const oldName = this.model.get("name"); + const newName = window.prompt(`Enter a new Name for workflow '${oldName}'`, oldName); if (newName) { this.model.save( { name: newName }, @@ -74,10 +74,10 @@ var WorkflowItemView = Backbone.View.extend({ }, copyWorkflow: function() { - var oldName = this.model.get("name"); + const oldName = this.model.get("name"); $.getJSON(`${this.model.urlRoot}/${this.model.id}/download`, wfJson => { - var newName = `Copy of ${oldName}`; - var currentOwner = this.model.get("owner"); + let newName = `Copy of ${oldName}`; + const currentOwner = this.model.get("owner"); if (currentOwner != Galaxy.user.attributes.username) { newName += ` shared by user ${currentOwner}`; } @@ -102,10 +102,10 @@ var WorkflowItemView = Backbone.View.extend({ _rowTemplate: function() { let show = this.model.get("show_in_tool_panel"); let wfId = this.model.id; - var checkboxHtml = ``; - var trHtml = `