Skip to content
Permalink
Browse files

Draggable: Removed ridiculousness (some of it anyway).

  • Loading branch information
scottgonzalez committed Feb 5, 2009
1 parent 57f0188 commit 0c8eed67f5174633ce6d88f0a98b0f3264c4f082
Showing with 9 additions and 14 deletions.
  1. +9 −14 ui/ui.draggable.js
@@ -439,20 +439,15 @@ $.ui.plugin.add("draggable", "connectToSortable", {
var inst = $(this).data("draggable"), o = inst.options;
inst.sortables = [];
$(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
$(typeof this == 'string' ? this+'': this).each(function() {
if($.data(this, 'sortable')) {
var sortable = $.data(this, 'sortable');
if (sortable.options.disabled) { return; }
inst.sortables.push({
instance: sortable,
shouldRevert: sortable.options.revert
});
sortable._refreshItems(); //Do a one-time refresh at start to refresh the containerCache
sortable._trigger("activate", event, inst);
}
});
var sortable = $.data(this, 'sortable');
if (sortable && !sortable.options.disabled) {
inst.sortables.push({
instance: sortable,
shouldRevert: sortable.options.revert
});
sortable._refreshItems(); //Do a one-time refresh at start to refresh the containerCache
sortable._trigger("activate", event, inst);
}
});

},

0 comments on commit 0c8eed6

Please sign in to comment.
You can’t perform that action at this time.