#2330: Toscawidgets adding \ when using FlotWidget
------------------------+---------------------------------------------------
Reporter: cd34 | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: TurboGears | Version: 2.0rc1
Severity: normal | Keywords:
------------------------+---------------------------------------------------
Python 2.5
Debian Testing
TurboGears2-2.0-py2.5.egg
tw.jquery-0.9.4.4-py2.5.egg
ToscaWidgets-0.9.6-py2.5.egg
Also mentioned in:
http://groups.google.com/group/turbogears-
trunk/browse_thread/thread/7c55d7ccd4b03a65
The generated HTML from TurboFlot results in:
{{{
<div id="flot_140" style="width:600px;height:300px;">
<div id="flotLabel">
</div>
</div>
}}}
{{{
<script type="text/javascript">
$.plot($(\"#flot_140\"), [{"lines": {"fill": "true", "show": "true"},
"data": [[0, 3], [4, 8], [8, 5], [9, 13]]}, {"grid": {"backgroundColor":
"#fffaff"}}], null)
</script>
}}}
if the code is written to a static file, and (\"#flot_140\") changed to
("#flot_140"), the graph does appear.
If ToscaWidgets-0.9.6-py2.5.egg/tw/core/js.py is modified to change
{{{
def __get_js_repr(self):
if self.__called:
args = self.__args
return '%s(%s)' % (self.__name, ', '.join(imap(encode, args)))
else:
return self.__name
}}}
to
{{{
def __get_js_repr(self):
if self.__called:
args = self.__args
return '%s(%s)' % (self.__name, ', '.join(imap(encode,
args)).replace('\\',''))
else:
return self.__name
}}}
then TurboFlot is able to generate a graph.
--
Ticket URL: <http://trac.turbogears.org/ticket/2330>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---