mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°5060 - Activity panel: Show "load more entries" buttons no matter the filters
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
@@ -91,10 +91,10 @@
|
||||
<div class="ibo-activity-panel--load-more-entries-container" data-role="ibo-activity-panel--load-more-entries-container">
|
||||
{# 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) #}
|
||||
<a href="#" class="ibo-activity-panel--load-more-entries ibo-activity-panel--load-entries-button ibo-is-hidden" data-role="ibo-activity-panel--load-more-entries" data-tooltip-content="{{ 'UI:Layout:ActivityPanel:LoadMoreEntries:Tooltip'|dict_s }}">
|
||||
<a href="#" class="ibo-activity-panel--load-more-entries ibo-activity-panel--load-entries-button" data-role="ibo-activity-panel--load-more-entries" data-tooltip-content="{{ 'UI:Layout:ActivityPanel:LoadMoreEntries:Tooltip'|dict_s }}">
|
||||
<span class="ibo-activity-panel--load-entries-icon fas fa-fw fa-angle-down" data-role="ibo-activity-panel--load-more-entries-icon"></span>
|
||||
</a>
|
||||
<a href="#" class="ibo-activity-panel--load-all-entries ibo-activity-panel--load-entries-button ibo-is-hidden" data-role="ibo-activity-panel--load-all-entries" data-tooltip-content="{{ 'UI:Layout:ActivityPanel:LoadAllEntries:Tooltip'|dict_s }}">
|
||||
<a href="#" class="ibo-activity-panel--load-all-entries ibo-activity-panel--load-entries-button" data-role="ibo-activity-panel--load-all-entries" data-tooltip-content="{{ 'UI:Layout:ActivityPanel:LoadAllEntries:Tooltip'|dict_s }}">
|
||||
<span class="ibo-activity-panel--load-entries-icon fas fa-fw fa-angle-double-down" data-role="ibo-activity-panel--load-all-entries-icon"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user