[web2py] Re: scripting components

2010-08-13 Thread mdipierro
yes On Aug 13, 10:33 am, Miguel Lopes wrote: > I wonder if this would also work with block templates -  supposing block > templates are integrated before the header is set. > > I remember recently reading about block templates. Have this been integrated > in the reference distribution? > > Thank

Re: [web2py] Re: scripting components

2010-08-13 Thread Miguel Lopes
I wonder if this would also work with block templates - supposing block templates are integrated before the header is set. I remember recently reading about block templates. Have this been integrated in the reference distribution? Thank you so much for all the great help. Miguel On Fri, Aug 13,

[web2py] Re: scripting components

2010-08-13 Thread mdipierro
It would be the use of components in plugin_wiki/page pages `` name: oppty_contacts ``:widget in this case you do not need to worry about response.fields.append() because the plugin is rendered before it is embedded in view. On Aug 13, 10:01 am, Miguel Lopes wrote: > Yes your explanation m

Re: [web2py] Re: scripting components

2010-08-13 Thread Miguel Lopes
Yes your explanation makes perfect sense, and that solves my encapsulation problem. Thank you. You mention normal web2py controllers and views, what would the other kind be? Miguel On Fri, Aug 13, 2010 at 1:19 PM, mdipierro wrote: > > 2) You can include a js in a component > > def oppty_contact

[web2py] Re: scripting components

2010-08-13 Thread David Marko
http://web2pyslices.com/main/slices/take_slice/8 On 13 srp, 13:54, Miguel Lopes wrote: > In order to include scripting in a very dynamic component I'm appending a js > file to the response files of every template that uses the component, such > as: > > {{response.files.append(URL(request.applicat

[web2py] Re: scripting components

2010-08-13 Thread mdipierro
A few comments/suggestions 1) instead of response.headers['web2py-component-command']="$ ('#show_assoc_contact').click(function(event){...);" you can do response.js="jQuery('#show_assoc_contact').click(function(event) {...);" Use jQuery instead of '$' since '$" may conflict with non-jquery