Fixed selecting user's likes tab
authorAlexander Ebert <ebert@woltlab.com>
Sat, 16 Jul 2016 16:43:18 +0000 (18:43 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 16 Jul 2016 16:43:26 +0000 (18:43 +0200)
com.woltlab.wcf/templates/userHeader.tpl
wcfsetup/install/files/js/WCF.User.js

index e674a145bfe99535046cb849b0ce844cb514c4a4..dc6549696ccdfa5492d7b69fdbe98d947490d1fd 100644 (file)
                                                        
                                                        {if MODULE_LIKE && $user->likesReceived}
                                                                <li>
-                                                                       {if !$user->isProtected()}<a href="{link controller='User' object=$user}{/link}#likes" class="jsTooltip" title="{lang}wcf.like.showLikesReceived{/lang}">{/if}
+                                                                       {if !$user->isProtected()}<a href="#" class="jsButtonUserLikes jsTooltip" title="{lang}wcf.like.showLikesReceived{/lang}">{/if}
                                                                                <span class="userStatsValue">{@$user->likesReceived|shortUnit}</span>
                                                                                <span class="userStatsTitle">{lang}wcf.like.likesReceived{/lang}</span>
                                                                        {if !$user->isProtected()}</a>{/if}
index 43174020b6cfa4858b0d9891220c269dc42de111..080c56bec486de644cb22c96a54030e04e748078 100644 (file)
@@ -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))
        },
        
        /**