Commit ec6b1a12 by Chris Dodge

insert the xmodule.coffee dependency into HTMLSnippet().get_javascript(). This…

insert the xmodule.coffee dependency into HTMLSnippet().get_javascript(). This allows us a single point to define this dependency.
parent 650f5377
...@@ -107,7 +107,20 @@ class HTMLSnippet(object): ...@@ -107,7 +107,20 @@ class HTMLSnippet(object):
All of these will be loaded onto the page in the CMS All of these will be loaded onto the page in the CMS
""" """
return cls.js # cdodge: We've moved the xmodule.coffee script from an outside directory into the xmodule area of common
# this means we need to make sure that all xmodules include this dependency which had been previously implicitly
# fulfilled in a different area of code
js = cls.js
if js is None:
js = {}
if 'coffee' not in js:
js['coffee'] = []
js['coffee'].append(resource_string(__name__, 'js/src/xmodule.coffee'))
return js
@classmethod @classmethod
def get_css(cls): def get_css(cls):
......
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