Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Commit 22a8827

Browse files
committed
disable next button in activation list view when we're at the end
Fixes #862
1 parent 451b42a commit 22a8827

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/content/js/views/list/activations.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -447,14 +447,21 @@ const _render = ({entity, activationIds, container, noCrop=false, noPip=false, s
447447
noCrop, noPip, showResult, showStart, showTimeline, skip, limit, parsedOptions })
448448
}
449449
})
450+
450451
if (skip === 0) {
451452
// disable the back button when we're on the first page
452453
prev.classList.add('list-paginator-button-disabled')
453454
} else {
454455
// otherwise, onclick go back a page
455456
prev.onclick = goto(skip - limit)
456457
}
457-
next.onclick = goto(skip + limit)
458+
459+
if (skip + limit >= count) {
460+
// we're already at the end, so disable the next button
461+
next.classList.add('list-paginator-button-disabled')
462+
} else {
463+
next.onclick = goto(skip + limit)
464+
}
458465
} // end of paginator
459466

460467
// try $ ls; $ ls; then paginate. this avoids chrome

0 commit comments

Comments
 (0)