mirror of
https://github.com/openvk/openvk
synced 2025-03-20 00:15:19 +03:00
Compare commits
No commits in common. "77d0603e67ee12bbdef113312be4e5dd3b7d8dd4" and "8e6d396f936fe2d5e53a14bd4f3c1e15820310cd" have entirely different histories.
77d0603e67
...
8e6d396f93
9 changed files with 33 additions and 39 deletions
|
@ -35,7 +35,7 @@ final class SearchPresenter extends OpenVKPresenter
|
||||||
$invert = $this->queryParam("invert") == 1 ? "ASC" : "DESC";
|
$invert = $this->queryParam("invert") == 1 ? "ASC" : "DESC";
|
||||||
$page = (int) ($this->queryParam("p") ?? 1);
|
$page = (int) ($this->queryParam("p") ?? 1);
|
||||||
|
|
||||||
# $this->willExecuteWriteAction();
|
$this->willExecuteWriteAction();
|
||||||
if($query != "")
|
if($query != "")
|
||||||
$this->assertUserLoggedIn();
|
$this->assertUserLoggedIn();
|
||||||
|
|
||||||
|
|
|
@ -149,10 +149,11 @@
|
||||||
]}
|
]}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<p style="margin-left: 15px; {if $thisUser->getPaginatorType() == 1}margin-top: 14px;{/if}">
|
<p style="margin-left: 15px; margin-top: 0;">
|
||||||
<b>{tr("results", $count)}</b>
|
<b>{tr("results", $count)}</b>
|
||||||
</p>
|
</p>
|
||||||
<div style="display: flex;flex-direction: row;">
|
<div>
|
||||||
|
{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 infContainer" style="float:left;width:73.3%;">
|
<div class="container_gray borderup infContainer" style="float:left;width:73.3%;">
|
||||||
|
@ -230,7 +231,12 @@
|
||||||
]}
|
]}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{include searchOptions}
|
<script>
|
||||||
|
window.addEventListener("load", (event) => {
|
||||||
|
document.getElementsByClassName("container_gray")[0].style.minHeight = document.getElementsByClassName("searchOptions")[0].clientHeight+"px";
|
||||||
|
document.getElementsByClassName("searchOptions")[0].style.minHeight = document.getElementsByClassName("container_gray")[0].clientHeight-3+"px";
|
||||||
|
})
|
||||||
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block searchOptions}
|
{block searchOptions}
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
{include "../components/paginator.xml", conf => $paginatorConf}
|
{include "../components/paginator.xml", conf => $paginatorConf}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<script n:if="$thisUser->getPaginatorType() == 0">
|
<script>
|
||||||
u("#pageSelect").nodes[0].value = {$paginatorConf->perPage};
|
u("#pageSelect").nodes[0].value = {$paginatorConf->perPage};
|
||||||
|
|
||||||
u("#pageSelect").on("change", function(e) {
|
u("#pageSelect").on("change", function(e) {
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
<div n:if="!($conf->page === 1 && $conf->count <= $conf->perPage) && $conf->page < $pageCount" class="showMore" data-pageсount="{$pageCount}" data-page="{$conf->page}">
|
<div n:if="!($conf->page === 1 && $conf->count <= $conf->perPage) && $conf->page < $pageCount" class="showMore" data-pageсount="{$pageCount}" data-page="{$conf->page}">
|
||||||
{_show_more}
|
{_show_more}
|
||||||
</div>
|
</div>
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<div id="write" style="padding: 5px 0;" onfocusin="expand_wall_textarea({$textAreaId});">
|
<div id="write" style="padding: 5px 0;" onfocusin="expand_wall_textarea({$textAreaId});">
|
||||||
<form action="{$route}" method="post" enctype="multipart/form-data" style="margin:0;">
|
<form action="{$route}" method="post" enctype="multipart/form-data" style="margin:0;">
|
||||||
<textarea id="wall-post-input{$textAreaId}" data-id="{$textAreaId}" placeholder="{_write}" name="text" style="width: 100%;resize: none;" class="small-textarea"></textarea>
|
<textarea id="wall-post-input{$textAreaId}" placeholder="{_write}" name="text" style="width: 100%;resize: none;" class="small-textarea"></textarea>
|
||||||
<div>
|
<div>
|
||||||
<!-- padding to fix <br/> bug -->
|
<!-- padding to fix <br/> bug -->
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2319,7 +2319,7 @@ a.poll-retract-vote {
|
||||||
float:right;
|
float:right;
|
||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
background-color:#F6F6F6;
|
background-color:#f7f7f7;
|
||||||
margin-right: -7px;
|
margin-right: -7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2697,9 +2697,22 @@ body.article .floating_sidebar, body.article .page_content {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.small_red_button {
|
||||||
|
float: right;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.small_red_button a {
|
||||||
|
color: #B0B0B0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.small_red_button a:hover {
|
||||||
|
color: #a7a7a7;
|
||||||
|
}
|
||||||
|
|
||||||
.showMore {
|
.showMore {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
|
@ -44,4 +44,4 @@ tippy(".mention", {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initMentions()
|
initMentions()
|
|
@ -272,11 +272,9 @@ async function showArticle(note_id) {
|
||||||
|
|
||||||
$(document).on("click", ".showMore", async (e) => {
|
$(document).on("click", ".showMore", async (e) => {
|
||||||
e.currentTarget.innerHTML = `<img id="loader" src="/assets/packages/static/openvk/img/loading_mini.gif">`
|
e.currentTarget.innerHTML = `<img id="loader" src="/assets/packages/static/openvk/img/loading_mini.gif">`
|
||||||
|
|
||||||
let url = new URL(location.href)
|
let url = new URL(location.href)
|
||||||
let newPage = Number(e.currentTarget.dataset.page) + 1
|
let newPage = Number(e.currentTarget.dataset.page) + 1
|
||||||
url.searchParams.set("p", newPage)
|
url.searchParams.set("p", newPage)
|
||||||
url.searchParams.set("posts", 10)
|
|
||||||
|
|
||||||
let xhr = new XMLHttpRequest
|
let xhr = new XMLHttpRequest
|
||||||
xhr.open("GET", url)
|
xhr.open("GET", url)
|
||||||
|
@ -307,16 +305,6 @@ $(document).on("click", ".showMore", async (e) => {
|
||||||
for(const obj of objects) {
|
for(const obj of objects) {
|
||||||
container.insertAdjacentHTML("beforeend", obj.outerHTML)
|
container.insertAdjacentHTML("beforeend", obj.outerHTML)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(result.querySelectorAll("textarea").length > 0) {
|
|
||||||
for(const trea of result.querySelectorAll("textarea")) {
|
|
||||||
setupWallPostInputHandlers(trea.dataset.id)
|
|
||||||
|
|
||||||
u("#post-buttons" + trea.dataset.id + " .postFileSel").on("change", function() {
|
|
||||||
handleUpload.bind(this, trea.dataset.id)();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bsdnHydrate()
|
bsdnHydrate()
|
||||||
|
|
||||||
|
@ -330,20 +318,3 @@ $(document).on("click", ".showMore", async (e) => {
|
||||||
|
|
||||||
xhr.send()
|
xhr.send()
|
||||||
})
|
})
|
||||||
|
|
||||||
let showMoreObserver = new IntersectionObserver(entries => {
|
|
||||||
entries.forEach(x => {
|
|
||||||
if(x.isIntersecting) {
|
|
||||||
$(".showMore").click()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}, {
|
|
||||||
root: null,
|
|
||||||
rootMargin: "0px",
|
|
||||||
threshold: 0
|
|
||||||
})
|
|
||||||
|
|
||||||
let showMore = document.querySelector('.showMore');
|
|
||||||
|
|
||||||
if(showMore != null)
|
|
||||||
showMoreObserver.observe(showMore);
|
|
||||||
|
|
|
@ -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()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue