|
|
|
@ -25,6 +25,7 @@
|
|
|
|
|
"use strict"; |
|
|
|
|
|
|
|
|
|
var dragEl, |
|
|
|
|
parentEl, |
|
|
|
|
ghostEl, |
|
|
|
|
cloneEl, |
|
|
|
|
rootEl, |
|
|
|
@ -303,6 +304,7 @@
|
|
|
|
|
|
|
|
|
|
rootEl = el; |
|
|
|
|
dragEl = target; |
|
|
|
|
parentEl = target.parentNode; |
|
|
|
|
nextEl = dragEl.nextSibling; |
|
|
|
|
activeGroup = options.group; |
|
|
|
|
|
|
|
|
@ -703,15 +705,15 @@
|
|
|
|
|
_disableDraggable(dragEl); |
|
|
|
|
_toggleClass(dragEl, this.options.ghostClass, false); |
|
|
|
|
|
|
|
|
|
if (rootEl !== dragEl.parentNode) { |
|
|
|
|
if (rootEl !== parentEl) { |
|
|
|
|
newIndex = _index(dragEl); |
|
|
|
|
|
|
|
|
|
// drag from one list and drop into another
|
|
|
|
|
_dispatchEvent(null, dragEl.parentNode, 'sort', dragEl, rootEl, oldIndex, newIndex); |
|
|
|
|
_dispatchEvent(null, parentEl, 'sort', dragEl, rootEl, oldIndex, newIndex); |
|
|
|
|
_dispatchEvent(this, rootEl, 'sort', dragEl, rootEl, oldIndex, newIndex); |
|
|
|
|
|
|
|
|
|
// Add event
|
|
|
|
|
_dispatchEvent(null, dragEl.parentNode, 'add', dragEl, rootEl, oldIndex, newIndex); |
|
|
|
|
_dispatchEvent(null, parentEl, 'add', dragEl, rootEl, oldIndex, newIndex); |
|
|
|
|
|
|
|
|
|
// Remove event
|
|
|
|
|
_dispatchEvent(this, rootEl, 'remove', dragEl, rootEl, oldIndex, newIndex); |
|
|
|
@ -742,6 +744,7 @@
|
|
|
|
|
// Nulling
|
|
|
|
|
rootEl = |
|
|
|
|
dragEl = |
|
|
|
|
parentEl = |
|
|
|
|
ghostEl = |
|
|
|
|
nextEl = |
|
|
|
|
cloneEl = |
|
|
|
@ -1149,7 +1152,7 @@
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sortable.version = '1.2.1'; |
|
|
|
|
Sortable.version = '1.2.2'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|