Commits

Anonymous committed fc759a1

simile timeline. still needs some jQuery work so that the while thing loads at once but now running off data/endpoint/xml/simile

  • Participants
  • Parent commits f2dd69e

Comments (0)

Files changed (3)

File openletters/controllers/data.py

     def endpoint (self, author = '', correspondent = ''):
         
         if author == "rdf":
-            response.headers['Content-Type'] = 'application/rdf+xml; charset=utf-8'
+            response.headers['Content-Type'] = 'text/rdf+xml; charset=utf-8'
             rdf = rdf_transform()
             return rdf.create_rdf_end()
         
         
         elif author == "xml":
             xml = xml_transform()
-            response.headers['Content-Type'] = 'application/xml'
+            response.headers['Content-Type'] = 'text/xml'
             if correspondent == "simile":
                 return xml.endpoint_xml("simile")
             else:

File openletters/templates/timeline/index.html

       var bandInfos = [
         Timeline.createBandInfo({
           eventSource:     eventSource,
-          date:           "Jun 28 1836 00:00:00 GMT",
+          date:           "Jan 01 1839 00:00:00 GMT",
           width:          "70%", 
           intervalUnit:   Timeline.DateTime.MONTH, 
           intervalPixels: 100,
         Timeline.createBandInfo({
           overview:       true,
           eventSource: 	  eventSource,
-          date:           "Jun 28 1836 00:00:00 GMT",
+          date:           "Jan 01 1839 00:00:00 GMT",
           width:          "30%", 
           intervalUnit:   Timeline.DateTime.YEAR, 
           intervalPixels: 200,
      bandInfos[1].highlight = true;
       
       tl = Timeline.create(document.getElementById("timeline"), bandInfos);
-      Timeline.loadXML("http://localhost:5000/data/endpoint/xml/simile", function(xml, url) { eventSource.loadXML(xml, url); });
+      Timeline.loadXML("../data/endpoint/xml/simile", function(xml, url) { eventSource.loadXML(xml, url); });
     };
     
     var resizeTimerID = null;

File openletters/transform/transform_xml.py

     '''
     def endpoint_xml (self, type = ''):
         
-        root = ET.Element("data", {'date-time-format': 'iso8601'})
+        root = ET.Element("data", {'date-time-format': 'ISO 8601'})
         
         letter = {}  
         letter = dbase.get_endpoint_rdf()
           
         for url, utext in letter_items:
             if type == "simile":
-                event = ET.SubElement(root, "event", {"start": str(utext[3])+"T00:00:00", "title": utext[1] , "link": 'http://www.opencorrespondence.org/letters/view/dickens/' + urllib.quote(utext[1]) + '/' + str(url)  })
+                event = ET.SubElement(root, "event", {"start": str(utext[3])+'T00:00:00Z', "title": utext[1] , "link": 'http://www.opencorrespondence.org/letters/view/dickens/' + urllib.quote(utext[1]) + '/' + str(url)  })
                 event.text = unicode("Letter to " + utext[1])
             else:
                 letter = ET.SubElement(root, "letter")