|
|
@ -74,6 +74,7 @@ |
|
|
|
options.handle = options.handle || null; |
|
|
|
options.handle = options.handle || null; |
|
|
|
options.draggable = options.draggable || el.children[0] && el.children[0].nodeName || (/[uo]l/i.test(el.nodeName) ? 'li' : '*'); |
|
|
|
options.draggable = options.draggable || el.children[0] && el.children[0].nodeName || (/[uo]l/i.test(el.nodeName) ? 'li' : '*'); |
|
|
|
options.ghostClass = options.ghostClass || 'sortable-ghost'; |
|
|
|
options.ghostClass = options.ghostClass || 'sortable-ghost'; |
|
|
|
|
|
|
|
options.ignore = options.ignore || 'a, img'; |
|
|
|
|
|
|
|
|
|
|
|
options.onAdd = _bind(this, options.onAdd || noop); |
|
|
|
options.onAdd = _bind(this, options.onAdd || noop); |
|
|
|
options.onUpdate = _bind(this, options.onUpdate || noop); |
|
|
|
options.onUpdate = _bind(this, options.onUpdate || noop); |
|
|
@ -142,11 +143,10 @@ |
|
|
|
tapEvt = evt; |
|
|
|
tapEvt = evt; |
|
|
|
target.draggable = true; |
|
|
|
target.draggable = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Disable "draggable"
|
|
|
|
// Disable "draggable"
|
|
|
|
_find(target, 'a', _disableDraggable); |
|
|
|
Array.prototype.forEach.call(options.ignore.split(','), function (criteria) { |
|
|
|
_find(target, 'img', _disableDraggable); |
|
|
|
_find(target, criteria.trim(), _disableDraggable); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if( touch ){ |
|
|
|
if( touch ){ |
|
|
|
// Touch device support
|
|
|
|
// Touch device support
|
|
|
@ -410,7 +410,6 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function _bind(ctx, fn){ |
|
|
|
function _bind(ctx, fn){ |
|
|
|
var args = slice.call(arguments, 2); |
|
|
|
var args = slice.call(arguments, 2); |
|
|
|
return fn.bind ? fn.bind.apply(fn, [ctx].concat(args)) : function (){ |
|
|
|
return fn.bind ? fn.bind.apply(fn, [ctx].concat(args)) : function (){ |
|
|
|