Reorderer Notes

Good questions. Comments below.

On 16-Jul-08, at 4:13 PM, Sobieralski, Damian Michael wrote:

> > Hopefully this is the correct list for my question. I only saw the
> > one mailing list so if this isn't correct one could you point me to
> > the correct one.

fluid-talk is a good list to post user questions to. But we do read
them all, so it doesn't really matter which one you pick. (smile)

> > I'm trying to get the reorderer to work for my project. I notcie
> > on this page:
> >
> > http://wiki.fluidproject.org/display/fluid/Reorderer+Integration+Tutorial+-+v0.3

Cool! I'm glad to hear you're trying out the Reorderer.

Just before the 0.3 release, we did some work to add new, simpler
functions for instantiating the Reorderer. As a result, that tutorial
is a bit out of date. It shows the more complex way to set it up.

Both ways work, but you'll probably be interested in using the new
API. Check out the Reorderer API documentation for more details:

http://wiki.fluidproject.org/display/fluid/Reorderer+API+-+v0.3

> > it talks about css for interesting events (like hover, etc). Well,
> > in my page I need to run some Javascript at some "interesting
> > moments". Specifically, when dropped as possible when lifted. Is
> > there a way to fire off JS functions during these moments?

Sort of. At the moment, the Reorderer will call you back when an
element is dropped if you specify an orderChangedCallback function.
There is a tutorial describing how you can use this callback to
communicate changes to the server here:

http://wiki.fluidproject.org/display/fluid/Order-Changed+Callback+-+v0.3

This callback is currently a no-arg function, so it only informs you
that a drop occurred. You'll need to look through the DOM to determine
the new order of the elements and POST it back to the server. A couple
of examples are shown in the tutorial.

This is really just a bare-minimum API, and I'd like to improve it.
The orderChangedCallback should probably pass more informative
arguments to your code, and it would be great to have additional
callbacks for other interesting moments, including grab and hover. To
this end, I've filed a bug in our JIRA tracker about this issue.
Please feel free to add to it.

http://issues.fluidproject.org/browse/FLUID-928

Thanks for pointing this issue out. I'm interested to hear how you're
using the Reorderer, and what sorts of behaviour you're planning to
add using these callbacks. Any insights into usage will be hugely
valuable when we rework the APIs.

Colin

—
Colin Clark
Technical Lead, Fluid Project
Adaptive Technology Resource Centre, University of Toronto http://fluidproject.org