Skip to content

Conversation

@larsen0815
Copy link
Contributor

In #381, you recently added the possibility to go through mails by cursor keys up/down. This PR should do the same for left/right: Go to the previous/next page of search results.

The user could then easily go through all mails and pages just using the cursor keys.

However, this is just a draft. I am not a web dev and ChatGPT wasn't able to create working code to detect the current page.
If you could plese tell me how to solve this, I would update the PR accordingly.

@larsen0815 larsen0815 requested a review from jsuto as a code owner January 20, 2026 16:55
@jsuto
Copy link
Owner

jsuto commented Jan 21, 2026

Did it work when you tried it?

@larsen0815
Copy link
Contributor Author

larsen0815 commented Jan 21, 2026

No, as I said: Just a draft, needs code to get the current page number to then call navigation(). And I don't have the experience how to write that code.

@larsen0815
Copy link
Contributor Author

So, could you please provide a hint how I can get the current page number?

@jsuto
Copy link
Owner

jsuto commented Jan 26, 2026

templates/common/paging.tpl implements the pagination, it calls navigation() in assets/js/piler.js

@larsen0815 larsen0815 marked this pull request as draft January 27, 2026 15:55
@larsen0815
Copy link
Contributor Author

Yes, but what is the equivalent of $prev_page and $next_page (from paging.tpl) in "piler.js"?
Which variable can be used to get the current page number?

@larsen0815
Copy link
Contributor Author

Can you help me here? Otherwise I won't get this implemented.

@jsuto
Copy link
Owner

jsuto commented Feb 11, 2026

It's Piler.Shared.page. The navigation() function updates this variable.

@larsen0815
Copy link
Contributor Author

Thanks, I think I can continue with this in two weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants