SerenadeJS with x-Editable

38 views
Skip to first unread message

Sergey Makridenkov

unread,
May 24, 2013, 12:03:04 PM5/24/13
to seren...@googlegroups.com
Hello,

Could you please give me general idea how to integrate custom components in Serenade render and events process.

I would like use http://vitalets.github.io/x-editable/index.html for inline value editing.

But for initialize I must run 
    $('#username').editable();
where is best place to do it?

Second how to bind to events from xEditable?
xEditable raise success event, question is how to get access to Serenade active collection item on this event?

Thanks!

Jonas Nicklas

unread,
May 24, 2013, 2:30:52 PM5/24/13
to seren...@googlegroups.com
I would do all of these things from the controller. You can hook into the loaded callback or use on:load bindings in your view, this will give you access to the element you want to bind something to. Binding to events from xEditable I would do in the constructor of the controller.

Hope that gives you some insight.

/Jonas


--
You received this message because you are subscribed to the Google Groups "Serenade.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to serenadejs+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Sergey Makridenkov

unread,
May 27, 2013, 3:39:32 AM5/27/13
to seren...@googlegroups.com, jo...@elabs.se
on:load(element, model) - is great.

I can not find it in documentation on - http://serenadejs.org/
I think it should be there, may be even with example how to use third part component with Seredare.

All best,
Sergey

Jonas Nicklas

unread,
May 27, 2013, 8:25:06 AM5/27/13
to seren...@googlegroups.com
Good suggestion :) Doc patches are of course always welcome ;)

/Jonas
Reply all
Reply to author
Forward
0 new messages