[Infusion-users] Layout Reorderer: afterMoveCallbackUrl compatible afterMove function?

Chris Hubick chris at hubick.com
Sun Nov 22 11:40:43 UTC 2009

On Sat, 2009-11-21 at 21:37 -0700, Antranig Basman wrote:
> var myReorderer = fluid.reorderLayout("#my-container", {
>       selectors: {
> blah blah
>       afterMove: function () {
>          var model = myReorderer.layoutHandler.getModel();
>          $.ajax({ type: "POST", dataType: "application/json", url: 
> "/server/reorder_layout", data: JSON.stringify(model) });
>         }

Hey, that was just what I needed, thanks so much for the quick response!

Oh, and for the record, my code should have read contentType:
"application/json" :)

> Also, I believe since we fixed your *other* bug, 
> with the current release you can just supply the selector string 
> "#my-container" the first argument :P

Yep, yep, that works now too :)

> Thanks for bringing this unhappiness in the design of the Reorderer to 
> our attention - it was (re)written at a time when our general 
> understanding of how to do these things was not quite complete... we 
> will try to fix things up in the next release (or perhaps the one 
> following - we will have a lot of rewrites to do once our new IoC 
> framework is ready) so that it has a well-defined "model" sitting at 
> top-level inside its "that" like every decent component should.

I don't know where I implied I was unhappy with the design (though I'm
glad it's being actively maintained)... I just needed a little more
documentation for writing that handler.

Anyhow, Thanks Again! :)

Chris Hubick
mailto:chris at hubick.com

More information about the Infusion-users mailing list