}
else {
$('#disableAvatarReason').attr('readonly', true);
+ $('#disableAvatarNeverExpires, #disableAvatarExpires').disable();
+ $('#disableAvatarReason, #disableAvatarNeverExpires, #disableAvatarExpires').parents('dl').addClass('disabled');
}
});
+
$('#disableAvatar').change();
+ $('#disableAvatarNeverExpires').change(function() {
+ if ($('#disableAvatarNeverExpires').is(':checked')) {
+ $('#disableAvatarExpiresSetting').hide();
+ }
+ else {
+ $('#disableAvatarExpiresSetting').show();
+ }
+ });
+
+ $('#disableAvatarNeverExpires').change();
+ //]]>
+ </script>
+ {/if}
+
+ <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Message.js?v={@LAST_UPDATE_TIME}"></script>
+ <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.User.js?v={@LAST_UPDATE_TIME}"></script>
+ <script data-relocate="true">
+ //<![CDATA[
+ $(function() {
WCF.Language.addObject({
+ 'wcf.user.avatar.type.custom.crop': '{lang}wcf.user.avatar.type.custom.crop{/lang}',
'wcf.user.avatar.upload.error.invalidExtension': '{lang}wcf.user.avatar.upload.error.invalidExtension{/lang}',
'wcf.user.avatar.upload.error.tooSmall': '{lang}wcf.user.avatar.upload.error.tooSmall{/lang}',
'wcf.user.avatar.upload.error.tooLarge': '{lang}wcf.user.avatar.upload.error.tooLarge{/lang}',
'wcf.user.avatar.upload.error.uploadFailed': '{lang}wcf.user.avatar.upload.error.uploadFailed{/lang}',
'wcf.user.avatar.upload.error.badImage': '{lang}wcf.user.avatar.upload.error.badImage{/lang}',
- 'wcf.user.avatar.upload.success': '{lang}wcf.user.avatar.upload.success{/lang}',
- 'wcf.global.button.upload': '{lang}wcf.global.button.upload{/lang}'
+ 'wcf.user.avatar.upload.success': '{lang}wcf.user.avatar.upload.success{/lang}'
});
- new WCF.User.Avatar.Upload({@$user->userID});
+ {if $userAvatar && $userAvatar->canCrop()}
+ new WCF.User.Avatar.Upload({@$user->userID}, new WCF.User.Avatar.Crop({@$userAvatar->avatarID}));
+ {else}
+ new WCF.User.Avatar.Upload({@$user->userID});
+ {/if}
});
//]]>
</script>