Commit bc288424 by Kyle Fiedler

Rework styles for test results and style file upload

parent 3be48e50
<section id="filesubmission_${id}" class="filesubmission"> <section id="filesubmission_${id}" class="filesubmission">
<input type="file" name="input_${id}" id="input_${id}" value="${value}" multiple="multiple" data-required_files="${required_files}" data-allowed_files="${allowed_files}"/><br /> <div class="grader-status file">
% if state == 'unsubmitted': % if state == 'unsubmitted':
<span class="unanswered" style="display:inline-block;" id="status_${id}"></span> <span class="unanswered" style="display:inline-block;" id="status_${id}">Unanswered</span>
% elif state == 'correct': % elif state == 'correct':
<span class="correct" id="status_${id}"></span> <span class="correct" id="status_${id}">Correct</span>
% elif state == 'incorrect': % elif state == 'incorrect':
<span class="incorrect" id="status_${id}"></span> <span class="incorrect" id="status_${id}">Incorrect</span>
% elif state == 'queued': % elif state == 'queued':
<span class="processing" id="status_${id}"></span> <span class="processing" id="status_${id}">Queued</span>
<span style="display:none;" class="xqueue" id="${id}" >${queue_len}</span> <span style="display:none;" class="xqueue" id="${id}" >${queue_len}</span>
% endif % endif
<span style="display:none;" class="debug">(${state})</span> <p class="debug">${state}</p>
<br/>
<span class="message">${msg|n}</span> <input type="file" name="input_${id}" id="input_${id}" value="${value}" multiple="multiple" data-required_files="${required_files}" data-allowed_files="${allowed_files}"/>
<br/> </div>
<div class="message">${msg|n}</div>
</section> </section>
...@@ -195,9 +195,31 @@ section.problem { ...@@ -195,9 +195,31 @@ section.problem {
margin-bottom: 0; margin-bottom: 0;
float: left; float: left;
} }
&.file {
background: #FFF;
margin-top: 20px;
padding: 20px 0 0 0;
border: {
top: 1px solid #eee;
right: 0;
bottom: 0;
left: 0;
}
p.debug {
display: none;
}
input {
float: left;
}
}
} }
} }
ul { ul {
list-style: disc outside none; list-style: disc outside none;
margin-bottom: lh(); margin-bottom: lh();
...@@ -408,18 +430,27 @@ section.problem { ...@@ -408,18 +430,27 @@ section.problem {
} }
.test { .test {
border-top: 1px solid #aaa;
padding-top: 18px; padding-top: 18px;
header { header {
margin-bottom: 12px; margin-bottom: 12px;
h3 {
font-size: 0.9em;
font-weight: bold;
font-style: normal;
text-transform: uppercase;
color: #AAA;
}
} }
.shortform, .longform { .longform, .shortform {
border: 1px solid #d3d3d3; border: 1px solid #ddd;
padding: 9px; padding: 9px;
margin-bottom: 12px; margin-bottom: 10px;
@include box-shadow(inset 0 0 0 1px #f3f3f3); background: #FFF;
@include box-shadow(inset 0 0 0 1px #eee);
@include border-radius(3px);
p:last-of-type { p:last-of-type {
margin-bottom: 0; margin-bottom: 0;
...@@ -427,7 +458,7 @@ section.problem { ...@@ -427,7 +458,7 @@ section.problem {
} }
a.full { a.full {
@include position(absolute, 0 0 0px 0px); @include position(absolute, 0 0 1px 0px);
font-size: .8em; font-size: .8em;
padding: 4px; padding: 4px;
text-align: right; text-align: right;
...@@ -443,7 +474,7 @@ section.problem { ...@@ -443,7 +474,7 @@ section.problem {
} }
.longform-header { .longform-header {
margin-bottom: lh(); margin-bottom: .6em;
} }
} }
} }
...@@ -264,7 +264,7 @@ class @Problem ...@@ -264,7 +264,7 @@ class @Problem
alert_elem = "<div class='capa_alert'>" + msg + "</div>" alert_elem = "<div class='capa_alert'>" + msg + "</div>"
@el.find('.action').after(alert_elem) @el.find('.action').after(alert_elem)
@el.find('.capa_alert').animate(opacity: 0, 500).animate(opacity: 1, 500) @el.find('.capa_alert').animate(opacity: 0, 500).animate(opacity: 1, 500)
save: => save: =>
Logger.log 'problem_save', @answers Logger.log 'problem_save', @answers
$.postWithPrefix "#{@url}/problem_save", @answers, (response) => $.postWithPrefix "#{@url}/problem_save", @answers, (response) =>
......
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