I try to put a global var that prevents the bubble effect but the item
don't revert to its original position

Here my javascript:

<script type="text/javascript">
        var bubbeling = false;
        function Ordenar() {
                if(bubbeling == false) { alert(Sortable.sequence('Tasques')); }
                else { bubbeling = false; }
        }
        function FerDepenent(element, droppable, event) {
                bubbeling = true;
                alert(element.id + " a " + droppable.up().id);
        }
        document.observe('dom:loaded', function(){
                Sortable.create('Tasques', {tag: 'div', only: 'Tasca', ghosting:
true, format: /(.*)/, onUpdate: Ordenar});
                $$('.Tasca .Selector').each(function(element)
                {
                        Droppables.add(element.id, {accept: 'Tasca', onDrop: 
FerDepenent});
                });
        });
</script>

Some idea?

Thanks!

On 2 jul, 17:12, Garito <[EMAIL PROTECTED]> wrote:
> Hi!
> I have a sortable list
>
> Every item in this list has a droppable area
>
> In this area I could drop some elements of the same list
>
> Everything is ok except I need to stop the sortable event when I drop
> an item in the droppable area
>
> Is this possible?
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to