[Yanel-commits] rev 26343 -
public/yanel/trunk/src/contributions/resources/timeline/src
michi at wyona.com
michi at wyona.com
Fri Jul 27 11:02:14 CEST 2007
Author: michi
Date: 2007-07-27 11:02:13 +0200 (Fri, 27 Jul 2007)
New Revision: 26343
Added:
public/yanel/trunk/src/contributions/resources/timeline/src/timeline-template.xhtml
Log:
timeline-template added
Added: public/yanel/trunk/src/contributions/resources/timeline/src/timeline-template.xhtml
===================================================================
--- public/yanel/trunk/src/contributions/resources/timeline/src/timeline-template.xhtml (rev 0)
+++ public/yanel/trunk/src/contributions/resources/timeline/src/timeline-template.xhtml 2007-07-27 09:02:13 UTC (rev 26343)
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script src="http://simile.mit.edu/timeline/api/timeline-api.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+var tl;
+
+var resizeTimerID = null;
+function onResize() {
+ if (resizeTimerID == null) {
+ resizeTimerID = window.setTimeout(function() {
+ resizeTimerID = null;
+ tl.layout();
+ }, 500);
+ }
+}
+
+function onLoad() {
+ var eventSource = new Timeline.DefaultEventSource();
+ var bandInfos = [
+ Timeline.createBandInfo({
+ eventSource: eventSource,
+ date: "@TODAY@",
+ //date: "Jul 27 2007 00:00:00 GMT",
+ width: "70%",
+ intervalUnit: Timeline.DateTime.MONTH,
+ intervalPixels: 100
+ }),
+ Timeline.createBandInfo({
+showEventText: false,
+ trackHeight: 0.5,
+ trackGap: 0.2,
+
+ eventSource: eventSource,
+ date: "@TODAY@",
+ //date: "Jul 27 2007 00:00:00 GMT",
+ width: "30%",
+ intervalUnit: Timeline.DateTime.YEAR,
+ intervalPixels: 200
+ })
+ ];
+ bandInfos[1].syncWith = 0;
+ bandInfos[1].highlight = true;
+
+ tl = Timeline.create(document.getElementById("my-timeline"), bandInfos);
+ Timeline.loadXML("@HREF@", function(xml, url) { eventSource.loadXML(xml, url); });
+ //Timeline.loadXML("roadmap.xml", function(xml, url) { eventSource.loadXML(xml, url); });
+}
+</script>
+</head>
+
+<body onload="onLoad();" onresize="onResize();">
+<h3>@TITLE@</h3>
+<!--<h3>Title of Timeline</h3>-->
+<div id="my-timeline" style="height: 250px; border: 1px solid #aaa"></div>
+</body>
+</html>
More information about the Yanel-commits
mailing list