diff --git a/client/galaxy/scripts/mvc/workflow/workflow-view.js b/client/galaxy/scripts/mvc/workflow/workflow-view.js index 7c166b83eae..ff77da391e4 100644 --- a/client/galaxy/scripts/mvc/workflow/workflow-view.js +++ b/client/galaxy/scripts/mvc/workflow/workflow-view.js @@ -378,12 +378,10 @@ export default Backbone.View.extend({ // Load workflow definition this.load_workflow(self.options.id, self.options.version); if (make_popupmenu) { + $("#workflow-run-button").click(() => window.location = `${getAppRoot()}workflows/run?id=${self.options.id}`); + $("#workflow-save-button").click(() => save_current_workflow()); make_popupmenu($("#workflow-options-button"), { - Save: save_current_workflow, "Save As": workflow_save_as, - Run: function() { - window.location = `${getAppRoot()}workflows/run?id=${self.options.id}`; - }, "Edit Attributes": function() { self.workflow.clear_active_node(); }, diff --git a/client/galaxy/scripts/ui/popupmenu.js b/client/galaxy/scripts/ui/popupmenu.js index 68b68d51c29..4b03bef1d67 100644 --- a/client/galaxy/scripts/ui/popupmenu.js +++ b/client/galaxy/scripts/ui/popupmenu.js @@ -37,11 +37,12 @@ export function make_popupmenu(button_element, initial_options) { $.each(options, (k, v) => { if (v) { // Action can be either an anonymous function and a mapped dict. - var action = v.action || v; + let action = v.action || v; + let url = v.url || "javascript:void(0);"; menu_element.append( $("
").append( $("") - .attr("href", v.url) + .attr("href", url) .html(k) .click(action) ) diff --git a/templates/webapps/galaxy/workflow/editor.mako b/templates/webapps/galaxy/workflow/editor.mako index aa55bfbd47b..9a2f1b0cda5 100644 --- a/templates/webapps/galaxy/workflow/editor.mako +++ b/templates/webapps/galaxy/workflow/editor.mako @@ -225,10 +225,18 @@ <%def name="center_panel()">