Commit 364cf802 by Piotr Mitros

Studio hacks?

parent 186a4582
......@@ -70,7 +70,10 @@ class ConceptXBlock(XBlock):
return frag
def studio_view(self, context=None):
return Fragment(self.resource_string("static/html/studio_hack.html"))
frag = Fragment(self.resource_string("static/html/studio_hack.html"))
frag.add_javascript(pkg_resources.resource_string(__name__, "static/js/oa_server.js"))
frag.add_javascript(pkg_resources.resource_string(__name__, "static/js/oa_edit.js"))
return frag
# TO-DO: change this to create the scenarios you'd like to see in the
# workbench while developing your XBlock.
......
......@@ -47,3 +47,15 @@ PLACEHOLDER_FOR_CONCEPT_MAP
</div>
</div>
</div>
<!-- This is a hack.
//
// Studio doesn't handle JS fragments correctly (or hardly at all) as of 3/24/2014.
// Putting them here makes it happier. But not happy :(
-->
<!--script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"/>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"/>
<script src="http://pmitros.edx.org/pmitros/concept.js"/>
<script>
</script-->
{% load i18n %}
<div id="concept-edit">
<div id="openaddeddment-edit">
<script id="metadata-editor-tpl" type="text/template"><!-- empty --></script>
<textarea class="concept-editor"></textarea>
<input type="button" class="concept-save-button" value="{% trans 'Save' %}"/>
<input type="button" class="concept-cancel-button" value="{% trans 'Cancel' %}"/>
<textarea class="openaddeddment-editor"></textarea>
<input type="button" class="openaddeddment-save-button" value="Save"/>
<input type="button" class="openaddeddment-cancel-button" value="Cancel"/>
</div>
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