Commit 6758d19b by Alan Boudreault

Removed submit checkmark icon

parent 9a8c20db
......@@ -89,7 +89,6 @@ class MentoringBlock(XBlockWithLightChildren):
fragment.add_javascript_url(
self.runtime.local_resource_url(self, 'public/js/vendor/underscore-min.js'))
fragment.add_javascript_url(self.runtime.local_resource_url(self, 'public/js/mentoring.js'))
fragment.add_resource(load_resource('templates/html/mentoring_progress.html'), "text/html")
fragment.add_resource(load_resource('templates/html/mentoring_attempts.html'), "text/html")
fragment.initialize_js('MentoringBlock')
......
......@@ -49,19 +49,6 @@
margin-top: 20px;
}
.mentoring .progress .indicator {
display: inline-block;
vertical-align: middle;
}
.mentoring .progress .indicator .checkmark-correct {
color: #006600;
}
.mentoring .progress .indicator .checkmark-incorrect {
color: #ff0000;
}
.mentoring .attempts {
margin-top: 20px;
display: inline-block;
......
function MentoringBlock(runtime, element) {
var progressTemplate = _.template($('#xblock-progress-template').html());
var attemptsTemplate = _.template($('#xblock-attempts-template').html());
var children; // Keep track of children. A Child need a single object scope for its data.
function renderProgress() {
var data = $('.progress', element).data();
$('.indicator', element).html(progressTemplate(data));
}
function renderAttempts() {
var data = $('.attempts', element).data();
$('.attempts', element).html(attemptsTemplate(data));
......@@ -45,10 +39,6 @@ function MentoringBlock(runtime, element) {
callIfExists(child, 'handleSubmit', result, options);
});
$('.progress', element).data('completed', results.completed ? 'True' : 'False');
$('.progress', element).data('attempted', results.attempted ? 'True' : 'False');
renderProgress();
$('.attempts', element).data('max_attempts', results.max_attempts);
$('.attempts', element).data('num_attempts', results.num_attempts);
renderAttempts();
......@@ -120,10 +110,6 @@ function MentoringBlock(runtime, element) {
});
if (submit_dom.length) {
renderProgress();
}
renderAttempts();
renderDependency();
......
......@@ -10,9 +10,6 @@
<div class="attempts" data-max_attempts="{{ self.max_attempts }}" data-num_attempts="{{ self.num_attempts }}"></div>
<div class="submit">
<input type="button" class="input-main" value="Submit"></input>
<span class="progress" data-completed="{{ self.completed }}" data-attempted="{{ self.attempted }}">
<span class='indicator'></span>
</span>
</div>
{% endif %}
<div class="messages"></div>
......
<script type="text/template" id="xblock-progress-template">
<% if (completed === "True") {{ %>
<i class="icon-ok icon-2x checkmark-correct"></i>
<% }} else if (attempted === "True") {{ %>
<i class="icon-exclamation icon-2x checkmark-incorrect"></i>
<% }} %>
</script>
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