Ticket #2330 (closed defect: fixed)

Opened 9 months ago

Last modified 4 months ago

Toscawidgets addinhttp://toscawidgets.org/trac/tw/ticket/30g \ when using FlotWidget

Reported by: cd34 Assigned to:
Priority: normal Milestone: 2.1
Component: TurboGears Version: 2.0rc1
Severity: normal Keywords:
Cc: luke.macken@gmail.com

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

06/27/09 17:31:05 changed by lmacken

  • cc set to lmacken.

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?.

11/17/09 10:46:44 changed by jorge.vargas

  • cc changed from lmacken to luke.macken@gmail.com.
  • 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.

11/17/09 20:29:31 changed 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.