Skip to main content

Bug Tracker

Side navigation

#3232 closed bug (invalid)

Opened August 08, 2008 09:24AM UTC

Closed August 08, 2008 10:34PM UTC

UI sortables update event not firing when sorting within same div when multiple sortable divs

Reported by: ErMasca Owned by:
Priority: major Milestone: 1.3
Component: plugin Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:
Description

hope the code attached helps my bug description.

I have found that when you have a layout made out of divs as "zones" and little divs within "parts".

when sorting from zone to zone works just fine, buut when you try to sort within the same div the update event doesnt fire.

$(document).ready(

function () {

var sortableChange = function(e, ui){

if(ui.sender){

var w = ui.element.width();

ui.placeholder.width(w);

ui.helper.css("width",ui.element.children().width());

}

};

var sortableUpdate = function(e, ui){

if(ui.sender){

var w = ui.element.width();

ui.placeholder.width(w);

ui.helper.css("width",ui.element.children().width());

var zones = $('.part').not(".ui-sortable-helper");

var wp = '';

for(var x=0; x<zones.length; x++)

{

if(wp.length > 0){wp+='&';}

var pid = $('#'+zones[x].id).parent(".wpzone").attr("id");

wp+=pid+'='+zones[x].id;

}

alert(wp);

}

};

$('.wpzone').sortable({

cursor: 'move',

items: $('.part'),

handle: $('.titlebar'),

opacity:90,

zIndex:10000,

dropOnEmpty:true,

containment:'document',

placeholder:'sortHelper',

helperclass: 'sortHelper',

activeclass :'sortableactive',

hoverclass : 'sortHelper',

appendTo: 'body',

tolerance:'intersect',

refreshPositions:true,

connectWith: $('.wpzone'),

delay:0,

distance:5,

scroll:true,

scrollSensitivity:50,

revert:true,

cursorAt: {top:15,left: 10 },

start: function(e,ui) { ui.helper.css("width", ui.item.width()); },

change: sortableChange,

update:sortableUpdate

});

});

Attachments (0)
Change History (1)

Changed August 08, 2008 10:34PM UTC by flesler comment:1

resolution: → invalid
status: newclosed

This belongs to jQuery UI.

Please repost this to the UI Bug Tracker.