From 75988196deb4fc8d23147ee567e632cf339d281c Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 16 Jul 2016 18:43:18 +0200 Subject: [PATCH] Fixed selecting user's likes tab --- com.woltlab.wcf/templates/userHeader.tpl | 2 +- wcfsetup/install/files/js/WCF.User.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/com.woltlab.wcf/templates/userHeader.tpl b/com.woltlab.wcf/templates/userHeader.tpl index e674a145bf..dc6549696c 100644 --- a/com.woltlab.wcf/templates/userHeader.tpl +++ b/com.woltlab.wcf/templates/userHeader.tpl @@ -158,7 +158,7 @@ {if MODULE_LIKE && $user->likesReceived}
  • - {if !$user->isProtected()}{/if} + {if !$user->isProtected()}{/if} {@$user->likesReceived|shortUnit} {lang}wcf.like.likesReceived{/lang} {if !$user->isProtected()}{/if} diff --git a/wcfsetup/install/files/js/WCF.User.js b/wcfsetup/install/files/js/WCF.User.js index 43174020b6..080c56bec4 100644 --- a/wcfsetup/install/files/js/WCF.User.js +++ b/wcfsetup/install/files/js/WCF.User.js @@ -814,6 +814,14 @@ WCF.User.Profile.TabMenu = Class.extend({ } }, this)); } + + $('.jsButtonUserLikes').click((function (event) { + event.preventDefault(); + + require(['Ui/TabMenu'], function (UiTabMenu) { + UiTabMenu.getTabMenu('profileContent').select('likes'); + }) + }).bind(this)) }, /** -- 2.20.1