mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-07-20 07:11:01 +02:00
Fix issue when tot files < pagination interval
This commit is contained in:
@@ -186,7 +186,6 @@ var loadNextBatch = function loadNextBatch(callback) {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
var fillView = function fillView() {
|
||||
@@ -212,6 +211,9 @@ var disableInfiniteScrolling = function disableInfiniteScrolling() {
|
||||
};
|
||||
|
||||
$('.js__files').on('fillView', function(event) {
|
||||
fillView();
|
||||
enableInfiniteScrolling();
|
||||
// the first batch got the max number of media files, try loading more
|
||||
if (($('.js__files')[0].innerHTML.split('card-item').length - 1) === MEDIA_PAGINATION_INTERVAL) {
|
||||
fillView();
|
||||
enableInfiniteScrolling();
|
||||
}
|
||||
});
|
||||
|
||||
4
themes/grav/js/admin.min.js
vendored
4
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user