Fix task activity page

This commit is contained in:
aignatov-bio 2019-12-02 16:04:50 +01:00
parent 18b31875bb
commit 010a44650c
2 changed files with 24 additions and 20 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

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