DataTables / Plugins

Plug-ins for DataTables
Other
1.04k stars 1.74k forks source link

Ability of ellipses not built in DataTables 1.10? #101

Open Tklaversma opened 10 years ago

Tklaversma commented 10 years ago

The ellipses.js plugin is deprecated because it should be built in DataTables 1.10.

"Note that DataTables 1.10 has this ability built in. As such, this plug-ins has been marked as deprecated, but may still be useful for if you are using an old version of DataTables."

But me (and others) haven't found the ability yet to change the gap between the number of pagination buttons in DataTables 1.10. Am I missing something?

If the ability is not built in, can someone show me a workaround solution (or head me in the right direction) to gain control over the following:

Change this: Previous 1 2 3 4 5 ... 10 Next

into (for example) this: Previous 1 ... 10 Next

Hope someone can help me out.

Thanks in advance!

DataTables commented 10 years ago

Try using $.fn.dataTable.ext.pager.numbers_length = 5; to change the number of buttons shown. Example: http://live.datatables.net/fofowofu/1/edit .

It doesn't currently work with values < 5.

Tklaversma commented 10 years ago

Thanks, that worked :+1:!

Problem is that I need a length of 3. As you said, it currently does not work, but is there a branch available (link) where I can follow this particular progress?

DataTables commented 10 years ago

No as it isn't something I'm working on at the moment. You are welcome to fork the code and send a pull request with a fix.

Tklaversma commented 10 years ago

I'll do that ;). Again thanks for your help so far.