Zotonic
Zotonic
zotonic@conference.zotonic.com
Monday, 6 August 2012< ^ >
arjan has set the subject to: Zotonic - the Erlang CMS
Room Configuration

GMT+2
[03:20:58] Ilya Rezvov leaves the room: Replaced by new connection
[03:21:00] Ilya Rezvov joins the room
[06:36:07] Ilya Rezvov leaves the room
[07:48:48] Ilya Rezvov joins the room
[08:48:06] arjan joins the room
[09:47:23] <Marc Worrell> @Ilya, yep we have to split some functions. Especially the rsc update function needs a chainsaw.
[09:47:49] <Marc Worrell> that one grew and grew and grew over time into the monster it is now
[09:48:28] <Ilya Rezvov> yes, i think about this function when write my message :)
[09:49:23] <Marc Worrell> :)
[09:50:13] <Marc Worrell> i want to split that stuff as well for some better access to the different ways you can update a rsc. and to accomodate for the elastic (zynamo) code
[12:24:40] <Ilya Rezvov> can i bind wire action to selector?
[12:24:51] <Ilya Rezvov> not by id
[12:29:50] kaos joins the room
[12:31:47] <arjan> Ilya Rezvov: not sure, I think so
[12:32:17] <Ilya Rezvov> i need add "Add to card" button
[12:32:22] <Ilya Rezvov> to products list
[12:32:40] <Ilya Rezvov> how i can make this thing?
[12:33:03] <Ilya Rezvov> id can be only string literal
[12:33:16] <Ilya Rezvov> it is strange
[12:33:32] <arjan> you can use generated ids for that
[12:33:53] <arjan> say you have a loop, for id in ids
[12:34:18] <arjan> then you can get a generated id like this: {{ #someprefix.id }}
[12:34:31] <arjan> that generated id will be different in each iteration
[12:34:42] <arjan> in a wire you can use id=#someprefix.id
[12:34:57] <Ilya Rezvov> i try it
[12:34:57] <arjan> makes sense?
[12:35:12] <Ilya Rezvov> but i take identity id
[12:35:18] <Ilya Rezvov> on each loop iteration
[12:35:42] <Ilya Rezvov> someprefix can be variable?
[12:36:16] <arjan> no the ".id" part is the variable
[12:36:27] <arjan> when foo is your variable
[12:36:39] <arjan> #blabla.foo is a unique id based on foo and a prefix
[12:37:42] <Ilya Rezvov> ok, i will try it
[12:37:43] <Ilya Rezvov> thx
[12:38:06] <kaos> You can look at some usage of it in this template: https://github.com/kaos/trackz/blob/master/templates/_project_column.tpl
[12:38:44] <arjan> kaos: thanks, I was also looking for an example
[12:38:45] <arjan> :)
[12:38:52] <kaos> look for instance for the expand and collapse items, and the corresponding wire's for thos at the end
[12:39:08] <kaos> :)
[12:39:44] <Ilya Rezvov> it really work, amazing :)
[12:40:15] <Ilya Rezvov> it will be usefull in documentation :)
[12:40:35] <Ilya Rezvov> in "wire" description
[12:42:14] <kaos> I think it is mentioned in the docs... but pretty hard to find...
[12:42:39] <arjan> its not really related to wire
[12:43:00] <arjan> can't find it in the docs indeed
[12:43:05] <kaos> it's also mentioned in this cookbook: http://zotonic.com/documentation/857/updating-form-field-from-a-dialog
[12:43:54] <Ilya Rezvov> hm, maybe need related links?
[12:44:24] <Ilya Rezvov> coz when i need in it things when i use wire
[12:44:38] <Ilya Rezvov> or some action
[12:45:08] <Ilya Rezvov> but i release actions in JS
[12:50:43] <kaos> hmm.. ok, found the edoc for the module responsible... http://zotonic.com/edoc/core/z_ids.html
[12:55:12] <kaos> OK, it came up in the exmaple for the wire-args scomp.
[12:55:37] <kaos> example*
[12:55:52] <kaos> It could definitely have its own page.
[13:08:35] <arjan> true
[16:11:24] <Marc Worrell> actually there is a trick to wire to a selector: prefix the id with a space and then the code assumes it is a selector and not an id.
[16:11:53] <Marc Worrell> internally it is handled as a tuple, but you can't write such a tuple in the html
[16:12:11] <Marc Worrell> we should make a better way of defining a selector
[16:12:43] <Marc Worrell> when you receive the event then you can check the trigger to see where the event was triggered.
[16:58:19] <Ilya Rezvov> i think it not needed abstraction layer
[16:58:46] <Ilya Rezvov> why dont accept bind to jquery selectors?
[17:16:41] Ilya Rezvov leaves the room
[18:21:33] arjan leaves the room
[18:33:54] <Marc Worrell> actually, that might be there. I now remember the 'selector' argument that Maas added at some time. Check that one out.
[19:09:30] arjan joins the room
[19:16:48] arjan leaves the room
[19:36:39] Ilya Rezvov joins the room
[19:37:06] Ilya Rezvov leaves the room
[20:01:46] Ilya Rezvov joins the room
[20:36:32] arjan joins the room
[20:50:56] <Ilya Rezvov> no, wire has only 1 not documented property "propagate"
[21:06:32] arjan leaves the room
[21:09:41] arjan joins the room
[21:19:01] kaos leaves the room
Powered by ejabberd Powered by Erlang Valid XHTML 1.0 Transitional Valid CSS!