From 48af22b168fdb48020fe4944576292797b2bcfaf Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 25 Nov 2014 19:40:32 +0100 Subject: [PATCH] Fixed issues in recent activity context switch --- wcfsetup/install/files/js/WCF.User.js | 28 +++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.User.js b/wcfsetup/install/files/js/WCF.User.js index c616fe4683..ba6c52a2c9 100644 --- a/wcfsetup/install/files/js/WCF.User.js +++ b/wcfsetup/install/files/js/WCF.User.js @@ -1555,18 +1555,22 @@ WCF.User.RecentActivityLoader = Class.extend({ /** * Switches recent activity context. */ - _switchContext: function() { - new WCF.Action.Proxy({ - autoSend: true, - data: { - actionName: 'switchContext', - className: 'wcf\\data\\user\\activity\\event\\UserActivityEventAction' - }, - success: function() { - window.location.hash = '#dashboardBoxRecentActivity'; - window.location.reload(); - } - }); + _switchContext: function(event) { + event.preventDefault(); + + if (!$(event.currentTarget).hasClass('active')) { + new WCF.Action.Proxy({ + autoSend: true, + data: { + actionName: 'switchContext', + className: 'wcf\\data\\user\\activity\\event\\UserActivityEventAction' + }, + success: function() { + window.location.hash = '#dashboardBoxRecentActivity'; + window.location.reload(); + } + }); + } }, /** -- 2.20.1