jmcclell / django-bootstrap-pagination

Django template tag for rendering Page objects as Bootstrap pagination HTML
MIT License
212 stars 83 forks source link

Turn disabled link into span #32

Closed Gagaro closed 8 years ago

Gagaro commented 9 years ago

Disabled links should not be clickable.

In my case, I do an ajax call for each click on the link in the pagination. I can of course filter the link I load ajax from, but it shouldn't be done at this level.

What do you think about it ?

jmcclell commented 9 years ago

Great idea.

I need to spend some time creating an automated test suite for this project before I start accepting more PR's, though. I have several I want to accept but I can't test them all manually. My time is limited, alas. (Not a problem unique to me, of course!)

This is a pretty simple change, but I need to verify everything still looks correct visually.

Gagaro commented 9 years ago

Sure, having tests can only be a good idea :+1: .

kvdveer commented 8 years ago

@Gagaro I'm helping @jmcclell out by walking through the merge requests, now that we have proper CI in place. The latest version of django-bootstrap-pagination uses a slighly different solution to the problem you described, by adding the .disabled class to the link. This is also how the Bootstrap documentation does it.

Does that solution solve your use case as well, or would you still need the span solution?

kvdveer commented 8 years ago

@Gagaro - never mind, I misread the merge conflict.

I've merged your patch into a separate branch (and extended it a little). Once travis is happy about it, I'll merge it, so it can be part of the PyPi release some time this week.

Gagaro commented 8 years ago

Nice, thanks :+1: .

kvdveer commented 8 years ago

v1.6.0 is on PyPi, and contains your change (manually merged)