Fix reorder past a deleted item

pull/2923/merge
Janneke Janssen 2017-02-27 21:29:41 +01:00 zatwierdzone przez Matt Westcott
rodzic c965212003
commit c1a751e6c0
3 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -65,6 +65,7 @@ Changelog
* Fix: Fixed display of ManyToMany fields and False values on the ModelAdmin inspect view (Andy Babic)
* Fix: Prevent pages from being recursively copied into themselves (Matheus Bratfisch)
* Fix: Specifying the full file name in documents URL is mandatory (Morgan Aubert)
* Fix: Reordering inline forms now works correctly when moving past a deleted form (Janneke Janssen)
1.9 (16.02.2017)

Wyświetl plik

@ -92,6 +92,7 @@ Bug fixes
* Fixed display of ManyToMany fields and False values on the ModelAdmin inspect view (Andy Babic)
* Prevent pages from being recursively copied into themselves (Matheus Bratfisch)
* Specifying the full file name in documents URL is mandatory (Morgan Aubert)
* Reordering inline forms now works correctly when moving past a deleted form (Janneke Janssen)
Upgrade considerations

Wyświetl plik

@ -132,7 +132,7 @@ function InlinePanel(opts) {
var currentChildOrder = currentChildOrderElem.val();
/* find the previous visible 'inline_child' li before this one */
var prevChild = currentChild.prev(':visible');
var prevChild = currentChild.prevAll(':not(.deleted)').first();
if (!prevChild.length) return;
var prevChildOrderElem = prevChild.find('input[name$="-ORDER"]');
var prevChildOrder = prevChildOrderElem.val();
@ -153,7 +153,7 @@ function InlinePanel(opts) {
var currentChildOrder = currentChildOrderElem.val();
/* find the next visible 'inline_child' li after this one */
var nextChild = currentChild.next(':visible');
var nextChild = currentChild.nextAll(':not(.deleted)').first();
if (!nextChild.length) return;
var nextChildOrderElem = nextChild.find('input[name$="-ORDER"]');
var nextChildOrder = nextChildOrderElem.val();