Merged heads
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
%>
|
||||
|
||||
<%block name="headextra">
|
||||
<script type="text/javascript" src="${ settings.LIB_URL }flot/jquery.flot.min.js"></script>
|
||||
<script type="text/javascript" src="${ settings.LIB_URL }flot/jquery.flot.stack.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="${ settings.LIB_URL }flot/jquery.flot.symbol.js"></script>
|
||||
<script type="text/javascript" src="/static/js/flot/jquery.flot.js"></script>
|
||||
<script type="text/javascript" src="/static/js/flot/jquery.flot.stack.js"></script>
|
||||
<script type="text/javascript" src="/static/js/flot/jquery.flot.symbol.js"></script>
|
||||
<script>
|
||||
<%include file="profile_graphs.js"/>
|
||||
</script>
|
||||
|
||||
@@ -16,7 +16,7 @@ $(function () {
|
||||
}).appendTo("body").fadeIn(200);
|
||||
}
|
||||
|
||||
/* -------------------------------- Grade detail graph -------------------------------- */
|
||||
/* -------------------------------- Grade detail bars -------------------------------- */
|
||||
var colors = [$.color.parse("#E8B800"), $.color.parse("#A0CEFA"), $.color.parse("#BD3738"), $.color.parse("#429A2E")];
|
||||
//var colors = [$.color.parse("#1B2045"), $.color.parse("#557a00"), $.color.parse("#F5600"), $.color.parse("#FEBA2C")];
|
||||
//var colors = [$.color.parse("#E7C856"), $.color.parse("#CD462E"), $.color.parse("#B01732"), $.color.parse("#41192A")];
|
||||
@@ -42,7 +42,7 @@ $(function () {
|
||||
data: ${ json.dumps( [[i + tickIndex, score['percentage']] for i,score in enumerate(section['subscores'])] ) },
|
||||
color: colors[${sectionIndex}].toString(),
|
||||
});
|
||||
ticks = ticks.concat( ${ json.dumps( [[i + tickIndex, str(i + 1)] for i,score in enumerate(section['subscores'])] ) } );
|
||||
ticks = ticks.concat( ${ json.dumps( [[i + tickIndex, score['label'] ] for i,score in enumerate(section['subscores'])] ) } );
|
||||
bottomTicks.push( [ ${tickIndex + len(section['subscores'])/2}, "${section['category']}" ] );
|
||||
detail_tooltips["${section['category']}"] = ${ json.dumps([score['summary'] for score in section['subscores']] ) };
|
||||
|
||||
@@ -57,8 +57,8 @@ $(function () {
|
||||
data: [[${tickIndex}, ${section['totalscore']['score']}]],
|
||||
color: colors[${sectionIndex}].toString(),
|
||||
});
|
||||
ticks = ticks.concat( [ [${tickIndex}, "Total"] ] );
|
||||
detail_tooltips["${section['category']} Total"] = [ "${section['totalscore']['summary']}" ];
|
||||
ticks = ticks.concat( [ [${tickIndex}, "${section['totallabel']}"] ] );
|
||||
detail_tooltips["${section['category']} Average"] = [ "${section['totalscore']['summary']}" ];
|
||||
<% tickIndex += 1 + sectionSpacer %>
|
||||
|
||||
%else: ##This is for sections like midterm or final, which have no smaller components
|
||||
@@ -66,12 +66,8 @@ $(function () {
|
||||
data: [[${tickIndex}, ${section['totalscore']['score']}]],
|
||||
color: colors[${sectionIndex}].toString(),
|
||||
});
|
||||
%if section['category'] == "Midterm":
|
||||
bottomTicks = bottomTicks.concat( [ [${tickIndex}, "${section['category']}"] ] );
|
||||
%else:
|
||||
ticks = ticks.concat( [ [${tickIndex}, "${section['category']}"] ] );
|
||||
%endif
|
||||
|
||||
ticks = ticks.concat( [ [${tickIndex}," ${section['totallabel']}"] ] );
|
||||
|
||||
detail_tooltips["${section['category']}"] = [ "${section['totalscore']['summary']}" ];
|
||||
|
||||
<% tickIndex += 1 + sectionSpacer %>
|
||||
@@ -80,13 +76,45 @@ $(function () {
|
||||
%endfor
|
||||
|
||||
//Alwasy be sure that one series has the xaxis set to 2, or the second xaxis labels won't show up
|
||||
series.push( {label: 'Dropped Scores', data: droppedScores, points: {symbol: "cross", show: true, radius: 3}, bars: {show: false}, color: "red", xaxis: 2} );
|
||||
series.push( {label: 'Dropped Scores', data: droppedScores, points: {symbol: "cross", show: true, radius: 3}, bars: {show: false}, color: "red"} );
|
||||
|
||||
|
||||
/* ----------------------------- Grade overviewew bar -------------------------*/
|
||||
<%
|
||||
totalWeight = 0.0
|
||||
sectionIndex = 0
|
||||
totalScore = 0.0
|
||||
overviewBarX = tickIndex
|
||||
%>
|
||||
%for section in grade_summary:
|
||||
<%
|
||||
weighted_score = section['totalscore']['score'] * section['weight']
|
||||
summary_text = "{0} - {1:.1%} of a possible {2:.0%}".format(section['category'], weighted_score, section['weight'])
|
||||
%>
|
||||
%if section['totalscore']['score'] > 0:
|
||||
series.push({label: "${section['category']} - Weighted",
|
||||
data: [[${overviewBarX}, ${weighted_score}]],
|
||||
color: colors[${sectionIndex}].toString(),
|
||||
});
|
||||
%endif
|
||||
|
||||
detail_tooltips["${section['category']} - Weighted"] = [ "${summary_text}" ];
|
||||
<%
|
||||
sectionIndex += 1
|
||||
totalWeight += section['weight']
|
||||
totalScore += section['totalscore']['score'] * section['weight']
|
||||
%>
|
||||
%endfor
|
||||
ticks = ticks.concat( [ [${overviewBarX}, "Total"] ] );
|
||||
|
||||
<% tickIndex += 1 + sectionSpacer %>
|
||||
|
||||
|
||||
var options = {
|
||||
series: {lines: {show: false, steps: false },
|
||||
bars: {show: true, barWidth: 0.6, align: 'center', lineWidth: 1},},
|
||||
xaxis: {tickLength: 0, min: 0.0, max: ${tickIndex - sectionSpacer}},
|
||||
xaxes: [{ticks: ticks}, {ticks: bottomTicks}],
|
||||
series: {stack: true,
|
||||
lines: {show: false, steps: false },
|
||||
bars: {show: true, barWidth: 0.6, align: 'center', lineWidth: 1},},
|
||||
xaxis: {tickLength: 0, min: 0.0, max: ${tickIndex - sectionSpacer}, ticks: ticks, labelAngle: 90},
|
||||
yaxis: {ticks: [[1, "100%"], [0.87, "A 87%"], [0.7, "B 70%"], [0.6, "C 60%"], [0, "0%"]], min: 0.0, max: 1.0, labelWidth: 50},
|
||||
grid: { hoverable: true, clickable: true, borderWidth: 1,
|
||||
markings: [ {yaxis: {from: 0.87, to: 1 }, color: "#EBFFD5"}, {yaxis: {from: 0.7, to: 0.87 }, color: "#E6FFFF"},
|
||||
@@ -94,17 +122,42 @@ $(function () {
|
||||
legend: {show: false},
|
||||
};
|
||||
|
||||
if ($("#grade-detail-graph").length > 0) {
|
||||
$.plot($("#grade-detail-graph"), series, options);
|
||||
var $grade_detail_graph = $("#grade-detail-graph");
|
||||
if ($grade_detail_graph.length > 0) {
|
||||
var plot = $.plot($grade_detail_graph, series, options);
|
||||
|
||||
var o = plot.pointOffset({x: ${overviewBarX} , y: ${totalScore}});
|
||||
$grade_detail_graph.append('<div style="position:absolute;left:' + (o.left - 12) + 'px;top:' + (o.top - 20) + 'px">${"{:.0%}".format(totalScore)}</div>');
|
||||
|
||||
// //Rotate the x-axis labels
|
||||
// var rotateValue = "rotate(-60deg)";
|
||||
// var rotateOrigin = "bottom left";
|
||||
// $("#grade-detail-graph .x1Axis .tickLabel").css( {
|
||||
// '-webkit-transform': rotateValue,
|
||||
// '-moz-transform': rotateValue,
|
||||
// '-ms-transform': rotateValue,
|
||||
// '-o-transform': rotateValue,
|
||||
// 'transform': rotateValue,
|
||||
//
|
||||
// '-webkit-transform-origin': rotateOrigin,
|
||||
// '-moz-transform-origin': rotateOrigin,
|
||||
// '-ms-transform-origin': rotateOrigin,
|
||||
// '-o-transform-origin': rotateOrigin,
|
||||
//
|
||||
// 'text-align' : 'left',
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var previousPoint = null;
|
||||
$("#grade-detail-graph").bind("plothover", function (event, pos, item) {
|
||||
$("#x").text(pos.x.toFixed(2));
|
||||
$("#y").text(pos.y.toFixed(2));
|
||||
if (item) {
|
||||
if (previousPoint != item.dataIndex) {
|
||||
previousPoint = item.dataIndex;
|
||||
if (previousPoint != (item.dataIndex, item.seriesIndex)) {
|
||||
previousPoint = (item.dataIndex, item.seriesIndex);
|
||||
|
||||
$("#tooltip").remove();
|
||||
|
||||
|
||||
@@ -1,16 +1,36 @@
|
||||
div.answer-controls {
|
||||
@include box-sizing(border-box);
|
||||
@extend div.question-controls;
|
||||
display: inline-block;
|
||||
margin: 20px 0;
|
||||
margin: 0 0 15px;
|
||||
padding-left: flex-grid(1.1);
|
||||
|
||||
div.answer-sort {
|
||||
@extend div.question-sort;
|
||||
}
|
||||
width: 100%;
|
||||
|
||||
div.answer-count {
|
||||
@extend div.question-count;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.answer-sort {
|
||||
float: right;
|
||||
margin-left: flex-gutter();
|
||||
|
||||
nav {
|
||||
@extend .action-link;
|
||||
float: right;
|
||||
margin-top: 25px;
|
||||
|
||||
a {
|
||||
&.on span{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: '|';
|
||||
color: darken(#F6EFD4, 10%);
|
||||
font-size: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +64,10 @@ div.answer-block {
|
||||
}
|
||||
|
||||
div.answered-by-owner {
|
||||
color: $mit-red;
|
||||
p {
|
||||
font-style: italic;
|
||||
color: #656565;
|
||||
}
|
||||
|
||||
div.comments-container {
|
||||
color: #555;
|
||||
@@ -52,6 +75,34 @@ div.answer-block {
|
||||
}
|
||||
}
|
||||
|
||||
div.paginator {
|
||||
@extend div.answer-block;
|
||||
text-align: center;
|
||||
padding: 20px 0;
|
||||
|
||||
span {
|
||||
@include border-radius(3px);
|
||||
background: #eee;
|
||||
margin: 0 5px;
|
||||
padding: 4px 10px;
|
||||
|
||||
&.curr {
|
||||
background: none;
|
||||
color: $mit-red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&.next, &.prev {
|
||||
@extend .light-button;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #555;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div.answer-own {
|
||||
border-top: 1px solid #eee;
|
||||
overflow:hidden;
|
||||
@@ -60,18 +111,28 @@ div.answer-own {
|
||||
}
|
||||
|
||||
div.answer-actions {
|
||||
text-align: right;
|
||||
border-left: 3px solid darken(#F6EFD4, 10%);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding:8px 8px 8px 0;
|
||||
text-align: right;
|
||||
background:lighten(#F6EFD4, 5%);
|
||||
|
||||
span.sep {
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
|
||||
&.question-delete {
|
||||
color: $mit-red;
|
||||
}
|
||||
|
||||
&.question-edit, &.permant-link {
|
||||
color: darken(#F6EFD4, 45%);;
|
||||
}
|
||||
|
||||
}
|
||||
a.question-edit, a.permant-link {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -792,53 +792,53 @@ body.anon #searchbar {
|
||||
margin-bottom: 16px;
|
||||
float: right; }
|
||||
|
||||
.paginator {
|
||||
padding: 5px 0 10px 0;
|
||||
font-size: 13px;
|
||||
margin-bottom: 10px;
|
||||
.prev a, .next a {
|
||||
background-color: #fff;
|
||||
color: #777;
|
||||
padding: 2px 4px 3px 4px;
|
||||
&:visited {
|
||||
background-color: #fff;
|
||||
color: #777;
|
||||
padding: 2px 4px 3px 4px; } }
|
||||
a {
|
||||
color: #7ea9b3; }
|
||||
.prev {
|
||||
margin-right: .5em; }
|
||||
.next {
|
||||
margin-left: .5em; }
|
||||
.page a {
|
||||
padding: .25em;
|
||||
background-color: #fff;
|
||||
margin: 0em .25em;
|
||||
color: #ff;
|
||||
&:visited {
|
||||
padding: .25em;
|
||||
background-color: #fff;
|
||||
margin: 0em .25em;
|
||||
color: #ff; } }
|
||||
.curr {
|
||||
padding: .25em;
|
||||
background-color: #fff;
|
||||
margin: 0em .25em;
|
||||
color: #ff;
|
||||
background-color: #8ebcc7;
|
||||
color: #fff;
|
||||
font-weight: bold; }
|
||||
.next a, .prev a {
|
||||
color: #7ea9b3; }
|
||||
.page a:hover, .curr a:hover, .prev a:hover, .next a:hover {
|
||||
color: #8c8c8c;
|
||||
background-color: #e1e1e1;
|
||||
text-decoration: none; }
|
||||
.text {
|
||||
color: #777;
|
||||
padding: .3em; }
|
||||
.paginator-container-left {
|
||||
padding: 5px 0 10px 0; } }
|
||||
// .paginator {
|
||||
// padding: 5px 0 10px 0;
|
||||
// font-size: 13px;
|
||||
// margin-bottom: 10px;
|
||||
// .prev a, .next a {
|
||||
// background-color: #fff;
|
||||
// color: #777;
|
||||
// padding: 2px 4px 3px 4px;
|
||||
// &:visited {
|
||||
// background-color: #fff;
|
||||
// color: #777;
|
||||
// padding: 2px 4px 3px 4px; } }
|
||||
// a {
|
||||
// color: #7ea9b3; }
|
||||
// .prev {
|
||||
// margin-right: .5em; }
|
||||
// .next {
|
||||
// margin-left: .5em; }
|
||||
// .page a {
|
||||
// padding: .25em;
|
||||
// background-color: #fff;
|
||||
// margin: 0em .25em;
|
||||
// color: #ff;
|
||||
// &:visited {
|
||||
// padding: .25em;
|
||||
// background-color: #fff;
|
||||
// margin: 0em .25em;
|
||||
// color: #ff; } }
|
||||
// .curr {
|
||||
// padding: .25em;
|
||||
// background-color: #fff;
|
||||
// margin: 0em .25em;
|
||||
// color: #ff;
|
||||
// background-color: #8ebcc7;
|
||||
// color: #fff;
|
||||
// font-weight: bold; }
|
||||
// .next a, .prev a {
|
||||
// color: #7ea9b3; }
|
||||
// .page a:hover, .curr a:hover, .prev a:hover, .next a:hover {
|
||||
// color: #8c8c8c;
|
||||
// background-color: #e1e1e1;
|
||||
// text-decoration: none; }
|
||||
// .text {
|
||||
// color: #777;
|
||||
// padding: .3em; }
|
||||
// .paginator-container-left {
|
||||
// padding: 5px 0 10px 0; } }
|
||||
|
||||
// .tag-size-1 {
|
||||
// font-size: 12px; }
|
||||
|
||||
@@ -103,8 +103,9 @@ div.question-header {
|
||||
|
||||
div.post-update-info {
|
||||
@include box-sizing(border-box);
|
||||
@include border-radius(5px);
|
||||
background:lighten(#F6EFD4, 5%);
|
||||
// @include border-radius(5px);
|
||||
// background:lighten(#F6EFD4, 5%);
|
||||
border-left: 3px solid darken(#F6EFD4, 10%);
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
@@ -127,29 +128,33 @@ div.question-header {
|
||||
|
||||
div.change-date {
|
||||
font-size: 12px;
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
div.avatar {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
margin-right: 3px;
|
||||
// div.avatar {
|
||||
// display: inline-block;
|
||||
// float: left;
|
||||
// margin-right: 3px;
|
||||
|
||||
img.gravatar {
|
||||
background: white;
|
||||
border: 1px solid darken(#F6EFD4, 10%);
|
||||
margin-right: 5px;
|
||||
padding: 3px ;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
// img.gravatar {
|
||||
// background: white;
|
||||
// border: 1px solid darken(#F6EFD4, 10%);
|
||||
// margin-right: 5px;
|
||||
// padding: 3px ;
|
||||
// vertical-align: bottom;
|
||||
// }
|
||||
// }
|
||||
|
||||
div.user-meta {
|
||||
display: inline-block;
|
||||
width: 60%;
|
||||
|
||||
span.username {
|
||||
font-size: 20px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
span.user-badges {
|
||||
display: block;
|
||||
// display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,9 +107,9 @@ div.discussion-wrapper aside {
|
||||
|
||||
input#clear {
|
||||
@include box-shadow(none);
|
||||
@include border-radius(5px);
|
||||
@include border-radius(15px);
|
||||
border: none;
|
||||
background: $mit-red;
|
||||
background: #bbb;
|
||||
color: #fff;
|
||||
display: inline;
|
||||
font-size: 10px;
|
||||
@@ -162,6 +162,3 @@ div.discussion-wrapper aside {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -65,35 +65,29 @@
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<%block name="bodyextra">
|
||||
|
||||
<%block name="wiki_head"/>
|
||||
|
||||
</%block>
|
||||
|
||||
<%block name="bodyextra">
|
||||
<%include file="navigation.html" args="active_page='wiki'" />
|
||||
|
||||
<section class="main-content">
|
||||
<div class="wiki-wrapper">
|
||||
<%block name="wiki_panel">
|
||||
|
||||
<%block name="wiki_panel">
|
||||
<div id="wiki_panel">
|
||||
<%
|
||||
if (wiki_article is not UNDEFINED):
|
||||
baseURL = reverse("wiki_view", args=[wiki_article.get_url()])
|
||||
else:
|
||||
baseURL = reverse("wiki_view", args=["/"])
|
||||
%>
|
||||
|
||||
<%
|
||||
if (wiki_article is not UNDEFINED):
|
||||
baseURL = reverse("wiki_view", args=[wiki_article.get_url()])
|
||||
else:
|
||||
baseURL = reverse("wiki_view", args=["/"])
|
||||
%>
|
||||
<ul class="action">
|
||||
<!-- <li> -->
|
||||
<!-- <input type="button" onclick="javascript:location.href='${reverse("wiki_random", args=[])}'" value="Random article" class="button" /> -->
|
||||
<!-- </li> -->
|
||||
<li>
|
||||
<input type="button" onclick="javascript:location.href='${reverse("wiki_list_articles", args=[])}'" value="All articles" class="button" />
|
||||
</li>
|
||||
|
||||
|
||||
<li class="create-article">
|
||||
<h3>
|
||||
<a href="#" id="create-article"/>Create Article</a>
|
||||
|
||||
@@ -8,6 +8,22 @@
|
||||
${ wiki_article.title }
|
||||
</%block>
|
||||
|
||||
<%block name="wiki_head">
|
||||
<script>
|
||||
$(function() {
|
||||
//Store the initial contents of #id_contents (the wiki body field) so we can compare for unsaved changes
|
||||
$("#id_contents").data('initial_contents', $("#id_contents").val());
|
||||
|
||||
window.onbeforeunload = function askConfirm() { //Warn the user before they navigate away
|
||||
if ( $("#id_contents").val() != $("#id_contents").data('initial_contents') ) {
|
||||
return "You have made changes to the article that have not been saved yet.";
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
</%block>
|
||||
|
||||
|
||||
<%block name="wiki_body">
|
||||
<form method="POST" id="wiki_revision">
|
||||
<div style="display:none">
|
||||
|
||||
Reference in New Issue
Block a user