mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
paginator progress bar
This commit is contained in:
@@ -783,10 +783,12 @@ define(function() {
|
|||||||
var windowHeight = jQuery(window).height();
|
var windowHeight = jQuery(window).height();
|
||||||
var scrollTop = jQuery(window).scrollTop();
|
var scrollTop = jQuery(window).scrollTop();
|
||||||
var scrollBottom = scrollTop + windowHeight;
|
var scrollBottom = scrollTop + windowHeight;
|
||||||
|
var progressBar = $('.progress-bar');
|
||||||
|
|
||||||
if (scrollTop < 50 && Topic.postCount > 1) {
|
if (scrollTop < 50 && Topic.postCount > 1) {
|
||||||
localStorage.removeItem("topic:" + tid + ":bookmark");
|
localStorage.removeItem("topic:" + tid + ":bookmark");
|
||||||
pagination.innerHTML = '0 out of ' + Topic.postCount;
|
pagination.innerHTML = '0 out of ' + Topic.postCount;
|
||||||
|
progressBar.width(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -813,6 +815,8 @@ define(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pagination.innerHTML = this.postnumber + ' out of ' + Topic.postCount;
|
pagination.innerHTML = this.postnumber + ' out of ' + Topic.postCount;
|
||||||
|
console.log((this.postnumber / Topic.postCount * 100) + '%');
|
||||||
|
progressBar.width((this.postnumber / Topic.postCount * 100) + '%');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -141,6 +141,9 @@
|
|||||||
<span id="pagination"></span>
|
<span id="pagination"></span>
|
||||||
<i class="fa fa-chevron-down pointer"></i>
|
<i class="fa fa-chevron-down pointer"></i>
|
||||||
</a>
|
</a>
|
||||||
|
<div class="progress-container">
|
||||||
|
<div class="progress-bar"></div>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user