This commit is contained in:
lalka2016 2023-08-11 11:24:26 +03:00
parent dafc18c118
commit 8e6d396f93
16 changed files with 74 additions and 39 deletions

View file

@ -17,9 +17,9 @@
</div>
{if sizeof($corresps) > 0}
<div class="crp-list">
<div class="crp-list infContainer">
<div n:foreach="$corresps as $coresp"
class="crp-entry"
class="crp-entry infObj"
onmousedown="window.location.href = {$coresp->getURL()};" >
{var $recipient = $coresp->getCorrespondents()[1]}
{var $lastMsg = $coresp->getPreviewMessage()}

View file

@ -105,7 +105,15 @@
</div>
</div>
</article>
</div>
</div>
{include "../components/paginator.xml", conf => (object) [
"page" => $page,
"count" => $count,
"amount" => sizeof($data),
"perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE,
"atBottom" => true,
]}
{else}
{if isset($thisUser) && $thisUser->getId() == $owner->getId()}

View file

@ -77,6 +77,7 @@
page => $cPage,
model => "notes",
parent => $note,
showTitle => false}
showTitle => false,
fromPost => true}
</div>
{/block}

View file

@ -29,10 +29,10 @@
{/if}
<br/><br/>
{if $album->getPhotosCount() > 0}
<div class="container_gray album-flex">
<div class="container_gray album-flex infContainer">
{foreach $photos as $photo}
{php if($photo->isDeleted()) continue; }
<div class="album-photo">
<div class="album-photo infObj">
<a
n:if="!is_null($thisUser) && $album->canBeModifiedBy($thisUser)"
href="/album{$album->getPrettyId()}/remove_photo/{$photo->getId()}" class="album-photo--delete">

View file

@ -28,7 +28,7 @@
<div style="width: 100%; min-height: 100px;">
<div style="float: left; min-height: 100px; width: 70%;">
{include "../components/comments.xml", comments => $comments, count => $cCount, page => $cPage, model => "photos", parent => $photo}
{include "../components/comments.xml", comments => $comments, count => $cCount, page => $cPage, model => "photos", parent => $photo, fromPost => true}
</div>
<div style="float: left; min-height: 100px; width: 30%;">
<div>

View file

@ -139,13 +139,15 @@
}
</style>
<div style="margin-top:-7px">
{include "../components/paginator.xml", conf => (object) [
"page" => $page,
"count" => $count,
"amount" => sizeof($data),
"perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE,
"atBottom" => false,
]}
{if isset($thisUser) && $thisUser->getPaginatorType() == 0}
{include "../components/paginator.xml", conf => (object) [
"page" => $page,
"count" => $count,
"amount" => sizeof($data),
"perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE,
"atBottom" => false,
]}
{/if}
</div>
<p style="margin-left: 15px; margin-top: 0;">
<b>{tr("results", $count)}</b>
@ -154,10 +156,10 @@
{include searchOptions}
{var $data = is_array($iterator) ? $iterator : iterator_to_array($iterator)}
<div class="container_gray borderup" style="float:left;width:73.3%;">
<div class="container_gray borderup infContainer" style="float:left;width:73.3%;">
{if sizeof($data) > 0}
{if $type == "users" || $type == "groups" || $type == "apps"}
<div class="content" n:foreach="$data as $dat">
<div class="content infObj" n:foreach="$data as $dat">
<table>
<tbody>
<tr>
@ -187,7 +189,7 @@
</table>
</div>
{elseif $type == "posts"}
<div n:foreach="$data as $dat" class="content">
<div n:foreach="$data as $dat" class="content infObj">
{if !$dat || $dat->getTargetWall() < 0 && $dat->getWallOwner()->isHideFromGlobalFeedEnabled()}
{_closed_group_post}.
{else}
@ -195,7 +197,7 @@
{/if}
</div>
{elseif $type == "comments"}
<div n:foreach="$data as $dat" class="content">
<div n:foreach="$data as $dat" class="content infObj">
{if !$dat->getTarget() || $dat->getTarget()->isDeleted()}
{_deleted_target_comment}.
{else}
@ -204,9 +206,9 @@
</div>
{elseif $type == "videos"}
{foreach $data as $dat}
<div class="content">
{include "../components/video.xml", video => $dat}
</div>
<div class="content infObj">
{include "../components/video.xml", video => $dat}
</div>
{/foreach}
{elseif $type == "audios"}
хуй
@ -218,6 +220,16 @@
{include "../components/nothing.xml"}
{/ifset}
{/if}
{if isset($thisUser) && $thisUser->getPaginatorType() == 1}
{include "../components/paginator.xml", conf => (object) [
"page" => $page,
"count" => $count,
"amount" => sizeof($data),
"perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE,
"atBottom" => false,
]}
{/if}
</div>
<script>
window.addEventListener("load", (event) => {

View file

@ -57,7 +57,8 @@
{/if}
{if $isList}
<table n:foreach="$tickets as $ticket" border="0" style="font-size: 11px; width: 610px;" class="post">
<div class="infContainer">
<table n:foreach="$tickets as $ticket" border="0" style="font-size: 11px; width: 610px;" class="post infObj">
<tbody>
<tr>
<td width="54" valign="top">
@ -78,6 +79,7 @@
</tr>
</tbody>
</table>
</div>
{if $count < 1}
{include "../components/nothing.xml"}

View file

@ -35,7 +35,8 @@
count => $cCount,
page => $cPage,
model => "videos",
parent => $video}
parent => $video,
fromPost => true}
</div>
<div style="float: left; min-height: 100px; width: 30%; overflow: hidden; overflow-wrap: break-word;">
<div>

