Ticket #2330 (closed defect: fixed)
Toscawidgets addinhttp://toscawidgets.org/trac/tw/ticket/30g \ when using FlotWidget
| Reported by: | cd34 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1rc1 |
| Component: | TurboGears | Version: | 2.0rc1 |
| Severity: | normal | Keywords: | |
| Cc: | luke.macken@… |
Description
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.
Change History
comment:2 Changed 2 years ago by jorge.vargas
- Cc luke.macken@… added; lmacken removed
- Milestone set to 2.1
I believe since this lmacken took ownership of this project. And is now the maintainer so I cc him to see if this bug is fixed.
comment:3 Changed 2 years ago by lmacken
- Status changed from new to closed
- Resolution set to fixed
- Summary changed from Toscawidgets adding \ when using FlotWidget to Toscawidgets addinhttp://toscawidgets.org/trac/tw/ticket/30g \ when using FlotWidget
This should be fixed in ToscaWidgets? 0.9.8 ( http://toscawidgets.org/trac/tw/ticket/30)
I also noticed this regression, and have since forked the FlotWidget? in various places to hack around it. It would be very nice if this issue was resolved properly in ToscaWidgets?.