From eb745fa1e7f2358b3a445fd3dfed3e2df2c49d2a Mon Sep 17 00:00:00 2001 From: ec2-user Date: Sun, 13 Nov 2011 21:16:39 +0000 Subject: [PATCH] notes list working w/1page --- public/index.html | 4 ++-- public/javascripts/main.js | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-) 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") }); } -- 2.25.1