From e41f8bc318fd901db804ae2ea12616688aac9287 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sat, 27 Aug 2016 23:12:45 +0200 Subject: [PATCH] Added user buttons in user profile preview --- .../templates/userProfilePreview.tpl | 23 ++++++++++++++++++- wcfsetup/install/files/js/WCF.User.js | 6 ----- .../files/js/WoltLabSuite/Core/Dom/Util.js | 2 +- .../install/files/style/ui/userProfile.scss | 14 +++++++++++ 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/com.woltlab.wcf/templates/userProfilePreview.tpl b/com.woltlab.wcf/templates/userProfilePreview.tpl index bb1a306a2c..fd261a91be 100644 --- a/com.woltlab.wcf/templates/userProfilePreview.tpl +++ b/com.woltlab.wcf/templates/userProfilePreview.tpl @@ -5,7 +5,7 @@ {@$user->getAvatar()->getImageTag(128)}
- {include file='userInformation' disableUserInformationButtons=true} + {include file='userInformation'} {if $user->canViewOnlineStatus() && $user->getLastActivityTime()}
@@ -32,5 +32,26 @@
{/hascontent}
+ + {if $__wcf->getUser()->userID && $__wcf->getUser()->userID != $user->userID} + + {/if} {/if} diff --git a/wcfsetup/install/files/js/WCF.User.js b/wcfsetup/install/files/js/WCF.User.js index 1fa2eb234d..57180163c6 100644 --- a/wcfsetup/install/files/js/WCF.User.js +++ b/wcfsetup/install/files/js/WCF.User.js @@ -2128,12 +2128,6 @@ WCF.User.Action.Follow = Class.extend({ var $notification = new WCF.System.Notification(); $notification.show(); - - // force rebuilding of popover cache - var self = this; - WCF.System.ObjectStore.invoke('WCF.User.ProfilePreview', function(profilePreview) { - profilePreview.purge(self._userID); - }); } }); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Dom/Util.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Dom/Util.js index b7885765e4..da590cb25b 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Dom/Util.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Dom/Util.js @@ -50,7 +50,7 @@ define(['Environment', 'StringUtil'], function(Environment, StringUtil) { */ createFragmentFromHtml: function(html) { var tmp = elCreate('div'); - tmp.innerHTML = html; + this.setInnerHtml(tmp, html); var fragment = document.createDocumentFragment(); while (tmp.childNodes.length) { diff --git a/wcfsetup/install/files/style/ui/userProfile.scss b/wcfsetup/install/files/style/ui/userProfile.scss index 3dfce24ac5..8773d54c17 100644 --- a/wcfsetup/install/files/style/ui/userProfile.scss +++ b/wcfsetup/install/files/style/ui/userProfile.scss @@ -142,6 +142,20 @@ } } +.userProfilePreview { + position: relative; + + .userInformation { + padding-bottom: 16px; + } + + .buttonGroupNavigation { + position: absolute; + bottom: 0; + right: 0; + } +} + /* using `dl` + `.inlineDataList` to prevent styles applied to the data list provided by the `userInformation` template */ .userProfilePreview dl.inlineDataList { -- 2.20.1