diff --git a/app/assets/javascripts/experiments/dropdown_actions.js b/app/assets/javascripts/experiments/dropdown_actions.js index b00ada76a..3a53f036b 100644 --- a/app/assets/javascripts/experiments/dropdown_actions.js +++ b/app/assets/javascripts/experiments/dropdown_actions.js @@ -16,6 +16,7 @@ keyboard: false, }); validateMoveModal(id); + clearModal($(id)); }) .on("ajax:error", function() { animateSpinner(null, false); @@ -26,6 +27,13 @@ }); } + function clearModal(id) { + //Completely remove modal when it gets closed + $(id).on('hidden.bs.modal', function() { + $(id).remove(); + }); + } + // Initialize dropdown actions on experiment: // - edit // - clone diff --git a/app/models/experiment.rb b/app/models/experiment.rb index d37661bbf..052d13a6e 100644 --- a/app/models/experiment.rb +++ b/app/models/experiment.rb @@ -375,9 +375,9 @@ class Experiment < ActiveRecord::Base project.tags << new_tags m.tags << new_tags end - - save - touch(:workflowimg_updated_at) + result = save + touch(:workflowimg_updated_at) if result + result end # Get projects where user is either owner or user in the same organization