notes list working w/1page
authorec2-user <ec2-user@fcdev4.finalsclub.org>
Sun, 13 Nov 2011 21:16:39 +0000 (21:16 +0000)
committerec2-user <ec2-user@fcdev4.finalsclub.org>
Sun, 13 Nov 2011 21:16:39 +0000 (21:16 +0000)
public/index.html
public/javascripts/main.js

index 232b0697f42a0beb0e98238838cfa63f618c19e8..d2690b0e0dabbab91800fc9b2913b088004dab6d 100644 (file)
                                </div>
                                <div class=lecture id=PROTO_lecture>
                                        <div class=name>
-                                               <a href="javascript:goPage('/note/___id__')">__name__</a><br>
+                                               <a href="javascript:goPage('/lecture/___id__')">__name__</a><br>
                                                Created: __date__<br>
                                        </div>
                                </div>
                                <h1>Notepads </h1>
                                <div class=note id=PROTO_note>
                                        <div class=name>
-                                               <a href="">__name__</a>
+                                               <a href="/note/___id__">__name__</a>
                                        </div>
                                </div>
                        </div>
index 8d8eaf65a55cf7543b3f0e06936ae56f8e3be4c1..aa8e35142261718b1eb09755033df87519133604 100644 (file)
@@ -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")
        });
 }