[web2py] Re: Expose class into a component

2015-02-13 Thread Anthony
If you specify the name of the target div for the component (e.g., LOAD(..., target='expose')), the JS would be something like this: jQuery('#expose a').click(function(e) { e.preventDefault(); $.web2py.component(this.href, 'expose'); }); Anthony On Friday, February 13, 2015 at 2:25:49 A

[web2py] Re: Expose class into a component

2015-02-12 Thread CrC Nommack
Anthony thank you very much for your answer. As Leonel's answer partially worked I will try it first before going with yours. Anyway thank you very much. Kind regards El jueves, 12 de febrero de 2015, 17:41:00 (UTC+1), Anthony escribió: > > For now you'll probably have to write some custom JS to

[web2py] Re: Expose class into a component

2015-02-12 Thread CrC Nommack
Thank you very much Leonel. It worked!! The only thing is that if I click on a picture it doesn't open as a picture but as raw data. Any idea? Thank you very much. Kind regards. El jueves, 12 de febrero de 2015, 17:38:31 (UTC+1), Leonel Câmara escribió: > > You could make the links in the loade

[web2py] Re: Expose class into a component

2015-02-12 Thread Anthony
For now you'll probably have to write some custom JS to catch link clicks and load the URL into the component div via Ajax. We could probably add an Ajax trap option to Expose to handle this automatically. Feel free to submit a github issue with this feature request. Anthony On Thursday, Febru

[web2py] Re: Expose class into a component

2015-02-12 Thread Leonel Câmara
You could make the links in the loaded component have a cid with the same id so they will load in the same place. I have never used Expose so this may not be entirely correct {{ related_html = DIV( H2(related_media.breadcrumbs(related_media.basename)), related_media.parag