diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2022-11-07 16:29:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-07 16:29:40 +0300 |
commit | 128ac73ce5047565122a715e1ebcecb0a4e90ea4 (patch) | |
tree | 1464e2d7dfd6542a5ff2b4f4195f613f840e66aa | |
parent | a6e3b16e0aefd73ed289c6a7867ff0b2cbf755b6 (diff) |
add Live.initializeVisitorActions event to allow plugins to collapse actions in visitor log if they need to (#19952)
-rw-r--r-- | plugins/Live/javascripts/visitorActions.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Live/javascripts/visitorActions.js b/plugins/Live/javascripts/visitorActions.js index 027a061b24..5249b112d5 100644 --- a/plugins/Live/javascripts/visitorActions.js +++ b/plugins/Live/javascripts/visitorActions.js @@ -142,6 +142,10 @@ function initializeVisitorActions(elem) { }); }); + // must be here before the logic to toggle the expanders so if plugins collapse items, the actions will + // be correctly counted + window.CoreHome.Matomo.postEvent('Live.initializeVisitorActions', elem); + // hide expanders if content collapsing removed enough items $("ol.actionList", elem).each(function () { var actionsToDisplayCollapsed = +piwik.visitorLogActionsToDisplayCollapsed; @@ -191,4 +195,3 @@ function initializeVisitorActions(elem) { $list.children(':not(.actionsForPageExpander):not(.duplicate)').removeClass('last-action').last().addClass('last-action'); } } - |