From ce355e311cd54933fc4f9518c6f7c915959cf8b0 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Mon, 9 May 2022 13:13:27 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B05060=20-=20Activity=20panel:=20Show=20"l?= =?UTF-8?q?oad=20more=20entries"=20buttons=20no=20matter=20the=20filters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/layouts/activity-panel/activity-panel.js | 25 ------------------- .../layouts/activity-panel/layout.html.twig | 4 +-- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/js/layouts/activity-panel/activity-panel.js b/js/layouts/activity-panel/activity-panel.js index 2842963e3..c2dc1b5c4 100644 --- a/js/layouts/activity-panel/activity-panel.js +++ b/js/layouts/activity-panel/activity-panel.js @@ -1262,7 +1262,6 @@ $(function() }); this._UpdateEntryGroupsVisibility(); - this._UpdateLoadMoreEntriesButtonVisibility(); this._UpdateMessagesCounters(); }, _ShowAllEntries: function() @@ -1337,30 +1336,6 @@ $(function() } }); }, - /** - * Update the "load more entries" button visibility regarding the current filters - * - * @private - * @return {void} - */ - _UpdateLoadMoreEntriesButtonVisibility: function () { - const oMoreButtonElem = this.element.find(this.js_selectors.load_more_entries); - const oAllButtonElem = this.element.find(this.js_selectors.load_all_entries); - - // Check if button exists (if all entries have been loaded, we might have remove it - if (oMoreButtonElem.length === 0) { - return; - } - - // Show button only if the states / edits filters are selected as log entries are always fully loaded - if (this._GetActiveTabToolbarElement().find(this.js_selectors.activity_filter + '[data-target-entry-types!="'+this.enums.entry_types.caselog+'"]:checked').length > 0) { - oMoreButtonElem.removeClass(this.css_classes.is_hidden); - oAllButtonElem.removeClass(this.css_classes.is_hidden); - } else { - oMoreButtonElem.addClass(this.css_classes.is_hidden); - oAllButtonElem.addClass(this.css_classes.is_hidden); - } - }, /** * Load the next entries and append them to the current ones * diff --git a/templates/base/layouts/activity-panel/layout.html.twig b/templates/base/layouts/activity-panel/layout.html.twig index 66e927d3c..bd547f846 100644 --- a/templates/base/layouts/activity-panel/layout.html.twig +++ b/templates/base/layouts/activity-panel/layout.html.twig @@ -91,10 +91,10 @@
{# Note: The "more entries" button is hidden by default to avoid a visual glitch. #} {# Otherwise when the page is loaded, the button is displayed even if the current tab only show log entries (which are all loaded) #} - + - +