[Rt-commit] rt branch 5.0/jump-to-unread-on-scroll created. rt-5.0.3-77-g32131fa519
BPS Git Server
git at git.bestpractical.com
Wed Aug 17 20:27:56 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 32131fa5198ec6d536a0a4efe21ab906ff2f0ff0 (commit)
- Log -----------------------------------------------------------------
commit 32131fa5198ec6d536a0a4efe21ab906ff2f0ff0
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..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>
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list