[Dev-flock] hooked up add behavior.

Lucy Mendel lucy at thoughtandmemory.org
Thu Nov 29 13:53:19 EST 2007


yo,

my commit message failed because i included funny characters (i think).

i hooked up 'add behavior'. the process starts in behaviors.html, which
calls addDrop2-- this function renders the provided template in the provided
element id, with the provided parameter (currently, one can only provide a
single param called 'id').

in this case, we drop (insert) the behavior_add.html form.

onSubmit, this forms passes off the input values plus id (which in this case
is for the node that the behavior is being attached to) to
create_behavior(), which calls JSON and so on.

again, i haven't actually saved any data in the db... still holding off on
that until some docs pop up and/or i decided to dive in.

i'm now going to make a note of 'how to add forms' to the
ImplementationOverview wiki page.

i'm not exactly sure the form process is the best one-- should we use
onClick or onSubmit or $(foo).click(  ?  mainly, i wanted to show in the
html file what other html snippet was going to be dropped, hence making the
call to addDrop2 in the html file as opposed to in some javascript file. i
don't know much about the speed or efficiency tradeoffs i'm making, though.


good luck,
let me know if ya'll have questions,
l.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/dev-flock/attachments/20071129/c1f281c4/attachment.htm


More information about the Dev-flock mailing list