Skip to content
Browse files

Added filter and javascripts for report card

  • Loading branch information...
1 parent c123a9a commit 04461645e19c7e35a28dda8b4cd34458ae38e10b @thedjpetersen committed Jun 15, 2011
View
8 main/templatetags/filters.py
@@ -0,0 +1,8 @@
+from django import template
+
+register = template.Library()
+
+@register.filter
+def colorize(number, arg):
+ return (120-(120/number)*arg)
+
View
18 site_media/javascripts/report_card.js
@@ -0,0 +1,18 @@
+ $(document).ready(function() {
+ // put all your jQuery goodness in here.
+ var pathname = window.location.pathname;
+ if(window.location.hash){
+ $(window.location.hash).css("display", "block")
+ }
+ else{
+ $("#report-card").css("display", "block")
+ }
+
+ $(".report-navigation > a").click(function(event) {
+ event.preventDefault();
+ var target_div = $(this).attr("href");
+ $(".report-section").css("display", "none");
+ $(target_div).css("display", "block");
+ });
+
+});
View
1 site_media/stylesheets/report_card.css
@@ -8,6 +8,7 @@
.report-class{
margin:10px;
+ border-bottom: 1px solid #eee;
}
.report-class span{
View
2 transcript/templates/transcript/report_card.html
@@ -19,7 +19,7 @@
<div id="report-card" class="report-section">
{% for term in term_groups %}
{% for term_name, group in term.items %}
- <h3>{{term_name}}</h3>
+ <h2>{{term_name}}</h2>
<div class="group span-24 last">
{% for class in group %}
<div class="span-24 last report-class">

0 comments on commit 0446164

Please sign in to comment.
Something went wrong with that request. Please try again.