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.
|
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
|
- Fixed an issue where sortable inlines weren't getting the correct CSS class
|
||||||
class, where the SortableForeignKey model itself did not inherit from Sortable.
|
which gave them the appearance of not being sortable.
|
||||||
|
|
||||||
Features
|
Features
|
||||||
=============
|
=============
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
VERSION = (1, 3, 2) # following PEP 386
|
VERSION = (1, 3, 3) # following PEP 386
|
||||||
DEV_N = None
|
DEV_N = None
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,7 @@
|
||||||
|
|
||||||
{% block extrastyle %}
|
{% block extrastyle %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{% if has_sortable_tabular_inlines %}
|
{% if has_sortable_tabular_inlines or has_sortable_stacked_inlines %}
|
||||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}adminsortable/css/admin.sortable.tabular.inline.css" />
|
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}adminsortable/css/admin.sortable.inline.css" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
{% load i18n adminmedia %}
|
{% load i18n adminmedia %}
|
||||||
<div class="inline-group" id="{{ inline_admin_formset.formset.prefix }}-group">
|
<div class="inline-group" id="{{ inline_admin_formset.formset.prefix }}-group">
|
||||||
<h2>{{ inline_admin_formset.opts.verbose_name_plural|title }} {% if inline_admin_formset.opts.is_sortable %} - drag and drop to change order{% endif %}</h2>
|
<h2>{{ inline_admin_formset.opts.verbose_name_plural|title }} {% if inline_admin_formset.opts.is_sortable %} - drag and drop to change order{% endif %}</h2>
|
||||||
{{ inline_admin_formset.formset.management_form }}
|
{{ inline_admin_formset.formset.management_form }}
|
||||||
{{ inline_admin_formset.formset.non_form_errors }}
|
{{ 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>
|
<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_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 %}
|
{% 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 %}
|
{% 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 %}" />
|
<input type="hidden" name="admin_sorting_url" value="{% url admin:admin_do_sorting inline_admin_form.original.model_type_id %}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>{% endfor %}
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -13,6 +13,7 @@ class CreditInline(SortableTabularInline):
|
||||||
|
|
||||||
class NoteInline(SortableStackedInline):
|
class NoteInline(SortableStackedInline):
|
||||||
model = Note
|
model = Note
|
||||||
|
extra = 0
|
||||||
|
|
||||||
|
|
||||||
class ProjectAdmin(SortableAdmin):
|
class ProjectAdmin(SortableAdmin):
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
.sortable
|
||||||
|
{
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
.tabular .sortable
|
|
||||||
{
|
|
||||||
cursor: move;
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue