[Rt-commit] rt branch 5.0/toggle-txn-details-in-scroll created. rt-5.0.2-115-g10fe9ad7e6
BPS Git Server
git at git.bestpractical.com
Wed Apr 20 18:41:50 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/toggle-txn-details-in-scroll has been created
at 10fe9ad7e652d42340caf6534702a68b71481a47 (commit)
- Log -----------------------------------------------------------------
commit 10fe9ad7e652d42340caf6534702a68b71481a47
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Apr 21 02:08:13 2022 +0800
Register "Show Details" toggle handler only once for each button in scroll mode
The js in TicketHistoryPage helper is run after every ajax fetch, so the
handler could be set up multiple times, which may break the toggle
logic. A classic symptom is clicking the button wouldn't show any
changes.
diff --git a/share/html/Helpers/TicketHistoryPage b/share/html/Helpers/TicketHistoryPage
index f67baf80c8..3c140333e3 100644
--- a/share/html/Helpers/TicketHistoryPage
+++ b/share/html/Helpers/TicketHistoryPage
@@ -97,9 +97,9 @@ if ($focusTransactionId) { # make sure we load enough if we need to focus a tran
<script type="text/javascript">
jQuery(function() {
- jQuery('.transaction .toggle-txn-details').click(function () {
+ jQuery('.transaction .toggle-txn-details:not(.toggle-txn-details-registered)').click(function () {
return toggleTransactionDetails.apply(this);
- });
+ }).addClass('toggle-txn-details-registered');
});
</script>
% $m->abort();
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list