From: Joe Hitchens Date: Fri, 11 Nov 2011 20:41:55 +0000 (-0800) Subject: protodiv demo work X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=refs%2Fpull%2F3%2Fhead;p=oweals%2Ffinalsclub.git protodiv demo work --- diff --git a/public/courses.html b/public/courses.html index e1354f0..9980363 100644 --- a/public/courses.html +++ b/public/courses.html @@ -18,7 +18,7 @@ - +
 
 
@@ -41,13 +41,23 @@ var school = document.location.search.match(/school=([^&]+)/)[1] $("#school_name").html(school); - // this will actually come from an AJAX call to a REST interface at "/api?..." - var courses = [ - { id: "4e6d1e9b42bbef522c000a8f", name: "History 12: Introduction to the Middle East" }, - { id: "4e8aa3f62e4b97e67b001f47", name: "ANTH160AC/ISF 160: The Forms of Folklorek" } - ] - ProtoDiv.replicate("course_proto", courses); + var courses = [] + if(false) { + /* + $.get("/api", { act: "getCourses", school: school }, function(r) { + courses = JSON.parse(r) + ProtoDiv.replicate("course_proto", courses); + }) + */ + } + else { + var courses = [ + { id: "4e6d1e9b42bbef522c000a8f", name: "History 12: Introduction to the Middle East" }, + { id: "4e8aa3f62e4b97e67b001f47", name: "ANTH160AC/ISF 160: The Forms of Folklorek" } + ] + ProtoDiv.replicate("course_proto", courses); + } @@ -55,7 +65,7 @@ - +

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License

Creative Commons LicenseReal Time Web Analytics

diff --git a/public/schools.html b/public/schools.html index 4085545..ec1195c 100644 --- a/public/schools.html +++ b/public/schools.html @@ -18,7 +18,7 @@ - +
 
 
@@ -33,19 +33,34 @@
-

__name__

+
+ __name__ + (__numCourses__ courses) +
@@ -53,7 +68,7 @@ - +

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License

Creative Commons LicenseReal Time Web Analytics