Merge branch 'release-1-17-7' of github.com:biosistemika/scinote-web into release-1-17-7

This commit is contained in:
Miha Mencin 2019-12-03 09:10:55 +01:00
commit 8caa88fc7e
4 changed files with 27 additions and 23 deletions

View file

@ -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('<div class="dropdown-selector-container"></div>').next();

View file

@ -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();

View file

@ -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

View file

@ -9,26 +9,30 @@
<div class="ga-bottom">
<div class="ga-main perfect-scrollbar">
<div class="no-activities-message text-center <%= 'hidden' if @grouped_activities.keys.any? %>">
<p><%= t('activities.index.no_activities_task_message') %></p>
<div class="ga-main">
<div class="activities-container perfect-scrollbar">
<div class="no-activities-message text-center <%= 'hidden' if @grouped_activities.keys.any? %>">
<p><%= t('activities.index.no_activities_task_message') %></p>
</div>
<div class="ga-activities-list"
data-activities-url="<%= activities_my_module_path(@my_module) %>"
data-starting-timestamp="<%= @starting_timestamp %>">
<%= render partial: "global_activities/activity_list.html.erb" %>
</div>
<div class="text-center">
<a class="btn btn-default btn-more-activities <%= 'hidden' unless @next_page %>"
data-next-page="<%= @next_page %>">
<%= t'activities.index.more_activities' %>
</a>
</div>
<div id="ga-more-activities-placeholder" class="hidden"></div>
</div>
<div class="ga-activities-list"
data-activities-url="<%= activities_my_module_path(@my_module) %>"
data-starting-timestamp="<%= @starting_timestamp %>">
<%= render partial: "global_activities/activity_list.html.erb" %>
</div>
<div class="text-center">
<a class="btn btn-default btn-more-activities <%= 'hidden' unless @next_page %>"
data-next-page="<%= @next_page %>">
<%= t'activities.index.more_activities' %>
</a>
</div>
<div id="ga-more-activities-placeholder" class="hidden"></div>
</div>
<div class="ga-side perfect-scrollbar">
<%= render partial: "my_modules/activities/side_filters" %>
<div class="ga-side">
<div class="filters-container perfect-scrollbar">
<%= render partial: "my_modules/activities/side_filters" %>
</div>
</div>
</div>
</div>