diff options
author | Jim Brandt <jbrandt@bestpractical.com> | 2022-08-17 23:19:36 +0300 |
---|---|---|
committer | Jim Brandt <jbrandt@bestpractical.com> | 2022-08-17 23:19:36 +0300 |
commit | 32131fa5198ec6d536a0a4efe21ab906ff2f0ff0 (patch) | |
tree | 02d17a1e90b9abb2178d15a26ed2669760e6d2cd | |
parent | 0424423db5da4919eb7fda29aa6e564b086a7b38 (diff) |
Load more history for unread messages with on scroll setting5.0/jump-to-unread-on-scroll
With the "scroll" option set for ticket history, a new
message may not be loaded initially when displaying a ticket.
If the Jump to Unread button is clicked, trigger the scroll
to load tickets until the linked transaction is loaded.
-rw-r--r-- | share/html/Ticket/Elements/ScrollShowHistory | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/share/html/Ticket/Elements/ScrollShowHistory b/share/html/Ticket/Elements/ScrollShowHistory index 95ece700c4..2952fa9a50 100644 --- a/share/html/Ticket/Elements/ScrollShowHistory +++ b/share/html/Ticket/Elements/ScrollShowHistory @@ -214,5 +214,15 @@ jQuery(function(){ }); loadHistoryPage(); + + // Catch clicks on unread messages buttons and load any messages not loaded "on scroll" + jQuery('.new-messages-buttons > a').on('click', function (e) { + var link = jQuery(this); + var link_hash = link[0].hash; + hash = link_hash; + lastTransactionId = null; + loadHistoryPage(); + }); + }); </script> |