r1722 - trunk/ui
r1722 - trunk/ui
Author: paul.bakaus
Date: Tue Jan 20 08:34:21 2009
New Revision: 1722
Modified:
trunk/ui/ui.sortable.js
Log:
sortable: connectWith should accept string selectors (fixes #3892, backward
compatibility still existant)
Modified: trunk/ui/ui.sortable.js
==============================================================================
--- trunk/ui/ui.sortable.js (original)
+++ trunk/ui/ui.sortable.js Tue Jan 20 08:34:21 2009
@@ -469,8 +469,9 @@
var queries = [];
if(this.options.connectWith && connected) {
- for (var i = this.options.connectWith.length - 1; i >= 0; i--){
- var cur = $(this.options.connectWith[i]);
+ var connectWith = this.options.connectWith.constructor == String ?
[this.options.connectWith] : this.options.connectWith;
+ for (var i = connectWith.length - 1; i >= 0; i--){
+ var cur = $(connectWith[i]);
for (var j = cur.length - 1; j >= 0; j--){
var inst = $.data(cur[j], 'sortable');
if(inst && inst != this && !inst.options.disabled) {