• Home
  • New Entries
  • Popular Entries
  • Submit a Story
  • About

Install Timeline js to your javascripts directory ...

Export the Timeline source from the Google repository into a local directory 'timeline' Note this directory does NOT have to be served by your webserver.

1) Export the Timeline source from the Google repository into a local directory imeline Note this directory does NOT have to be served by your webserver.
svn export http://simile-widgets.googlecode.com/svn/timeline/trunk timeline

2) Create a directory served by your web server for the timeline library and the needed timeline ajax library
mkdir javascripts/timeline

3) Run my simple timeline installer (below) to move just the necessary files from your local timeline source directory to your web server is javascript directory

4) In your html file that includes a Timeline:
Option 1:
No changes to the timeline-api.js -- Need to explicitly load the ajax library as shown here:

   1 
   2     <script src="http://YOUR_SERVER/javascripts/timeline/timeline_ajax/simile-ajax-api.js" type="text/javascript">
   3     </script>
   4     <script>
   5       (function() {
   6         Timeline_urlPrefix=http://YOUR_SERVER/javascripts/timeline/timeline_js/;      
   7         Timeline_parameters=undle=true;
   8        })();
   9      </script>
  10      <script src="http://YOUR_SERVER/javascripts/timeline/timeline_js/timeline-api.js" type="text/javascript">
  11      </script>

 

Note: There may be a race condition caused by creating the Timeline before the dom is ready for changes.

Alternate is modify timeline-api.js to use your server to supply the simile-ajax-api.js library.

