Multiple connectWith using sortables

Multiple connectWith using sortables


Hi,
I needed to connect a single sortable list up with a number of other
lists, here's how I done it:
ui.sortable.js (1.5b) - change the refresh function to the following -
refresh: function() {
    this.items = [];
    var items = this.items;
    var queries = [$(this.options.items, this.element)];
    if(this.options.connectWith) {
        for (var i = this.options.connectWith.length - 1; i >= 0; i--){
         $(this.options.connectWith[i]).each(function(){
         var inst = $.data($(this)[0],'ui-sortable');
         if(inst && !inst.disabled) queries.push($
(inst.options.items, inst.element));
         });
        };
    }
    for (var i = queries.length - 1; i >= 0; i--){
        queries[i].each(function() {
            $.data(this, 'ui-sortable-item', true); // Data for target checking
(mouse manager)
            items.push({
                item: $(this),
                width: 0, height: 0,
                left: 0, top: 0
            });
        });
    };
},
I'm not totally sure this is the correct approach in terms of
efficiency but it solved my problem :)