From: ec2-user Date: Sun, 13 Nov 2011 21:16:39 +0000 (+0000) Subject: notes list working w/1page X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=eb745fa1e7f2358b3a445fd3dfed3e2df2c49d2a;p=oweals%2Ffinalsclub.git notes list working w/1page --- diff --git a/public/index.html b/public/index.html index 232b069..d2690b0 100644 --- a/public/index.html +++ b/public/index.html @@ -119,7 +119,7 @@
- __name__
+ __name__
Created: __date__
@@ -131,7 +131,7 @@

Notepads

diff --git a/public/javascripts/main.js b/public/javascripts/main.js index 8d8eaf6..aa8e351 100644 --- a/public/javascripts/main.js +++ b/public/javascripts/main.js @@ -114,11 +114,26 @@ function showNotes(matches, cb) { $.get("/lecture/"+lectureId, {}, function(response) { - var notes = [] if(typeof response == 'object') { - notes = course.notes + + var course = response.course + //if(course) + // ProtoDiv.replicate("PROTO_lectures_head", [course]) + + var instructor = response.instructor + //if(instructor) + // ProtoDiv.replicate("PROTO_lectures_instructor", [instructor]) + + var lecture = response.lecture + //if(lecture) + // ProtoDiv.replicate("PROTO_lecture", lectures); + + var notes = response.notes + if(notes) + ProtoDiv.replicate("PROTO_note", notes); + } - ProtoDiv.replicate("PROTO_note", lectures); + cb("notes") }); }