| 1 |
// $Id$ |
// $Id: timemap_simile-timeline.js,v 1.1 2008/06/02 03:43:49 sethfreach Exp $ |
| 2 |
if (Drupal.jsEnabled) { |
if (Drupal.jsEnabled) { |
| 3 |
var tl; |
var tl; |
| 4 |
var eventSources = new Array(); |
var eventSources = new Array(); |
| 5 |
var now = new Date(); |
var now = new Date(); |
| 6 |
var uid, timezoneOffset; |
var uid, timezoneOffset, basepath; |
| 7 |
|
|
| 8 |
function time_onLoad() { |
function time_onLoad() { |
| 9 |
var eventSource = new Timeline.DefaultEventSource(0); |
var eventSource = new Timeline.DefaultEventSource(0); |
| 27 |
intervalPixels: 200, |
intervalPixels: 200, |
| 28 |
showEventText: false, |
showEventText: false, |
| 29 |
trackHeight: 0.6, |
trackHeight: 0.6, |
| 30 |
trackGap: 0.2, |
trackGap: 0.2 |
| 31 |
}), |
}), |
| 32 |
Timeline.createBandInfo({ |
Timeline.createBandInfo({ |
| 33 |
eventSource: eventSource, |
eventSource: eventSource, |
| 38 |
intervalPixels: 200, |
intervalPixels: 200, |
| 39 |
showEventText: false, |
showEventText: false, |
| 40 |
trackHeight: 0.3, |
trackHeight: 0.3, |
| 41 |
trackGap: 0.2, |
trackGap: 0.2 |
| 42 |
}) |
}) |
| 43 |
]; |
]; |
| 44 |
bandInfos[1].syncWith = 0; |
bandInfos[1].syncWith = 0; |
| 46 |
bandInfos[2].syncWith = 1; |
bandInfos[2].syncWith = 1; |
| 47 |
bandInfos[2].highlight = true; |
bandInfos[2].highlight = true; |
| 48 |
|
|
| 49 |
Timeline.loadJSON("/index.php?q=timemap/map/serv/" + uid, function(json, url) { |
Timeline.loadJSON(basepath + "index.php?q=timemap/map/serv/" + uid, function(json, url) { |
| 50 |
eventSource.loadJSON(json, url); |
eventSource.loadJSON(json, url); |
| 51 |
}); |
}); |
| 52 |
tl = Timeline.create(document.getElementById("time_map"), bandInfos); |
tl = Timeline.create(document.getElementById("time_map"), bandInfos); |
| 67 |
jQuery().ready(function(){ |
jQuery().ready(function(){ |
| 68 |
uid = $('#time_map').attr('uid'); |
uid = $('#time_map').attr('uid'); |
| 69 |
timezoneOffset = $('#time_map').attr('offset') / 3600; |
timezoneOffset = $('#time_map').attr('offset') / 3600; |
| 70 |
|
basepath = $('#time_map').attr('basepath'); |
| 71 |
time_onLoad(); |
time_onLoad(); |
| 72 |
$('body').resize('time_onResize'); |
$('body').resize('time_onResize'); |
| 73 |
|
|