Yaakov Nemoy schrieb:
> I would like to post a bug report over the following.
> 
> When a widget is rendered via a Kid template, normally the correct
> javascript headers are included at the top of the HTML/XHTML output,
> such that the widget works correctly.  When HTML or XHTML snippets are
> given as output to an ajax call, however, the javascript headers are
> not included, and any widgets rendered via such a call do not work
> correctly.

Inclusion of JS and CSS files and snippets is done by the site template
(from which your "master.kid" extends):

http://trac.turbogears.org/browser/branches/1.0/turbogears/view/templates/sitetemplate.kid

Widgets need to be included in the dictionary returned by the controller
method that renders the template for the inclusion of JS/CSS to work.

When you return HTML in a response to an AJAX call, there either is no
template (i.e. you return JSON) or the template has no or a different
master template and does not include sitetemplate.kid, therefore JS/CSS
inclusion does not happen.

> Examples will be forthcoming, however, I don't even see an option to
> attach files here.  Where can I post this bug report to formally?

Bugs can be reported in the trac ticket system:

http://trac.turbogears.org/newticket

You need a trac account to create new tickets.

> In detail.  or rather, what my case is, I am creating links using the
> RemoteLink widget found on the TG wiki, to have links load random
> XHTML code into DIV tags specified on the Kid template.  The random
> XHTML code is mainly the output from rendering more kid pages,

Possible solutions:

a) Make those snippet templates extend "sitetemplate.kid"
b) Put the necessary code for JS/CSS inclusion from "sitetemplate.kid"
into those snippet templates or in another base template and make the
snippet templates extend this.


HTH, Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to