flaviusmatis / simplePagination.js

A simple jQuery pagination plugin.
Other
784 stars 402 forks source link

Add ellipsePageSet option #115

Closed Mottie closed 8 years ago

Mottie commented 9 years ago

When this option is true, clicking on the ellipse will replace the ellipse with a number type input in which you can manually set the resulting page.

Try the change in this demo: http://jsbin.com/vibasaluci/edit?output

I didn't add any unit tests for these changes, but all tests still pass.

flaviusmatis commented 8 years ago

This looks like a nice feature to have. Thanks.

smartcorestudio commented 8 years ago

Very nice feature. But if we manually type number that is greater than totat amount of pages and press Enter, no page will be selected. Maybe it's better to go to the last page in this case, how do you think? Also "standard" number inputs look inconsistent in different browsers and doesn't match the design of the pagination. So I think it will be nice to have an ability to add a callback where we can initialize custom number components (like this https://formstone.it/components/number/ for example)

smartcorestudio commented 8 years ago

I've created a small pull request to address the 1st described issue: https://github.com/flaviusmatis/simplePagination.js/pull/118 - just an additional check before selecting a page