Merge branch 'touch-support'
commit
10188ec8ac
11
README.md
11
README.md
|
|
@ -466,9 +466,10 @@ the extrahead block with:
|
||||||
|
|
||||||
{% block extrahead %}
|
{% block extrahead %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
<script type="text/javascript" src="{% static 'adminsortable/js/jquery-ui-django-admin.min.js' %}"></script>
|
<script src="{% static 'adminsortable/js/jquery-ui-django-admin.min.js' %}"></script>
|
||||||
<script type="text/javascript" src="{% static 'adminsortable/js/jquery.django-csrf.js' %}"></script>
|
<script src="{% static 'adminsortable/js/jquery.ui.touch-punch.min.js' %}"></script>
|
||||||
<script type="text/javascript" src="{% static 'adminsortable/js/admin.sortable.stacked.inlines.js' %}"></script>
|
<script src="{% static 'adminsortable/js/jquery.django-csrf.js' %}"></script>
|
||||||
|
<script src="{% static 'adminsortable/js/admin.sortable.stacked.inlines.js' %}"></script>
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'adminsortable/css/admin.sortable.inline.css' %}" />
|
<link rel="stylesheet" type="text/css" href="{% static 'adminsortable/css/admin.sortable.inline.css' %}" />
|
||||||
{% endblock extrahead %}
|
{% endblock extrahead %}
|
||||||
|
|
@ -530,8 +531,8 @@ ordering on top of that just seemed a little much in my opinion.
|
||||||
### Status
|
### Status
|
||||||
django-admin-sortable is currently used in production.
|
django-admin-sortable is currently used in production.
|
||||||
|
|
||||||
### What's new in 2.1?
|
### What's new in 2.1.1?
|
||||||
- Removed fallbacks for Django 1.8, Tox testing and many performance improvements [Pull Request 168](https://github.com/iambrandontaylor/django-admin-sortable/pull/168) thanks [@sushifan](https://github.com/jaap3)
|
- Touch support
|
||||||
|
|
||||||
### Future
|
### 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.
|
- Better template support for foreign keys that are self referential. If someone would like to take on rendering recursive sortables, that would be super.
|
||||||
|
|
|
||||||
16
README.rst
16
README.rst
|
|
@ -582,9 +582,10 @@ minimum need to extend the extrahead block with:
|
||||||
|
|
||||||
{% block extrahead %}
|
{% block extrahead %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
<script type="text/javascript" src="{% static 'adminsortable/js/jquery-ui-django-admin.min.js' %}"></script>
|
<script src="{% static 'adminsortable/js/jquery-ui-django-admin.min.js' %}"></script>
|
||||||
<script type="text/javascript" src="{% static 'adminsortable/js/jquery.django-csrf.js' %}"></script>
|
<script src="{% static 'adminsortable/js/jquery.ui.touch-punch.min.js' %}"></script>
|
||||||
<script type="text/javascript" src="{% static 'adminsortable/js/admin.sortable.stacked.inlines.js' %}"></script>
|
<script src="{% static 'adminsortable/js/jquery.django-csrf.js' %}"></script>
|
||||||
|
<script src="{% static 'adminsortable/js/admin.sortable.stacked.inlines.js' %}"></script>
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'adminsortable/css/admin.sortable.inline.css' %}" />
|
<link rel="stylesheet" type="text/css" href="{% static 'adminsortable/css/admin.sortable.inline.css' %}" />
|
||||||
{% endblock extrahead %}
|
{% endblock extrahead %}
|
||||||
|
|
@ -656,13 +657,10 @@ Status
|
||||||
|
|
||||||
django-admin-sortable is currently used in production.
|
django-admin-sortable is currently used in production.
|
||||||
|
|
||||||
What's new in 2.1?
|
What's new in 2.1.1?
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
- Removed fallbacks for Django 1.8, Tox testing and many performance
|
- Touch support
|
||||||
improvements `Pull Request
|
|
||||||
168 <https://github.com/iambrandontaylor/django-admin-sortable/pull/168>`__
|
|
||||||
thanks [@sushifan](https://github.com/jaap3)
|
|
||||||
|
|
||||||
Future
|
Future
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
VERSION = (2, 1, 0)
|
VERSION = (2, 1, 1)
|
||||||
DEV_N = None
|
DEV_N = None
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,15 @@
|
||||||
#sortable ul li
|
#sortable ul li
|
||||||
{
|
{
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
margin-bottom: 8px;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sortable ul li:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
#sortable .sortable
|
#sortable .sortable
|
||||||
{
|
{
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*!
|
||||||
|
* jQuery UI Touch Punch 0.2.3
|
||||||
|
*
|
||||||
|
* Copyright 2011–2014, Dave Furfero
|
||||||
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||||
|
*
|
||||||
|
* Depends:
|
||||||
|
* jquery.ui.widget.js
|
||||||
|
* jquery.ui.mouse.js
|
||||||
|
*/
|
||||||
|
!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
{% if has_sortable_tabular_inlines or has_sortable_stacked_inlines %}
|
{% if has_sortable_tabular_inlines or has_sortable_stacked_inlines %}
|
||||||
<script type="text/javascript" src="{% static 'adminsortable/js/jquery-ui-django-admin.min.js' %}"></script>
|
<script type="text/javascript" src="{% static 'adminsortable/js/jquery-ui-django-admin.min.js' %}"></script>
|
||||||
|
<script src="{% static 'adminsortable/js/jquery.ui.touch-punch.min.js' %}"></script>
|
||||||
{% include 'adminsortable/csrf/jquery.django-csrf.html' with csrf_cookie_name=csrf_cookie_name %}
|
{% include 'adminsortable/csrf/jquery.django-csrf.html' with csrf_cookie_name=csrf_cookie_name %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
<script src="{% static jquery_lib_path %}"></script>
|
<script src="{% static jquery_lib_path %}"></script>
|
||||||
<script src="{% static 'admin/js/jquery.init.js' %}"></script>
|
<script src="{% static 'admin/js/jquery.init.js' %}"></script>
|
||||||
<script src="{% static 'adminsortable/js/jquery-ui-django-admin.min.js' %}"></script>
|
<script src="{% static 'adminsortable/js/jquery-ui-django-admin.min.js' %}"></script>
|
||||||
|
<script src="{% static 'adminsortable/js/jquery.ui.touch-punch.min.js' %}"></script>
|
||||||
{% include 'adminsortable/csrf/jquery.django-csrf.html' with csrf_cookie_name=csrf_cookie_name %}
|
{% include 'adminsortable/csrf/jquery.django-csrf.html' with csrf_cookie_name=csrf_cookie_name %}
|
||||||
<script src="{% static 'adminsortable/js/admin.sortable.js' %}"></script>
|
<script src="{% static 'adminsortable/js/admin.sortable.js' %}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue