Fixed bug with other jquery drag drop stuff (like sorting apps in the sidebox menu in the stylite template) not working correctly

This commit is contained in:
Andreas Stöckel 2011-06-19 11:15:37 +00:00
parent 0991eed64a
commit 4a1d2cd72c

View File

@ -272,22 +272,25 @@ function egwDropActionImplementation()
$(node).droppable(
{
"accept": function(_draggable) {
var accepted = ai._fetchAccepted(
_callback.call(_context, "links", ai, EGW_AO_EXEC_THIS));
// Check whether all drag types of the selected objects
// are accepted
var ddTypes = _draggable.data("ddTypes");
for (var i = 0; i < ddTypes.length; i++)
if (typeof _draggable.data("ddTypes") != "undefined")
{
if (accepted.indexOf(ddTypes[i]) == -1)
{
return false;
}
}
var accepted = ai._fetchAccepted(
_callback.call(_context, "links", ai, EGW_AO_EXEC_THIS));
return true;
// Check whether all drag types of the selected objects
// are accepted
var ddTypes = _draggable.data("ddTypes");
for (var i = 0; i < ddTypes.length; i++)
{
if (accepted.indexOf(ddTypes[i]) == -1)
{
return false;
}
}
return true;
}
},
"drop": function(event, ui) {
var draggable = ui.draggable;