-
Notifications
You must be signed in to change notification settings - Fork 67
Conversation
- Get total count of blocks in a BlockBatch within showBlocks() - Fetch perPage (500) blocks at a time - Offset blocks fetch based on "?page=" querystring - Pass currentPage and pages[] to templates/show_blocks - pagination.mustache made for inclusion in show-blocks - CSS counters added to style.css for numbering pagination links - pagination.js handles detecting current page and navigating to others - Remove 'theres_more' flag
This is looking awesome! One small thing: Instead of setting handlers on the various page links, how about setting their href to the target URL? That way things like middle clicking work correctly. Let me know when it's ready for a full review, and thanks. |
Hadn't done literal hrefs because |
You might be able to get what you want out of Mustache with something like: pages: _.range(1, Math.ceil(blocksCount / perPage) + 1).map(function(pageNum) { |
- Move pagination bar logic to blocktogether.js - Omit previous/next links instead of disabling them
- More accurately label the "Block All" button for pagination
Ready for code review. "Block All" button hasn't been given special logic to block pages other than the currently visible one (client side JS not touched.) Changes since first push:
|
Excellent change, thanks! |
I misread #17's intent in my notes! This PR actually exacerbates it, not solves it. |
Still need to resolve "Block All" behavior and use some less generic class names, but could you advise if I'm on the right path with how pagination behaves/is presented?