This is a tricky one to get right; we try to make pagers work on natural indices like timestamps, revision ids, or namespace/title pairs. As such, it's *easy* to look up the "first" and "last" entries but very hard to find the "50%" entry.
If it's something time-based you can fairly easily hook up a slider to a date/time range, but there's no guarantee there'll be even numbers of items on each side.
IndexPager would let you dive right in to a row offset for any index type, but would be much more expensive in lookups on the table (and leaves unstable URLs whose contents change as the database changes).
On Mon, Jun 3, 2013 at 10:58 AM, Mark A. Hershberger mah@everybody.orgwrote:
For some work I'm doing on a project, I'm using the Pager class.
This is really good (and I've learned a lot along the way), but I would like to use a slider (like http://jqueryui.com/slider/) to allow the user to jump to different places in the paged results.
I think that to do this right I need to find the total number of results and then tell Pager to serve the results that are associated with that selected spot on the slider.
For example, when the user selects a point 25% along the slider, I'll be able to find out there are 1024 results and jump to the set containing the 256th result.
For other pager tasks, I've been using the IndexPager, but this pager is obviously the wrong one for this job.
Is there a better one? Is there a pager-with-slider implementation out there already that I'm just not aware of?
Love alone reveals the true shape of the universe. -- "Everywhere Present", Stephen Freeman
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l