Hi,
>
> http://paste.turbogears.org/paste/39329
>
With further investigation and editing the output of the rendered
template as a static page and trying to get that to work...
It seems that tw.core.js is escaping the id of the widget and this is
breaking tw.jquery.FlotWidget
Here is a snippet from tw.core.js that shows the escaping behaviour of
the id selector as per the paste above.
class TWEncoder(simplejson.encoder.JSONEncoder):
"""A JSON encoder that can encode Widgets, js_calls, js_symbols and
js_callbacks.
Example::
>>> encode = TWEncoder().encode
>>> print encode({'onLoad':
js_function("do_something")(js_symbol("this"))})
{"onLoad": do_something(this)}
>>> from tw.api import Widget
>>> w = Widget("foo")
>>> args = {'onLoad':
js_callback(js_function('jQuery')(w).click(js_symbol('onClick')))}
>>> print encode(args)
{"onLoad": function(){jQuery(\\"foo\\").click(onClick)}}
>>> print encode({'args':args})
{"args": {"onLoad": function(){jQuery(\\"foo\\").click(onClick)}}}
Although I now know what the problem is, I haven't a clue where to
begin to fix it...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---