/[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.2, Tue Jun 3 02:34:15 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;
7    
8    function time_onLoad() {    function timemap_onLoad() {
9      var eventSource = new Timeline.DefaultEventSource(0);      var eventSource = new Timeline.DefaultEventSource(0);
10      var theme = Timeline.ClassicTheme.create();      var theme = Timeline.ClassicTheme.create();
11    
# Line 49  if (Drupal.jsEnabled) { Line 49  if (Drupal.jsEnabled) {
49      Timeline.loadJSON("/index.php?q=timemap/map/serv/" + uid, function(json, url) {      Timeline.loadJSON("/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("timemap"), bandInfos);
53    
54      eventSources[0] = eventSource;      eventSources[0] = eventSource;
55    }    }
56    
57    var resizeTimerID = null;    var resizeTimerID = null;
58    function time_onResize() {    function timemap_onResize() {
59        if (resizeTimerID == null) {        if (resizeTimerID == null) {
60            resizeTimerID = window.setTimeout(function() {            resizeTimerID = window.setTimeout(function() {
61                resizeTimerID = null;                resizeTimerID = null;
# Line 65  if (Drupal.jsEnabled) { Line 65  if (Drupal.jsEnabled) {
65    }    }
66    
67    jQuery().ready(function(){    jQuery().ready(function(){
68      uid = $('#time_map').attr('uid');      uid = $('#timemap').attr('uid');
69      timezoneOffset = $('#time_map').attr('offset') / 3600;      timezoneOffset = $('#timemap').attr('offset') / 3600;
70      time_onLoad();      timemap_onLoad();
71      $('body').resize('time_onResize');      $('body').resize('timemap_onResize');
72    
73      /*      /*
74      $('.time_report_person_selector').change(function() {      $('.time_report_person_selector').change(function() {
# Line 88  if (Drupal.jsEnabled) { Line 88  if (Drupal.jsEnabled) {
88    
89    });    });
90  }  }
   
   

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

  ViewVC Help
Powered by ViewVC 1.1.2