Thanks
> it seems the pinax bootstrap theme has already been updated to Bootstrap
Yes, but using crispy-forms it seem that some new bootstrap style
(form-inline for example) doesn't work properly (but the cause may be
the way crispy-forms rendering formset)
also modal form doesn't work:
Modals as documented by Twitter do not work in pinax-theme-bootstrap. I do hope this changes, but it isn't as trivial as it sounds. There is custom modal support in pinax-theme-bootstrap written before bootstrap bundled JS. It actually has more functionality than what bootstrap provides, but doesn't behave the same. The goal is to find a way to make our custom modals work in addition to bootstrap's modals.
In the meantime you can take a look at these files to get an idea of what is going on now (unfortunately subject to change in future versions):
https://github.com/pinax/pinax-theme-bootstrap/blob/master/pinax_theme_bootstrap/static/pinax/js/pinax.modal.js
https://github.com/pinax/pinax-theme-bootstrap/blob/master/pinax_theme_bootstrap/templates/idios/profile.html
https://github.com/pinax/pinax-theme-bootstrap/blob/master/pinax_theme_bootstrap/templates/idios/profile_edit_ajax.html
https://github.com/eldarion/idios/blob/master/idios/views.py#L166
The idios view implements some behavior the Pinax modal expects.
I do hope we are able to maintain some form of compatibility with what we've done in getting native modals working. However, it may be entirely possible we punt on making additive and make the current behavior optional.
At any rate, I hope this helps a little.
Brian Rosner
http://twitter.com/brosner
https://github.com/brosner
Thank you for the answer.
I follow your suggest but I have a problem.
My code is something like this:
{% for object in objects %}
<a id="edit-obj" href="{% url edit_obj object.id %}" >Edit</a>
{% endfor %}
but only the first link of the link work...
Can you tell me why?
> Il 23/02/2012 09:01, Brian Rosner ha scritto:
>> There is custom modal support in pinax-theme-bootstrap written before bootstrap bundled JS
>
> Thank you for the answer.
>
> I follow your suggest but I have a problem.
> My code is something like this:
>
> {% for object in objects %}
> <a id="edit-obj" href="{% url edit_obj object.id %}" >Edit</a>
> {% endfor %}
The id attribute is meant to be unique in an HTML document. You need to modify the code to work with the class attribute instead of id.
Brian Rosner
https://twitter.com/brosner
https://github.com/brosner
> The id attribute is meant to be unique in an HTML document
Ok, I need holidays :(
> The id attribute is meant to be unique in an HTML document.
...
{% for object in objects %}
<a class="edit-obj" href="{% url edit_obj object.id %}">Edit</a>
{% endfor %}
...
{% block extra_body %}
<script>
$(function() {
$(".edit-obj").modal({
backdrop: true
});
});
</script>
{% endblock %}
Now it work but all the modal-forms open the first object.id link
(all {% url edit_obj object.id %} links show the details of the first
object.id)
> ...
> {% for object in objects %}
> <a class="edit-obj" href="{% url edit_obj object.id %}">Edit</a>
> {% endfor %}
> ...
>
> {% block extra_body %}
> <script>
> $(function() {
> $(".edit-obj").modal({
> backdrop: true
> });
> });
> </script>
> {% endblock %}
> all {% url edit_obj object.id %} links show the details of the first
> object.id
Somebody can help me?
I realy cannot understand why different url open the same instance...