Removing the page number from the infinite scrolling
This commit is contained in:
parent
f1830b84cd
commit
99fc97f337
3 changed files with 1 additions and 7 deletions
|
@ -758,7 +758,6 @@ function network_infinite_scroll_head(App $a, &$htmlhead)
|
||||||
) {
|
) {
|
||||||
$tpl = Renderer::getMarkupTemplate('infinite_scroll_head.tpl');
|
$tpl = Renderer::getMarkupTemplate('infinite_scroll_head.tpl');
|
||||||
$htmlhead .= Renderer::replaceMacros($tpl, [
|
$htmlhead .= Renderer::replaceMacros($tpl, [
|
||||||
'$pageno' => $pager->getPage(),
|
|
||||||
'$reload_uri' => $pager->getBaseQueryString()
|
'$reload_uri' => $pager->getBaseQueryString()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -859,10 +859,6 @@ function loadScrollContent() {
|
||||||
|
|
||||||
$("#scroll-loader").fadeIn('normal');
|
$("#scroll-loader").fadeIn('normal');
|
||||||
|
|
||||||
// the page number to load is one higher than the actual
|
|
||||||
// page number
|
|
||||||
infinite_scroll.pageno+=1;
|
|
||||||
|
|
||||||
match = $("span.received").last();
|
match = $("span.received").last();
|
||||||
if (match.length > 0) {
|
if (match.length > 0) {
|
||||||
received = match[0].innerHTML;
|
received = match[0].innerHTML;
|
||||||
|
@ -893,7 +889,7 @@ function loadScrollContent() {
|
||||||
|
|
||||||
// get the raw content from the next page and insert this content
|
// get the raw content from the next page and insert this content
|
||||||
// right before "#conversation-end"
|
// right before "#conversation-end"
|
||||||
$.get(infinite_scroll.reload_uri + '&mode=raw&last_received=' + received + '&last_commented=' + commented + '&last_created=' + created + '&last_uriid=' + uriid + '&page=' + infinite_scroll.pageno, function(data) {
|
$.get(infinite_scroll.reload_uri + '&mode=raw&last_received=' + received + '&last_commented=' + commented + '&last_created=' + created + '&last_uriid=' + uriid, function(data) {
|
||||||
$("#scroll-loader").hide();
|
$("#scroll-loader").hide();
|
||||||
if ($(data).length > 0) {
|
if ($(data).length > 0) {
|
||||||
$(data).insertBefore('#conversation-end');
|
$(data).insertBefore('#conversation-end');
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
{{* Create an object with the data which is needed for infinite scroll.
|
{{* Create an object with the data which is needed for infinite scroll.
|
||||||
For the relevant js part look at function loadContent() in main.js. *}}
|
For the relevant js part look at function loadContent() in main.js. *}}
|
||||||
var infinite_scroll = {
|
var infinite_scroll = {
|
||||||
"pageno" : {{$pageno}},
|
|
||||||
"reload_uri": "{{$reload_uri nofilter}}"
|
"reload_uri": "{{$reload_uri nofilter}}"
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue