[Rt-commit] rt branch 5.0/jump-to-unread-on-scroll created. rt-5.0.3-77-g1f0361dbfd
BPS Git Server
git at git.bestpractical.com
Thu Aug 18 20:07:37 UTC 2022
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/jump-to-unread-on-scroll has been created
at 1f0361dbfda21827e9deb338cfd728937754a953 (commit)
- Log -----------------------------------------------------------------
commit 1f0361dbfda21827e9deb338cfd728937754a953
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Wed Aug 17 16:19:36 2022 -0400
Load more history for unread messages with on scroll setting
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.
diff --git a/share/html/Ticket/Elements/ScrollShowHistory b/share/html/Ticket/Elements/ScrollShowHistory
index 95ece700c4..5d900e1c52 100644
--- a/share/html/Ticket/Elements/ScrollShowHistory
+++ b/share/html/Ticket/Elements/ScrollShowHistory
@@ -214,5 +214,17 @@ 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);
+ if ( link[0].hash ) {
+ hash = link[0].hash;
+ lastTransactionId = null;
+ loadHistoryPage();
+ }
+ return true;
+ });
+
});
</script>
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list