View file

@ -20,10 +20,12 @@
</div>
<div class="infContainer">
{foreach $posts as $post}
<a name="postGarter={$post->getId()}"></a>
{include "../components/post.xml", post => $post, onWallOf => true, commentSection => true}
{/foreach}
{foreach $posts as $post}
<div class="infObj">
<a name="postGarter={$post->getId()}"></a>
{include "../components/post.xml", post => $post, onWallOf => true, commentSection => true}
</div>
{/foreach}
</div>
<div class="postFeedBottom" n:if="$thisUser->getPaginatorType() == 0">

View file

@ -22,7 +22,8 @@
count => $cCount,
page => $cPage,
model => "posts",
parent => $post }
parent => $post,
fromPost => true }
</div>
<div style="float: left; min-height: 100px; width: 32%;">
<h4>{_actions}</h4>

View file

@ -3,7 +3,7 @@
{var $postId = $comment->getTarget() instanceof \openvk\Web\Models\Entities\Post ? $comment->getTarget()->getId() : NULL}
<a name="cid={$comment->getId()}"></a>
<table border="0" style="font-size: 11px;" class="post comment infObj" id="_comment{$comment->getId()}" data-comment-id="{$comment->getId()}" data-owner-id="{$author->getId()}" data-from-group="{$comment->getOwner() instanceof $Club}" n:attr="data-post-id => $postId">
<table border="0" style="font-size: 11px;" class="post comment" id="_comment{$comment->getId()}" data-comment-id="{$comment->getId()}" data-owner-id="{$author->getId()}" data-from-group="{$comment->getOwner() instanceof $Club}" n:attr="data-post-id => $postId">
<tbody>
<tr>
<td width="30" valign="top">

View file

@ -10,9 +10,11 @@
<div class="infContainer">
{if sizeof($comments) > 0}
<div class="{if ($fromPost ?? false)}infObj{/if}">
{foreach $comments as $comment}
{include "comment.xml", comment => $comment}
{/foreach}
</div>
<div style="margin-top: 11px;">
{include "paginator.xml", conf => (object) ["page" => $page, "count" => $count, "amount" => sizeof($comments), "perPage" => 10]}
</div>

View file

@ -1,9 +1,7 @@
{var $microblogEnabled = isset($thisUser) ? $thisUser->hasMicroblogEnabled() : false}
<div class="infObj">
{if $microblogEnabled}
{include "post/microblogpost.xml", post => $post, commentSection => $commentSection}
{else}
{include "post/oldpost.xml", post => $post}
{/if}
</div>

View file

@ -14,9 +14,11 @@
<div class="content infContainer">
{if sizeof($posts) > 0}
{foreach $posts as $post}
<a name="postGarter={$post->getId()}"></a>
{include "../components/post.xml", post => $post, commentSection => true}
<div class="infObj">
<a name="postGarter={$post->getId()}"></a>
{include "../components/post.xml", post => $post, commentSection => true}
</div>
{/foreach}
{include "../components/paginator.xml", conf => $paginatorConf}
{else}

View file

@ -306,6 +306,8 @@ $(document).on("click", ".showMore", async (e) => {
container.insertAdjacentHTML("beforeend", obj.outerHTML)
}
bsdnHydrate()
initMentions()
initTooltips()
_updateButton()
@ -315,4 +317,4 @@ $(document).on("click", ".showMore", async (e) => {
xhr.ontimeout = () => {_errorWhenLoading()}
xhr.send()
})
})

View file

@ -68,7 +68,7 @@ function toggleMenu(id) {
}
document.addEventListener("DOMContentLoaded", function() { //BEGIN
u("#_photoDelete").on("click", function(e) {
$(document).on("click", "#_photoDelete", function(e) {
var formHtml = "<form id='tmpPhDelF' action='" + u(this).attr("href") + "' >";
formHtml += "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />";
formHtml += "</form>";
@ -90,7 +90,7 @@ document.addEventListener("DOMContentLoaded", function() { //BEGIN
});
/* @rem-pai why this func wasn't named as "#_deleteDialog"? It looks universal IMO */
u("#_noteDelete").on("click", function(e) {
$(document).on("click", "#_noteDelete", function(e) {
var formHtml = "<form id='tmpPhDelF' action='" + u(this).attr("href") + "' >";
formHtml += "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />";
formHtml += "</form>";
@ -111,7 +111,7 @@ document.addEventListener("DOMContentLoaded", function() { //BEGIN
return e.preventDefault();
});
u("#_pinGroup").on("click", async function(e) {
$(document).on("click", "#_pinGroup", async function(e) {
e.preventDefault();
let link = u(this).attr("href");
@ -691,4 +691,8 @@ $(document).on("scroll", () => {
$(".floating_sidebar")[0].classList.remove("hide_anim");
}, 250);
}
})
if($(window).scrollTop() == $(document).height() - $(window).height() && document.querySelector(".showMore") != null) {
$(".showMore").click()
}
})