Commit dc4a23a9 by Sven Marnach

Fix status icon URLs and include icons in the repository.

parent 322a080a
......@@ -163,8 +163,15 @@ class ActiveTableXBlock(StudioEditableXBlockMixin, XBlock):
)
html = loader.render_template('templates/html/activetable.html', context)
css_context = dict(
correct_icon=self.runtime.local_resource_url(self, 'public/img/correct-icon.png'),
incorrect_icon=self.runtime.local_resource_url(self, 'public/img/incorrect-icon.png'),
unanswered_icon=self.runtime.local_resource_url(self, 'public/img/unanswered-icon.png'),
)
css = loader.render_template('templates/css/activetable.css', css_context)
frag = Fragment(html)
frag.add_css(loader.load_unicode('static/css/activetable.css'))
frag.add_css(css)
frag.add_javascript(loader.load_unicode('static/js/src/activetable.js'))
frag.initialize_js('ActiveTableXBlock', dict(
num_correct_answers=self.num_correct_answers,
......
......@@ -99,13 +99,13 @@
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
background: url("/static/images/unanswered-icon.png") center no-repeat;
background: url("{{ unanswered_icon }}") center no-repeat;
}
.activetable_block .status.correct {
background-image: url("/static/images/correct-icon.png");
background-image: url("{{ correct_icon }}");
}
.activetable_block .status.incorrect {
background-image: url("/static/images/incorrect-icon.png");
background-image: url("{{ incorrect_icon }}");
}
.activetable_block .status-message {
margin: 0.5em 0 1.5em;
......
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