From 43ff9f6f26743731b966c1b9fe22b850d7bb2679 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Mon, 2 Dec 2019 15:34:42 +0100 Subject: [PATCH 1/3] Fix experiment copy --- app/models/my_module.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 From 2d4104b0f26314805fd2be820a03cd38d0565887 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Mon, 2 Dec 2019 15:53:42 +0100 Subject: [PATCH 2/3] Fix smart annotation for autosave --- app/assets/javascripts/sitewide/tiny_mce.js | 1 + 1 file changed, 1 insertion(+) 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(); From 010a44650c39443258624a072029e5b5570fb046 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Mon, 2 Dec 2019 16:04:50 +0100 Subject: [PATCH 3/3] Fix task activity page --- .../javascripts/sitewide/dropdown_selector.js | 6 +-- app/views/my_modules/activities.html.erb | 38 ++++++++++--------- 2 files changed, 24 insertions(+), 20 deletions(-) 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/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" %> +