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

View file

@ -107,6 +107,14 @@
</article> </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} {else}
{if isset($thisUser) && $thisUser->getId() == $owner->getId()} {if isset($thisUser) && $thisUser->getId() == $owner->getId()}

View file

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

View file

@ -29,10 +29,10 @@
{/if} {/if}
<br/><br/> <br/><br/>
{if $album->getPhotosCount() > 0} {if $album->getPhotosCount() > 0}
<div class="container_gray album-flex"> <div class="container_gray album-flex infContainer">
{foreach $photos as $photo} {foreach $photos as $photo}
{php if($photo->isDeleted()) continue; } {php if($photo->isDeleted()) continue; }
<div class="album-photo"> <div class="album-photo infObj">
<a <a
n:if="!is_null($thisUser) && $album->canBeModifiedBy($thisUser)" n:if="!is_null($thisUser) && $album->canBeModifiedBy($thisUser)"
href="/album{$album->getPrettyId()}/remove_photo/{$photo->getId()}" class="album-photo--delete"> 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="width: 100%; min-height: 100px;">
<div style="float: left; min-height: 100px; width: 70%;"> <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>
<div style="float: left; min-height: 100px; width: 30%;"> <div style="float: left; min-height: 100px; width: 30%;">
<div> <div>

View file

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

View file

@ -57,7 +57,8 @@
{/if} {/if}
{if $isList} {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> <tbody>
<tr> <tr>
<td width="54" valign="top"> <td width="54" valign="top">
@ -78,6 +79,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
{if $count < 1} {if $count < 1}
{include "../components/nothing.xml"} {include "../components/nothing.xml"}

View file

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

View file

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

View file

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

View file

@ -3,7 +3,7 @@
{var $postId = $comment->getTarget() instanceof \openvk\Web\Models\Entities\Post ? $comment->getTarget()->getId() : NULL} {var $postId = $comment->getTarget() instanceof \openvk\Web\Models\Entities\Post ? $comment->getTarget()->getId() : NULL}
<a name="cid={$comment->getId()}"></a> <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> <tbody>
<tr> <tr>
<td width="30" valign="top"> <td width="30" valign="top">

View file

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

View file

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

View file

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

View file

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

View file

@ -68,7 +68,7 @@ function toggleMenu(id) {
} }
document.addEventListener("DOMContentLoaded", function() { //BEGIN 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") + "' >"; var formHtml = "<form id='tmpPhDelF' action='" + u(this).attr("href") + "' >";
formHtml += "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />"; formHtml += "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />";
formHtml += "</form>"; 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 */ /* @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") + "' >"; var formHtml = "<form id='tmpPhDelF' action='" + u(this).attr("href") + "' >";
formHtml += "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />"; formHtml += "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />";
formHtml += "</form>"; formHtml += "</form>";
@ -111,7 +111,7 @@ document.addEventListener("DOMContentLoaded", function() { //BEGIN
return e.preventDefault(); return e.preventDefault();
}); });
u("#_pinGroup").on("click", async function(e) { $(document).on("click", "#_pinGroup", async function(e) {
e.preventDefault(); e.preventDefault();
let link = u(this).attr("href"); let link = u(this).attr("href");
@ -691,4 +691,8 @@ $(document).on("scroll", () => {
$(".floating_sidebar")[0].classList.remove("hide_anim"); $(".floating_sidebar")[0].classList.remove("hide_anim");
}, 250); }, 250);
} }
if($(window).scrollTop() == $(document).height() - $(window).height() && document.querySelector(".showMore") != null) {
$(".showMore").click()
}
}) })