mirror of
https://github.com/openvk/openvk
synced 2025-03-04 00:29:57 +03:00
я надеюсь, что всё ок
This commit is contained in:
parent
a88e929717
commit
3a8cbe0ffb
3 changed files with 4041 additions and 4034 deletions
|
@ -129,13 +129,15 @@
|
||||||
{var $avatarLink = ((is_null($avatarPhoto) ? FALSE : $avatarPhoto->isAnonymous()) ? "/photo" . ("s/" . base_convert((string) $avatarPhoto->getId(), 10, 32)) : $club->getAvatarLink())}
|
{var $avatarLink = ((is_null($avatarPhoto) ? FALSE : $avatarPhoto->isAnonymous()) ? "/photo" . ("s/" . base_convert((string) $avatarPhoto->getId(), 10, 32)) : $club->getAvatarLink())}
|
||||||
<div class="avatar_block" style="position:relative;" data-club="{$club->getId()}">
|
<div class="avatar_block" style="position:relative;" data-club="{$club->getId()}">
|
||||||
{if $thisUser && $club->canBeModifiedBy($thisUser)}
|
{if $thisUser && $club->canBeModifiedBy($thisUser)}
|
||||||
<a {if $avatarPhoto}style="display:none"{/if} class="add_image_text" id="add_image">{_add_image}</a>
|
<div class="avatar_controls">
|
||||||
<div {if !$avatarPhoto}style="display:none"{/if} class="avatar_controls">
|
<div {if !$hasAvatar}style="display:none"{/if} class="avatarDelete hoverable"></div>
|
||||||
<div class="avatarDelete hoverable"></div>
|
<div class="avatar_variants">
|
||||||
<div class="avatar_variants">
|
<a {if $hasAvatar}style="display:none"{/if} class="_add_image hoverable upload_image" id="add_image">
|
||||||
<a class="_add_image hoverable" id="add_image"><span>{_upload_new_picture}</span></a>
|
<span>{_add_image}</span></a>
|
||||||
</div>
|
<a {if !$hasAvatar}style="display:none"{/if} class="_add_image hoverable set_image" id="add_image">
|
||||||
</div>
|
<span>{_upload_new_picture}</span></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<a href="{$avatarLink|nocheck}">
|
<a href="{$avatarLink|nocheck}">
|
||||||
|
|
|
@ -73,11 +73,13 @@
|
||||||
{var $hasAvatar = !str_contains($user->getAvatarUrl('miniscule'), "/assets/packages/static/openvk/img/camera_200.png")}
|
{var $hasAvatar = !str_contains($user->getAvatarUrl('miniscule'), "/assets/packages/static/openvk/img/camera_200.png")}
|
||||||
|
|
||||||
{if $thisUser && $user->getId() == $thisUser->getId()}
|
{if $thisUser && $user->getId() == $thisUser->getId()}
|
||||||
<a {if $hasAvatar}style="display:none"{/if} class="add_image_text" id="add_image">{_add_image}</a>
|
<div class="avatar_controls">
|
||||||
<div {if !$hasAvatar}style="display:none"{/if} class="avatar_controls">
|
<div {if !$hasAvatar}style="display:none"{/if} class="avatarDelete hoverable"></div>
|
||||||
<div class="avatarDelete hoverable"></div>
|
|
||||||
<div class="avatar_variants">
|
<div class="avatar_variants">
|
||||||
<a class="_add_image hoverable" id="add_image"><span>{_upload_new_picture}</span></a>
|
<a {if $hasAvatar}style="display:none"{/if} class="_add_image hoverable upload_image" id="add_image">
|
||||||
|
<span>{_add_image}</span></a>
|
||||||
|
<a {if !$hasAvatar}style="display:none"{/if} class="_add_image hoverable set_image" id="add_image">
|
||||||
|
<span>{_upload_new_picture}</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -2180,8 +2180,10 @@ $(document).on("click", "#add_image", (e) => {
|
||||||
document.querySelector("#bigAvatar").src = response.url
|
document.querySelector("#bigAvatar").src = response.url
|
||||||
document.querySelector("#bigAvatar").parentNode.href = "/photo" + response.new_photo
|
document.querySelector("#bigAvatar").parentNode.href = "/photo" + response.new_photo
|
||||||
|
|
||||||
document.querySelector(".add_image_text").style.display = "none"
|
|
||||||
document.querySelector(".avatar_controls").style.display = "block"
|
document.querySelector(".avatar_controls").style.display = "block"
|
||||||
|
document.querySelector(".avatar_controls .set_image").style.display = "block"
|
||||||
|
document.querySelector(".avatar_controls .avatarDelete").style.display = "block"
|
||||||
|
document.querySelector(".avatar_controls .upload_image").style.display = "none"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -2314,8 +2316,9 @@ $(document).on("click", ".avatarDelete", (e) => {
|
||||||
document.querySelector("#bigAvatar").parentNode.href = response.new_photo ? ("/photo" + response.new_photo) : "javascript:void(0)"
|
document.querySelector("#bigAvatar").parentNode.href = response.new_photo ? ("/photo" + response.new_photo) : "javascript:void(0)"
|
||||||
|
|
||||||
if(!response.has_new_photo) {
|
if(!response.has_new_photo) {
|
||||||
document.querySelector(".avatar_controls").style.display = "none"
|
document.querySelector(".avatar_controls .set_image").style.display = "none"
|
||||||
document.querySelector(".add_image_text").style.display = "block"
|
document.querySelector(".avatar_controls .avatarDelete").style.display = "none"
|
||||||
|
document.querySelector(".avatar_controls .upload_image").style.display = "block"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue