Merge branch 'master' into develop

master
Brandon Taylor 2016-06-15 20:40:48 -04:00
commit 6ffbb9b358
6 changed files with 10 additions and 34 deletions

View File

@ -2,11 +2,7 @@
[![Build Status](https://travis-ci.org/iambrandontaylor/django-admin-sortable.svg?branch=master)](https://travis-ci.org/iambrandontaylor/django-admin-sortable)
<<<<<<< Updated upstream
Current version: 2.0.12
=======
Current version: 2.0.14
>>>>>>> Stashed changes
Current version: 2.0.15
This project makes it easy to add drag-and-drop ordering to any model in
Django admin. Inlines for a sortable model may also be made sortable,
@ -500,19 +496,11 @@ ordering on top of that just seemed a little much in my opinion.
### Status
django-admin-sortable is currently used in production.
<<<<<<< Updated upstream
### What's new in 2.0.12?
- Fixed an issue with CSRF_COOKIE_NAME not being passed correctly to inlines. Thanks [@Hovercross](https://github.com/Hovercross) for reporting the issue.
=======
### What's new in 2.0.14?
### What's new in 2.0.15?
- Refactored exception handling when determining `order_field_name`
>>>>>>> Stashed changes
### Future
- Better template support for foreign keys that are self referential. If someone would like to take on rendering recursive sortables, that would be super.
### License
django-admin-sortable is released under the Apache Public License v2.

View File

@ -3,11 +3,7 @@ Django Admin Sortable
|Build Status|
<<<<<<< Updated upstream
Current version: 2.0.12
=======
Current version: 2.0.14
>>>>>>> Stashed changes
Current version: 2.0.15
This project makes it easy to add drag-and-drop ordering to any model in
Django admin. Inlines for a sortable model may also be made sortable,
@ -54,7 +50,7 @@ Download django-admin-sortable from
`source <https://github.com/iambrandontaylor/django-admin-sortable/archive/master.zip>`__
1. Unzip the directory and cd into the uncompressed project directory
2.
2.
- Optional: Enable your virtualenv
@ -615,19 +611,11 @@ Status
django-admin-sortable is currently used in production.
<<<<<<< Updated upstream
What's new in 2.0.12?
~~~~~~~~~~~~~~~~~~~~~
- Fixed an issue with CSRF\_COOKIE\_NAME not being passed correctly to
inlines. Thanks [@Hovercross](https://github.com/Hovercross) for
reporting the issue.
=======
What's new in 2.0.14?
What's new in 2.0.15?
~~~~~~~~~~~~~~~~~~~~~
- Refactored exception handling when determining ``order_field_name``
>>>>>>> Stashed changes
Future
~~~~~~

View File

@ -1,6 +1,6 @@
VERSION = (2, 0, 14)
VERSION = (2, 0, 15)
DEV_N = None
def get_version():
version = '{0}.{1}'.format(VERSION[0], VERSION[1])

View File

@ -24,7 +24,7 @@
{
// set icons based on position
lineItems.each(function(index, element) {
var icon = $(element).find('> a .fa');
var icon = $(element).find('a.admin_sorting_url .fa');
icon.removeClass('fa-sort-desc fa-sort-asc fa-sort');
if (index === 0) {

View File

@ -28,7 +28,7 @@
ui.item.parent().children('tr').each(function(i)
{
var index_value = $(this).find('.original :input:first').val();
if (index_value !== '' && index_value !== undefined) {
if (index_value !== '' && index_value !== undefined) {
indexes.push(index_value);
}
});

View File

@ -2,5 +2,5 @@
<form>
<input name="pk" type="hidden" value="{{ object.pk }}" />
<a href="{% url 'admin:admin_do_sorting' object.model_type_id %}" class="admin_sorting_url"><i class="fa fa-{% if forloop.first %}sort-desc{% elif forloop.last %}sort-asc{% else %}sort{% endif %}"></i> {{ object }}</a>
</form>
<a href="{% url 'admin:admin_do_sorting' object.model_type_id %}" class="admin_sorting_url"><i class="fa fa-{% if forloop.first %}sort-desc{% elif forloop.last %}sort-asc{% else %}sort{% endif %}"></i> {{ object }}</a>