From a5a3c8141274bbcc12e5c4f72b85e02efe47841c Mon Sep 17 00:00:00 2001 From: Giteabot Date: Sun, 9 Jul 2023 15:15:00 -0400 Subject: Fix notification list bugs (#25781) (#25787) Backport #25781 by @wxiaoguang Fix #25627 1. `ctx.Data["Link"]` should use relative URL but not AppURL 2. The `data-params` is incorrect because it doesn't contain "page". JS can simply use "window.location.search" to construct the AJAX URL 3. The `data-xxx` and `id` in notification_subscriptions.tmpl were copied&pasted, they don't have affect. Co-authored-by: wxiaoguang --- web_src/js/features/notification.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web_src/js') diff --git a/web_src/js/features/notification.js b/web_src/js/features/notification.js index 0c24d36e56..4dcf02d2dc 100644 --- a/web_src/js/features/notification.js +++ b/web_src/js/features/notification.js @@ -165,7 +165,7 @@ async function updateNotificationTable() { if (notificationDiv.length > 0) { const data = await $.ajax({ type: 'GET', - url: `${appSubUrl}/notifications?${notificationDiv.data('params')}`, + url: `${appSubUrl}/notifications${window.location.search}`, data: { 'div-only': true, 'sequence-number': ++notificationSequenceNumber, -- cgit v1.2.3