/[drupal]/contributions/modules/timemap/timemap_simile-timeline.js
ViewVC logotype

Diff of /contributions/modules/timemap/timemap_simile-timeline.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Mon Jun 2 03:43:49 2008 UTC revision 1.1.2.1, Wed Jun 11 22:24:04 2008 UTC
# Line 1  Line 1 
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);
# Line 27  if (Drupal.jsEnabled) { Line 27  if (Drupal.jsEnabled) {
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,
# Line 38  if (Drupal.jsEnabled) { Line 38  if (Drupal.jsEnabled) {
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;
# Line 46  if (Drupal.jsEnabled) { Line 46  if (Drupal.jsEnabled) {
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);
# Line 67  if (Drupal.jsEnabled) { Line 67  if (Drupal.jsEnabled) {
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    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.2