diff --git a/README b/README index 611ed95..5465578 100644 --- a/README +++ b/README @@ -130,10 +130,10 @@ Status admin-sortable is currently used in production. -What's new in 1.3.2 +What's new in 1.3.3 ============= -- Fixed an issue that prevented sorting on classes that specified a SortableForeignKey -class, where the SortableForeignKey model itself did not inherit from Sortable. +- Fixed an issue where sortable inlines weren't getting the correct CSS class +which gave them the appearance of not being sortable. Features ============= diff --git a/adminsortable/__init__.py b/adminsortable/__init__.py index d9bae1e..1109fe1 100755 --- a/adminsortable/__init__.py +++ b/adminsortable/__init__.py @@ -1,4 +1,4 @@ -VERSION = (1, 3, 2) # following PEP 386 +VERSION = (1, 3, 3) # following PEP 386 DEV_N = None diff --git a/adminsortable/templates/adminsortable/change_form.html b/adminsortable/templates/adminsortable/change_form.html index d27b7de..e8f0c17 100644 --- a/adminsortable/templates/adminsortable/change_form.html +++ b/adminsortable/templates/adminsortable/change_form.html @@ -5,22 +5,21 @@ {% block extrahead %} {{ block.super }} {% url 'admin:jsi18n' as jsi18nurl %} - + {% if has_sortable_tabular_inlines or has_sortable_stacked_inlines %} - {% include 'adminsortable/shared/javascript_includes.html' %} + {% include 'adminsortable/shared/javascript_includes.html' %} {% endif %} {% if has_sortable_tabular_inlines %} - + {% endif %} {% if has_sortable_stacked_inlines %} - + {% endif %} {% endblock %} {% block extrastyle %} {{ block.super }} - {% if has_sortable_tabular_inlines %} - + {% if has_sortable_tabular_inlines or has_sortable_stacked_inlines %} + {% endif %} - -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/adminsortable/templates/adminsortable/edit_inline/stacked.html b/adminsortable/templates/adminsortable/edit_inline/stacked.html index 01e7f4e..bb930b3 100644 --- a/adminsortable/templates/adminsortable/edit_inline/stacked.html +++ b/adminsortable/templates/adminsortable/edit_inline/stacked.html @@ -1,24 +1,26 @@ {% load i18n adminmedia %}
-

{{ inline_admin_formset.opts.verbose_name_plural|title }} {% if inline_admin_formset.opts.is_sortable %} - drag and drop to change order{% endif %}

-{{ inline_admin_formset.formset.management_form }} -{{ inline_admin_formset.formset.non_form_errors }} +

{{ inline_admin_formset.opts.verbose_name_plural|title }} {% if inline_admin_formset.opts.is_sortable %} - drag and drop to change order{% endif %}

+ {{ inline_admin_formset.formset.management_form }} + {{ inline_admin_formset.formset.non_form_errors }} -{% for inline_admin_form in inline_admin_formset %}
-

{{ inline_admin_formset.opts.verbose_name|title }}: {% if inline_admin_form.original %}{{ inline_admin_form.original }}{% else %}#{{ forloop.counter }}{% endif %} - {% if inline_admin_form.show_url %}{% trans "View on site" %}{% endif %} - {% if inline_admin_formset.formset.can_delete and inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}{% endif %} -

- {% if inline_admin_form.form.non_field_errors %}{{ inline_admin_form.form.non_field_errors }}{% endif %} - {% for fieldset in inline_admin_form %} - {% include "admin/includes/fieldset.html" %} - {% endfor %} - {% if inline_admin_form.has_auto_field %}{{ inline_admin_form.pk_field.field }}{% endif %} - {{ inline_admin_form.fk_field.field }} - {% if inline_admin_form.original %} - - {% endif %} -
{% endfor %} + {% for inline_admin_form in inline_admin_formset %} +
+

{{ inline_admin_formset.opts.verbose_name|title }}: {% if inline_admin_form.original %}{{ inline_admin_form.original }}{% else %}#{{ forloop.counter }}{% endif %} + {% if inline_admin_form.show_url %}{% trans "View on site" %}{% endif %} + {% if inline_admin_formset.formset.can_delete and inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}{% endif %} +

+ {% if inline_admin_form.form.non_field_errors %}{{ inline_admin_form.form.non_field_errors }}{% endif %} + {% for fieldset in inline_admin_form %} + {% include "admin/includes/fieldset.html" %} + {% endfor %} + {% if inline_admin_form.has_auto_field %}{{ inline_admin_form.pk_field.field }}{% endif %} + {{ inline_admin_form.fk_field.field }} + {% if inline_admin_form.original %} + + {% endif %} +
+ {% endfor %}