<ul class="inlineList dotSeparated">
<li><a href="{link controller='User' object=$__wcf->user}{/link}">{lang}wcf.user.myProfile{/lang}</a></li>
- {if $__wcf->getUserProfileHandler()->canEditOwnProfile()}<li><a href="{link controller='User' object=$__wcf->user}editOnInit=true#about{/link}">{lang}wcf.user.editProfile{/lang}</a></li>{/if}
+ {if $__wcf->getUserProfileHandler()->canEditOwnProfile()}<li><a href="{link controller='User' object=$__wcf->user}editOnInit=true#about{/link}" class="jsUserPanelEditProfile">{lang}wcf.user.editProfile{/lang}</a></li>{/if}
{if $__wcf->session->getPermission('admin.general.canUseAcp')}<li><a href="{link isACP=true}{/link}">{lang}wcf.global.acp.short{/lang}</a></li>{/if}
</ul>
</div>
'wcf.user.editProfile': '{lang}wcf.user.editProfile{/lang}'
});
- new WCF.User.Profile.Editor({@$user->userID}, {if $editOnInit}true{else}false{/if});
+ var userProfileEditor = new WCF.User.Profile.Editor({@$user->userID}, {if $editOnInit}true{else}false{/if});
+ var editLink = elBySel('.interactiveDropdownItemsUserMenu .jsUserPanelEditProfile');
+ if (editLink) {
+ editLink.addEventListener(WCF_CLICK_EVENT, function (event) {
+ userProfileEditor._beginEdit(event);
+
+ WCF.CloseOverlayHandler.forceExecution();
+ });
+ }
{/if}
{if $followingCount > 7}
*/
_actionName: '',
+ _active: false,
+
/**
* list of interface buttons
* @var object
*/
init: function(userID, editOnInit) {
this._actionName = '';
+ this._active = false;
this._cachedTemplate = '';
this._tab = $('#about');
this._userID = userID;
_beginEdit: function(event) {
if (event) event.preventDefault();
+ if (this._active) return;
+ this._active = true;
+
this._actionName = 'beginEdit';
this._buttons.beginEdit.parent().addClass('active');
$('#profileContent').wcfTabs('select', 'about');
*/
_restore: function() {
this._actionName = 'restore';
+ this._active = false;
this._buttons.beginEdit.parent().removeClass('active');
this._destroyEditor();