mirror of
https://github.com/openvk/openvk
synced 2025-07-07 08:19:49 +03:00
Compare commits
4 commits
544b566b2a
...
2bf6fe7dd3
Author | SHA1 | Date | |
---|---|---|---|
|
2bf6fe7dd3 | ||
|
b7fc23bb52 | ||
|
c82e2c9f4c | ||
|
04d24aaba3 |
6 changed files with 31 additions and 17 deletions
|
@ -371,7 +371,11 @@ abstract class OpenVKPresenter extends SimplePresenter
|
|||
$whichbrowser->isEngine('NetFront') || // PSP and other japanese portable systems
|
||||
$whichbrowser->isOs('Android') ||
|
||||
$whichbrowser->isOs('iOS') ||
|
||||
$whichbrowser->isBrowser('Internet Explorer', '<=', '8')) {
|
||||
$whichbrowser->isBrowser('BlackBerry Browser') ||
|
||||
$whichbrowser->isBrowser('Internet Explorer', '<=', '8') ||
|
||||
$whichbrowser->isBrowser('Firefox', '<=', '47') ||
|
||||
$whichbrowser->isBrowser('Safari', '<=', '7') ||
|
||||
$whichbrowser->isBrowser('Google Chrome', '<=', '35')) {
|
||||
// yeah, it's old, but ios and android are?
|
||||
if ($whichbrowser->isOs('iOS') && $whichbrowser->isOs('iOS', '<=', '9')) {
|
||||
return true;
|
||||
|
|
|
@ -129,13 +129,15 @@
|
|||
{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()}">
|
||||
{if $thisUser && $club->canBeModifiedBy($thisUser)}
|
||||
<a {if $avatarPhoto}style="display:none"{/if} class="add_image_text" id="add_image">{_add_image}</a>
|
||||
<div {if !$avatarPhoto}style="display:none"{/if} class="avatar_controls">
|
||||
<div class="avatarDelete hoverable"></div>
|
||||
<div class="avatar_variants">
|
||||
<a class="_add_image hoverable" id="add_image"><span>{_upload_new_picture}</span></a>
|
||||
</div>
|
||||
<div class="avatar_controls">
|
||||
<div {if !$hasAvatar}style="display:none"{/if} class="avatarDelete hoverable"></div>
|
||||
<div class="avatar_variants">
|
||||
<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>
|
||||
{/if}
|
||||
|
||||
<a href="{$avatarLink|nocheck}">
|
||||
|
|
|
@ -73,11 +73,13 @@
|
|||
{var $hasAvatar = !str_contains($user->getAvatarUrl('miniscule'), "/assets/packages/static/openvk/img/camera_200.png")}
|
||||
|
||||
{if $thisUser && $user->getId() == $thisUser->getId()}
|
||||
<a {if $hasAvatar}style="display:none"{/if} class="add_image_text" id="add_image">{_add_image}</a>
|
||||
<div {if !$hasAvatar}style="display:none"{/if} class="avatar_controls">
|
||||
<div class="avatarDelete hoverable"></div>
|
||||
<div class="avatar_controls">
|
||||
<div {if !$hasAvatar}style="display:none"{/if} class="avatarDelete hoverable"></div>
|
||||
<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>
|
||||
{/if}
|
||||
|
|
|
@ -2179,9 +2179,11 @@ $(document).on("click", "#add_image", (e) => {
|
|||
|
||||
document.querySelector("#bigAvatar").src = response.url
|
||||
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 .set_image").style.display = "block"
|
||||
document.querySelector(".avatar_controls .avatarDelete").style.display = "block"
|
||||
document.querySelector(".avatar_controls .upload_image").style.display = "none"
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -2305,17 +2307,18 @@ $(document).on("click", ".avatarDelete", (e) => {
|
|||
}
|
||||
|
||||
document.querySelector(".avatarDelete").classList.remove("lagged")
|
||||
|
||||
|
||||
u("body").removeClass("dimmed");
|
||||
document.querySelector("html").style.overflowY = "scroll"
|
||||
u(".ovk-diag-cont").remove()
|
||||
|
||||
document.querySelector("#bigAvatar").src = response.url
|
||||
document.querySelector("#bigAvatar").parentNode.href = response.new_photo ? ("/photo" + response.new_photo) : "javascript:void(0)"
|
||||
|
||||
|
||||
if(!response.has_new_photo) {
|
||||
document.querySelector(".avatar_controls").style.display = "none"
|
||||
document.querySelector(".add_image_text").style.display = "block"
|
||||
document.querySelector(".avatar_controls .set_image").style.display = "none"
|
||||
document.querySelector(".avatar_controls .avatarDelete").style.display = "none"
|
||||
document.querySelector(".avatar_controls .upload_image").style.display = "block"
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -2235,6 +2235,7 @@
|
|||
"mobile_like" = "Like";
|
||||
"mobile_user_info_hide" = "Hide";
|
||||
"mobile_user_info_show_details" = "Show details";
|
||||
"mobile_attachment_only_for_pc" = "This attachments is not implemented for PDA version. Please, view it on PC.";
|
||||
|
||||
/* Fullscreen player */
|
||||
|
||||
|
|
|
@ -2130,6 +2130,7 @@
|
|||
"mobile_like" = "Нравится";
|
||||
"mobile_user_info_hide" = "Скрыть";
|
||||
"mobile_user_info_show_details" = "Показать подробнее";
|
||||
"mobile_attachment_only_for_pc" = "Вложение недоступно в PDA версии, его просмотр возможен только с другого устройства";
|
||||
|
||||
/* Fullscreen player */
|
||||
|
||||
|
@ -2306,3 +2307,4 @@
|
|||
"faves_few" = "$1 закладки";
|
||||
"faves_many" = "$1 закладок";
|
||||
"faves_other" = "$1 закладок";
|
||||
|
||||
|
|
Loading…
Reference in a new issue