Ryan Gahl escribió:
Not always because some of these draggable objects are draggable
because
they are elements of a sortable list
I think when you define a list as sortable all its elements are
draggable, isn't it?
Hmm. Well for this technique to work, you'll have to have a handle to
the actual draggable object from within the onDrop function, and
unfortunately, the argument that gets passed to that function is the
element which is draggable (not the actual draggable object).
So what you have to do then, is a loop to get the handle you need... try
this...
onDrop: function(draggableElement, droppable) {
var thisDraggable;
$A(Draggables.drags).each(function(d) {
if (d.element == draggableElement) {
thisDraggable = d;
throw $break;
}
});
if (thisDraggable)
thisDraggable.options.revert = false;
//other code...
}
The information transmitted in this electronic mail is intended only for the
person or entity to which it is addressed and may contain confidential,
proprietary, and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from all computers.
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Well, this seems to be logic but then when you define a sortable list
all its items are not draggable objects?
--
Mis Cosas
http://blogs.sistes.net/Garito/
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs