mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
Compare commits
2 commits
efa3e1213c
...
9d75f0b249
Author | SHA1 | Date | |
---|---|---|---|
|
9d75f0b249 | ||
|
35bfe97360 |
6 changed files with 30 additions and 5 deletions
|
@ -132,7 +132,7 @@
|
|||
{/if}
|
||||
|
||||
<a style="width: 194px;" n:if="OPENVK_ROOT_CONF['openvk']['preferences']['commerce'] && $user->getGiftCount() == 0" href="/gifts?act=pick&user={$user->getId()}" class="profile_link">{_send_gift}</a>
|
||||
<a style="width: 194px;" n:if="$user->getPrivacyPermission('messages.write', $thisUser)" href="/im?sel={$user->getId()}" class="profile_link">{_send_message}</a>
|
||||
<a style="width: 194px;" n:if="$user->getPrivacyPermission('messages.write', $thisUser)" href="/im?sel={$user->getId()}" class="profile_link" rel="nofollow">{_send_message}</a>
|
||||
|
||||
{var $subStatus = $user->getSubscriptionStatus($thisUser)}
|
||||
{if $subStatus === 0}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
|
||||
<div class='scroll_container'>
|
||||
<div class='scroll_node' n:foreach='$posts as $post'>
|
||||
<div class='scroll_node' n:foreach='$posts as $post' data-uniqueid="{$post->getPrettyId()}">
|
||||
<a name="postGarter={$post->getId()}"></a>
|
||||
{include "../components/post.xml", post => $post, onWallOf => true, commentSection => true}
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<div class="content scroll_container">
|
||||
{if sizeof($posts) > 0}
|
||||
<div class='scroll_node' n:foreach='$posts as $post'>
|
||||
<div class='scroll_node' n:foreach='$posts as $post' data-uniqueid="{$post->getPrettyId()}">
|
||||
<a name="postGarter={$post->getId()}"></a>
|
||||
|
||||
{include "../components/post.xml", post => $post, commentSection => true}
|
||||
|
|
|
@ -2335,6 +2335,15 @@ async function __processPaginatorNextPage(page)
|
|||
|
||||
const nodes = parsed_content.querySelectorAll(container_node)
|
||||
nodes.forEach(node => {
|
||||
const unique_id = node.dataset.uniqueid
|
||||
if(unique_id) {
|
||||
const elements_unique = u(`.scroll_node[data-uniqueid='${unique_id}']`).length
|
||||
if(elements_unique > 0) {
|
||||
console.info('AJAX | Found duplicates')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
container.append(node)
|
||||
})
|
||||
|
||||
|
@ -2395,7 +2404,13 @@ const showMoreObserver = new IntersectionObserver(entries => {
|
|||
}
|
||||
|
||||
const page_number = Number(next_page.html())
|
||||
|
||||
try {
|
||||
await __processPaginatorNextPage(page_number)
|
||||
} catch(e) {
|
||||
console.error(e)
|
||||
}
|
||||
|
||||
bsdnHydrate()
|
||||
u('.paginator:not(.paginator-at-top)').removeClass('lagged')
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ window.router = new class {
|
|||
return false
|
||||
}
|
||||
|
||||
if(!url || url == '' || url == '/') {
|
||||
if(!url || url == '') {
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -275,6 +275,11 @@ u(document).on('click', 'a', async (e) => {
|
|||
return
|
||||
}
|
||||
|
||||
// temporary fix
|
||||
if(dom_url == '/') {
|
||||
url = url + 'id0'
|
||||
}
|
||||
|
||||
e.preventDefault()
|
||||
|
||||
console.log(`AJAX | Going to URL ${url}`)
|
||||
|
|
|
@ -229,6 +229,11 @@ function serializeForm(form, submitter = null)
|
|||
}
|
||||
}
|
||||
break
|
||||
case 'radio':
|
||||
if(inp.checked) {
|
||||
fd.append(inp.name, inp.value)
|
||||
}
|
||||
break
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue