Commit 03192ae8 authored by Ayush Tiwari's avatar Ayush Tiwari

ERP5Form: Add the list of javascript needed by the ReportBox Widget

parent 9b5c665d
...@@ -70,6 +70,19 @@ class ReportBoxWidget(Widget.Widget): ...@@ -70,6 +70,19 @@ class ReportBoxWidget(Widget.Widget):
if callable(report_method): if callable(report_method):
return report_method() return report_method()
def get_javascript_list(self, field, REQUEST=None):
"""
Returns list of javascript needed by the widget
"""
js_list = ['rsvp.js', 'renderjs.js', 'erp5_gadgetfield.js']
result = []
try:
for js_file in js_list:
result.append(field.restrictedTraverse(js_file).absolute_url())
except KeyError:
LOG('keyError:', ERROR, 'Error Value: %s' % js_file)
return []
return result
class ReportBoxValidator(Validator.Validator): class ReportBoxValidator(Validator.Validator):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment