Reorderer component in v 0.3

Sobieralski, Damian Michael dsobiera at indiana.edu
Thu Jul 24 18:37:08 UTC 2008


Colin,

> 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.

 I got the callback to work on drop. YAY!

 The issue I have now is follows:

My DOM looks something like this:

<div class="orderable_container">
  <div class="decoration_div"></div>
  <div class="orderable_item"></div>
  <div class="decoration_div"></div>
  <div class="orderable_item"></div>
  <div class="decoration_div"></div>
</div>

 The decoration_div actually has some functionally so it's not really a decoration div but let's keep it this way for this example for simple illustration.  So basically any orderable_item has a decoration div before and after it.  So when we pick up the orderable widget, we need to remove the decoration widgets that once surrounded it "intelligently". And, of course, when dropped we need to see what (if any) decoration divs need to exist in the just reordered orderable_item's new home.

  A pickup callback would allow me to quicky see who the orderable div's neighbor's are and zap them before I am moved around in the DOM.

  I CAN after drop traverse the DOM looking for irregular decoration divs'....but we have so much JS now that our client stuff is getting pretty slow as is. We have large pages and adding a full traversal of orderable_container to clean up the decoration divs would be very time costly for us.

 Any ideas what we could do to be able to find an orderable_item's neighbors when we pick it up via Fluid's reorderer?

 Thanks, in advance, for any help that you can offer.

- Damian




More information about the fluid-talk mailing list