you dont need a grid... you can the id is that of the ones above plus 1 ...

This will not work properly due to ID's conflicting ....

Each time an element is dropped you will need to re-assign id's to each 
element...... something like this ...


<div id="container-1"> <!-- Droppable -->
<li>Item</li>
<li>Item</li>
<li>Item</li>
<li>Item</li>
<li>Item</li>
<li>Item</li>
</div>

onDrop: { // not sure of the syntax as its been a while!!
var i=1;
$$('.someclass').each(function(e) {
    var parent_id=$(e).up(1); // get the parent container
    $(e).id=parent_id+'_'+i; // gives the new id with using above example 
the id's of the Items would be "container-1_1", "container-1_2" and so on... 
then on the php end you can easily parse the id's with explode()/split() and 
force mysql t use those id's should you need to
i++;
});
}

If this is still not what you are looking for .. then please explain exactly 
what it is you are trying to do as the original question seems to be missing 
from this thread

Alex


----- Original Message ----- 
From: "WLQ" <[email protected]>
To: "Prototype & script.aculo.us" <[email protected]>
Sent: Friday, May 29, 2009 12:32 PM
Subject: [Proto-Scripty] Re: MySQL - order ID



What I can't understand Walter is why have we written 27 messages
about anything which is not related to the question. And have spend on
that nearly a month not getting even closer to the answer. See
misunderstanding lead us to write answers that we don't need.

But what I think now is: if we can't do that in scriptaculous or
prototype alone, maybe we can try to find some workaround. Like for
example some kind of javascript grid, or point tracker. I don't know,
just so we can say that if you drop an item on line 2, then ID must be
that, on line 4 then ID must be that. That's the only workaround I
think can be found. So maybe we should focus to find something like
that, instead of looking inside of scriptaculous, that does not do
such a thing?

On May 28, 7:25 pm, WLQ <[email protected]> wrote:
> Seems like it's too complicated to be done. lol
>
> On May 28, 6:58 pm, Walter Lee Davis <[email protected]> wrote:
>
> > A Sortable is a special case combination of a Draggable and a
> > Droppable. A Sortable may be dragged into another Sortable as long as
> > both lists include the other in their "containment" property. But
> > there is no equivalent to Draggable's revert in a Sortable.
>
> > In my work, I found that while you could drop a draggable onto a
> > sortable, you couldn't get the dropped element to join the sortable
> > explicitly. I took a run up this mountain a couple of months ago, and
> > the best I was able to do was to make a set of draggables, wrap the
> > sortable in a parent which I made droppable, and set revert to true on
> > those draggables. On a successful drop, I would generate a new
> > element, insert it into the sortable, re-initialize the sortable, and
> > then the user would need to drag the new element into position within
> > the list.
>
> > What WLQ would like (what I would like, too) is something more direct.
> > A set of draggable options that can be dragged into a sortable, revert
> > back to their parent, and leave a clone behind in the position within
> > the list where they were dropped. This is not possible as far as I've
> > been able to do it.
>
> > Getting the unique ID either from Prototype or MySQL is trivial, and
> > not really the actual problem here.
>
> > Walter
>
> > On May 28, 2009, at 12:11 PM, Alex McAuley wrote:
>
> > > Also .. isnt there ghosting or "revert" on droppables to make the
> > > elements
> > > go back into the container of which they were dragged from .... If
> > > so - this
> > > removes half of the problem .. the only problem left is ordering the
> > > second
> > > list which is done on dropend or whatever the syntax is ...



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to