N°5060 - Activity panel: Show "load more entries" buttons no matter the filters

This commit is contained in:
Molkobain
2022-05-09 13:13:27 +02:00
parent bab14e1489
commit ce355e311c
2 changed files with 2 additions and 27 deletions

View File

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