diff --git a/app/assets/javascripts/sitewide/dropdown_selector.js b/app/assets/javascripts/sitewide/dropdown_selector.js index af6a66158..110725013 100644 --- a/app/assets/javascripts/sitewide/dropdown_selector.js +++ b/app/assets/javascripts/sitewide/dropdown_selector.js @@ -244,10 +244,10 @@ var dropdownSelector = (function() { var perfectScroll; var dropdownContainer; + if (selectElement.length === 0) return; + // Check if element exist or already initialized - if (selectElement.length === 0 || selectElement.next().hasClass('dropdown-selector-container')) { - selectElement.next().remove(); - } + if (selectElement.next().hasClass('dropdown-selector-container')) selectElement.next().remove(); // Create initial container after select block dropdownContainer = selectElement.after('').next(); diff --git a/app/assets/javascripts/sitewide/tiny_mce.js b/app/assets/javascripts/sitewide/tiny_mce.js index b5231682c..13c45d8bd 100644 --- a/app/assets/javascripts/sitewide/tiny_mce.js +++ b/app/assets/javascripts/sitewide/tiny_mce.js @@ -315,6 +315,7 @@ var TinyMCE = (function() { }); editor.on('blur', function(e) { + if ($('.atwho-view:visible').length) return false; setTimeout(() => { if (editor.isNotDirty === false) { $(editor.container).find('.tinymce-save-button').click(); diff --git a/app/models/my_module.rb b/app/models/my_module.rb index 33ce27f3e..feb6b9e2c 100644 --- a/app/models/my_module.rb +++ b/app/models/my_module.rb @@ -417,10 +417,9 @@ class MyModule < ApplicationRecord deep_clone_to_experiment(current_user, experiment) end - def deep_clone_to_experiment(current_user, experiment) + def deep_clone_to_experiment(current_user, experiment_dest) # Copy the module - clone = MyModule.new(name: name, experiment: experiment, description: description, x: x, y: y) - + clone = MyModule.new(name: name, experiment: experiment_dest, description: description, x: x, y: y) # set new position if cloning in the same experiment clone.attributes = get_new_position if clone.experiment == experiment diff --git a/app/views/my_modules/activities.html.erb b/app/views/my_modules/activities.html.erb index a9b9024e5..b07cae79c 100644 --- a/app/views/my_modules/activities.html.erb +++ b/app/views/my_modules/activities.html.erb @@ -9,26 +9,30 @@
-
-
-

<%= t('activities.index.no_activities_task_message') %>

+
+
+
+

<%= t('activities.index.no_activities_task_message') %>

+
+
+ <%= render partial: "global_activities/activity_list.html.erb" %> +
+ +
-
- <%= render partial: "global_activities/activity_list.html.erb" %> -
- -
-
- <%= render partial: "my_modules/activities/side_filters" %> +
+
+ <%= render partial: "my_modules/activities/side_filters" %> +