The install script copies over just the files needed at runtime.

   1 
   2  #!/bin/sh
   3 
   4  # timeline_install.sh
   5  #
   6  # Run from the timeline root directory after doing an export.
   7  # The directory should have the following files in it:
   8  #   src/webapp/api/timeline-bundle.js
   9  #   src/ajax/api/simile-ajax-bundle.js
  10  #
  11  #
  12  # arguments: <dir> destination root directory for js.
  13  #
  14  timeline_api_dir="src/webapp/api/"
  15  timeline_api_files="timeline-api.js timeline-bundle.js timeline-bundle.css"
  16  timeline_subdirs=./images ./scripts/l10n
  17 
  18  ajax_api_dir="src/ajax/api/"
  19  ajax_api_files="simile-ajax-api.js simile-ajax-bundle.js"
  20  ajax_subdirs=./images ./scripts/signal.js
  21 
  22 
  23  if [ $# -eq 0 ]
  24  then
  25    echo "usage: timeline_install.sh destination_directory"
  26    exit
  27  fi
  28 
  29  # are we starting in the right place?
  30  if [ ! -s src/webapp/api/timeline-bundle.js ]
  31  then
  32    echo "problem: this command must be run in the directory that has the src/ subdirectory for Timeline. (src/webapp/api/timeline-bundle.js not found)"
  33    exit
  34  fi
  35 
  36  if [ ! -s src/ajax/api/simile-ajax-bundle.js ]
  37  then
  38    echo "problem: this command must be run in the directory that has the src/ subdirectory for the Simile Ajax library. (src/ajax/api/simile-ajax-bundle.js not found)"
  39    exit
  40  fi
  41 
  42  # destination directory exists?
  43  dest=$1  # dest -- destination directory
  44 
  45  if [ ! -d $dest ]
  46  then
  47    echo "problem: the destination $dest is not a vailid directory"
  48    exit
  49  fi
  50 
  51  # Good to go!
  52  echo "Installing Timeline library to $dest"
  53 
  54  timeline_src_dir=`pwd`
  55 
  56  # create destination directories
  57  cd $dest
  58  mkdir timeline_js
  59  mkdir timeline_ajax
  60  cd timeline_js
  61  dest_timeline=`pwd`
  62  cd ../timeline_ajax
  63  dest_ajax=`pwd`
  64  cd $timeline_src_dir # back to source dir
  65 
  66  # Timeline and supporting libraries
  67  for t in $timeline_api_files
  68  do
  69    cp "$timeline_api_dir$t" $dest_timeline
  70  done
  71 
  72    (
  73      cd $timeline_api_dir
  74      for t in $timeline_subdirs
  75      do
  76        tar -cf - $t |(cd $dest_timeline; tar -xpf -)
  77      done
  78     )
  79   
  80  # Ajax library
  81  for t in $ajax_api_files
  82  do
  83    cp "$ajax_api_dir$t" $dest_ajax
  84  done
  85 
  86    (
  87      cd $ajax_api_dir
  88      for t in $ajax_subdirs
  89      do
  90        tar -cf - $t |(cd $dest_ajax; tar -xpf -)
  91      done
  92     )
  93    
  94  echo "#####################################################################"
  95  echo "#"
  96  echo "#"
  97  echo "# In your Timeline file, the js urls should translate to the files"
  98  echo "#    $dest/timeline_js/simile-ajax-api.js    and"
  99  echo "#    $dest/timeline_ajax/timeline-api.js"
 100  echo "#"
 101  echo "#"
 102  echo "#####################################################################"
 103  echo ""
 104  echo ""
 105 

 View Full Story.
Posted at 12:18:20 pm | Permalink | Posted in Javascript  

Related Stuff

  • MooV: Using cutting edge Video phones and Software Video Phones - coupling all that with VoIP and empowering the disabled.

  • Moo Telecom: VoIP communications made easy - Ring anyway with the fun and ease of using a normal phone

  • TagR:Mobile Social Network with Real Time Locations Based services, and Ambience Intelligence, VoiP, IM, Skype, Googletalk, Mapping, Flickr, Events, Calendaring, Scheduling, SecondLife Support

  • ClearSMS : ClearSMS is a Web-based application that lets you send bulk SMS messages to your customers, contacts, or just about anyone.

  • Jajah:jah is a VoIP (Voice over IP) provider, founded by Austrians Roman Scharf and Daniel Mattes in 2005[1]. The Jajah headquarters are located in Mountain View, CA, USA, and Luxembourg. Jajah maintains a development centre in Israel.

  • Skype: It’s free to download and free to call other people on Skype. Skype the number one voice over ip software

  • PrivatePhone: a free local phone number with voicemail and messages you can check online or from any phone.

1 Comment |Add your comment.

Tyree Harris said:

I have no comments

Posted at October 13, 2008 01:29:16 pm

Your Comment ...

  Name (required)

  Email (required, hidden)

  Website


Top Stuff

e-messenger

MessengerFX

eBuddy

ILoveIM

AIM Express

Top 20 Ruby CMS


Our Partners

Facebook Applications

Ajax Projects

Web 2.0 Sites

Webloglines

Human Development Handbook

Software Development Company

Ajaxlines

Stock Exchange Chat


About Ajaxlines

Ajaxlines is a project focused on providing its audience with a database of most of Ajax related articles, resources, tutorials and services from around the world.

Its purpose is to showcase the power of Ajax and to act as a portal to the Ajax development community.


Search


Topics

  • .Net (114)
  • Ajax (10)
  • Ajax Games (9)
  • Articles (94)
  • Bookmarking (35)
  • Calendar (19)
  • Chat (40)
  • ColdFusion (3)
  • CSS (48)
  • Email (23)
  • Facebook (41)
  • Flash (17)
  • Google (30)
  • Html (16)
  • Image (11)
  • International Calls & VOIP (7)
  • Java (40)
  • Javascript (190)
  • jQuery (3)
  • JSON (24)
  • Perl (2)
  • PHP (97)
  • Presentation (19)
  • Python (3)
  • Resources (2)
  • RSS (1)
  • Ruby (15)
  • Storage (4)
  • Toolkits (94)
  • Tutorials (203)
  • UI (12)
  • Utilities (173)
  • Web2.0 (18)
  • XmlHttpRequest (22)
  • YUI (4)

© 2006 www.ajaxlines.com. All Rights Reserved. Powered by IRange