Updated CSS classing of sortable inline and stacked items.
Concatenated classing of sortable inlines into one stylesheet. Updated version to 1.3.3 Updated READMEmaster
parent
484f00d263
commit
866adffd7b
6
README
6
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
|
||||
=============
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
VERSION = (1, 3, 2) # following PEP 386
|
||||
VERSION = (1, 3, 3) # following PEP 386
|
||||
DEV_N = None
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@
|
|||
|
||||
{% block extrastyle %}
|
||||
{{ block.super }}
|
||||
{% if has_sortable_tabular_inlines %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}adminsortable/css/admin.sortable.tabular.inline.css" />
|
||||
{% if has_sortable_tabular_inlines or has_sortable_stacked_inlines %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}adminsortable/css/admin.sortable.inline.css" />
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
@ -4,7 +4,8 @@
|
|||
{{ inline_admin_formset.formset.management_form }}
|
||||
{{ inline_admin_formset.formset.non_form_errors }}
|
||||
|
||||
{% for inline_admin_form in inline_admin_formset %}<div class="inline-related{% if forloop.last %} empty-form last-related{% endif %}" id="{{ inline_admin_formset.formset.prefix }}-{% if not forloop.last %}{{ forloop.counter0 }}{% else %}empty{% endif %}">
|
||||
{% for inline_admin_form in inline_admin_formset %}
|
||||
<div class="inline-related{% if forloop.last %} empty-form last-related{% endif %}" id="{{ inline_admin_formset.formset.prefix }}-{% if not forloop.last %}{{ forloop.counter0 }}{% else %}empty{% endif %}">
|
||||
<h3><b>{{ inline_admin_formset.opts.verbose_name|title }}:</b> <span class="inline_label">{% if inline_admin_form.original %}{{ inline_admin_form.original }}{% else %}#{{ forloop.counter }}{% endif %}</span>
|
||||
{% if inline_admin_form.show_url %}<a href="../../../r/{{ inline_admin_form.original_content_type_id }}/{{ inline_admin_form.original.id }}/">{% trans "View on site" %}</a>{% endif %}
|
||||
{% if inline_admin_formset.formset.can_delete and inline_admin_form.original %}<span class="delete">{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}</span>{% endif %}
|
||||
|
|
@ -18,7 +19,8 @@
|
|||
{% if inline_admin_form.original %}
|
||||
<input type="hidden" name="admin_sorting_url" value="{% url admin:admin_do_sorting inline_admin_form.original.model_type_id %}" />
|
||||
{% endif %}
|
||||
</div>{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -13,6 +13,7 @@ class CreditInline(SortableTabularInline):
|
|||
|
||||
class NoteInline(SortableStackedInline):
|
||||
model = Note
|
||||
extra = 0
|
||||
|
||||
|
||||
class ProjectAdmin(SortableAdmin):
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
.sortable
|
||||
{
|
||||
cursor: move;
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
.tabular .sortable
|
||||
{
|
||||
cursor: move;
|
||||
}
|
||||
Loading…
Reference in New Issue