Commit d6f794c4 by Vasyl Nakvasiuk

gst module: add configuration and render properties

parent 57bc010a
......@@ -92,6 +92,16 @@ class GraphicalSliderToolModule(GraphicalSliderToolFields, XModule):
css = {'scss': [resource_string(__name__, 'css/gst/display.scss')]}
js_module_name = "GraphicalSliderTool"
@property
def configuration(self):
return stringify_children(
html.fromstring(self.data).xpath('configuration')[0])
@property
def render(self):
return stringify_children(
html.fromstring(self.data).xpath('render')[0])
def get_html(self):
""" Renders parameters to template. """
......@@ -99,12 +109,6 @@ class GraphicalSliderToolModule(GraphicalSliderToolFields, XModule):
self.html_id = self.location.html_id()
self.html_class = self.location.category
self.configuration = html.fromstring(self.data).xpath('configuration')[0]
self.configuration = stringify_children(self.configuration)
self.render = html.fromstring(self.data).xpath('render')[0]
self.render = stringify_children(self.render)
self.configuration_json = self.build_configuration_json()
params = {
'gst_html': self.substitute_controls(self.render),
......
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