r1869 - in trunk: demos/draggable ui
Author: paul.bakaus
Date: Thu Jan 29 10:36:55 2009
New Revision: 1869
Modified:
trunk/demos/draggable/sortable.html
trunk/ui/ui.draggable.js
Log:
draggable: connectToSortable couldn't accept strings (fixes #3984)
Modified: trunk/demos/draggable/sortable.html
==============================================================================
--- trunk/demos/draggable/sortable.html (original)
+++ trunk/demos/draggable/sortable.html Thu Jan 29 10:36:55 2009
@@ -18,7 +18,7 @@
revert: true
});
$("#draggable").draggable({
- connectToSortable: ['#sortable'],
+ connectToSortable: '#sortable',
helper: 'clone',
revert: 'invalid'
});
Modified: trunk/ui/ui.draggable.js
==============================================================================
--- trunk/ui/ui.draggable.js (original)
+++ trunk/ui/ui.draggable.js Thu Jan 29 10:36:55 2009
@@ -436,7 +436,7 @@
$(o.connectToSortable).each(function() {
// 'this' points to a string, and should therefore resolved as query,
but instead, if the string is assigned to a variable, it loops through the
strings properties,
// so we have to append '' to make it anonymous again
- $(this+'').each(function() {
+ $(typeof this == 'string' ? this+'': this).each(function() {
if($.data(this, 'sortable')) {
var sortable = $.data(this, 'sortable');
inst.sortables.push({