From ebacc6019cd2c85082a9ca4463bd52858fba91de Mon Sep 17 00:00:00 2001 From: James Taylor Date: Wed, 19 Aug 2009 18:07:55 -0400 Subject: [PATCH] Tweak workflow save changes to use more specific '#right-content' --- static/scripts/galaxy.workflow_editor.canvas.js | 16 +--------------- templates/workflow/editor.mako | 9 +++++++++ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/static/scripts/galaxy.workflow_editor.canvas.js b/static/scripts/galaxy.workflow_editor.canvas.js index 0da8f50e992..4a10c0d8595 100644 --- a/static/scripts/galaxy.workflow_editor.canvas.js +++ b/static/scripts/galaxy.workflow_editor.canvas.js @@ -439,25 +439,11 @@ $.extend( Workflow.prototype, { }); }); }, - enable_auto_save : function() { - // Implements auto-saving based on whether the inputs change. We consider - // "changed" to be when a field is accessed and not necessarily modified - // because of an issue where "onchange" is not triggered when activating - // another node, or saving the workflow. - outer_this = this; - $(".toolFormBody").find("input,textarea,select").each( function() { - $(this).focus( function() { - outer_this.active_form_has_changes = true; - }); - }); - }, check_changes_in_active_form : function() { // If active form has changed, save it if (this.active_form_has_changes) { this.has_changes = true; - $(".toolFormBody").find("form").each( function() { - $(this).submit(); - }); + $("#right-content").find("form").submit(); this.active_form_has_changes = false; } }, diff --git a/templates/workflow/editor.mako b/templates/workflow/editor.mako index d54da273bd6..a4aaebbf5d8 100644 --- a/templates/workflow/editor.mako +++ b/templates/workflow/editor.mako @@ -303,6 +303,15 @@ $(this).remove(); make_popupmenu( b, options ); }); + // Implements auto-saving based on whether the inputs change. We consider + // "changed" to be when a field is accessed and not necessarily modified + // because of an issue where "onchange" is not triggered when activating + // another node, or saving the workflow. + $(this).find("input,textarea,select").each( function() { + $(this).focus( function() { + workflow.active_form_has_changes = true; + }); + }); }); }