Skip to content
Snippets Groups Projects
Commit 68dab37d authored by Štěpán Farka's avatar Štěpán Farka
Browse files

Merge remote-tracking branch 'origin/feature/pirati-cz' into feature/pirati-cz-bugfixes

parents 1ce9f82a 90601de8
Branches
No related tags found
3 merge requests!609Release,!608Small tuning and fixes of pirati.cz (main) module,!606[ADD] Bugfixes Kontakty
Pipeline #9647 passed
......@@ -218,7 +218,7 @@ class MainHomePage(
).content
data = {
"html": html_content.decode("utf-8"),
"last_page": tweet_page.paginator.num_pages,
"has_next": tweet_page.has_next(),
}
return JsonResponse(data=data, safe=False)
......@@ -388,7 +388,7 @@ class MainArticlesPage(
).content
data = {
"html": html_content.decode("utf-8"),
"last_page": article_page.paginator.num_pages,
"has_next": article_page.has_next(),
}
return JsonResponse(data=data, safe=False)
......
......@@ -42,7 +42,7 @@
const data = await response.json()
tweetsList.innerHTML += data.html;
if (btn.getAttribute('data-page') === data.last_page) { btn.hide() }
if (!data.has_next) { btn.style.display = 'none'; }
const dataPage = parseInt(btn.getAttribute('data-page')) + 1
btn.setAttribute('data-page', dataPage)
......
......@@ -120,8 +120,7 @@
})
const data = await response.json()
searchArticleResultWrapper.innerHTML += data.html;
if (btn.getAttribute('data-page') === data.last_page)
btn.hide();
if (!data.has_next) { btn.style.display = 'none'; }
btn.setAttribute('data-page', parseInt(btn.getAttribute('data-page')) + 1)
}
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment