Commit 5b6d82f2 authored by Martin's avatar Martin

Imported Upstream version 2.3.0+dfsg1

parent d5954afc
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>timeline</name>
<comment></comment>
<projects>
</projects>
</projectDescription>
This diff is collapsed.
/*
* (c) Copyright The SIMILE Project 2006. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Note: JQuery, www.jquery.com is included in the Ajax section of this
* distribution. It is covered by its own license:
*
* Copyright (c) 2008 John Resig (jquery.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*/
T I M E L I N E
What is this?
-------------
Timeline is a DHTML-based AJAXy timeline.
Running Timeline
----------------
Timeline consists of static resources, Javascript libraries,
image files and css files. All you really need is to
serve those resources off a web server. Any web server will do.
Two ways to access the library
1. Unzip either timeline_source.zip or timeline_libraries.zip into
a directory served by a webserver.
timeline_source.zip includes complete source and example files. Use your
browser to see the examples at
.../timeline_directory/src/webapp
timeline_libraries.zip is the minimum install of the bundled js libraries,
css and image files
2. No web server? The timeline project includes a small webserver called
Jetty (use the timeline_source.zip file)
a) install the Java runtime from Sun
b) unzip timeline_source.zip to an install directory
c) Open a shell or command prompt to the install directory and type:
[win32]> run
[unix/macosx]> chmod +x run; ./run
and then point your browser to
http://127.0.0.1:9999/timeline/
How do I customize Timeline?
----------------------------
Refer to the Timeline web site at
http://code.google.com/p/simile-widgets/
Mailing List and Forum
----------------------
Join the community by joining the Google Group SIMILE Widgets
http://groups.google.com/group/simile-widgets/
Licensing and legal issues
--------------------------
Timeline is open source software and are licensed under the BSD license
located in the LICENSE.txt file located in the same directory as this very file
you are reading.
Credits
-------
This software was created by the SIMILE project and originally written
by the SIMILE development team (in alphabetical order):
- David François Huynh <dfhuynh at csail.mit.edu>
--- o ---
Thanks for your interest.
The SIMILE Project
http://simile.mit.edu/
<!--+
|
| +===========================+
| | Timeline Build System |
| +===========================+
|
| This is just for bundling and minifying javascript and CSS files.
|
+-->
<project default="all" basedir="." name="Timeline">
<property name="version" value="2.3.0" />
<target name="all" depends="timeline_source.zip, timeline_libraries.zip" />
<target name="tasks">
<taskdef name="jsmin"
classname="edu.mit.simile.jsminTask.JSMinTask"
classpath="tools/jsminTask.jar"/>
</target>
<target name="bundle" depends="tasks">
<!-- SimileAjax -->
<jsmin output="src/ajax/api/simile-ajax-bundle.js">
<fileset dir="src/ajax/api/scripts">
<include name="jquery*.js" />
<include name="platform.js" />
</fileset>
<fileset dir="src/ajax/api/scripts">
<include name="**/*.js" />
<exclude name="signal.js" />
<exclude name="jquery*.js" />
<exclude name="platform.js" />
</fileset>
</jsmin>
<!-- Timeline -->
<jsmin output="src/webapp/api/timeline-bundle.js">
<fileset dir="src/webapp/api/scripts">
<include name="*.js" />
</fileset>
</jsmin>
<concat destfile="src/webapp/api/timeline-bundle.css">
<fileset dir="src/webapp/api/styles">
<include name="**/*.css" />
</fileset>
</concat>
</target>
<target name="create_output1" depends="bundle">
<!-- Create versioned timeline dir with lib, src, examples, jetty -->
<delete dir="timeline_${version}"/>
<copy todir="timeline_${version}/lib">
<fileset dir="lib" excludes="**/.svn/**, **/*.bak" />
</copy>
<copy todir="timeline_${version}/src">
<fileset dir="src" excludes="**/.svn/**, **/*.bak" />
</copy>
<copy todir="timeline_${version}/tools">
<fileset dir="tools" excludes="**/.svn/**, **/*.bak" />
</copy>
<copy file=".project" todir="timeline_${version}" />
<copy file="build.xml" todir="timeline_${version}" />
<copy file="CHANGES.txt" todir="timeline_${version}" />
<copy file="jetty.xml" todir="timeline_${version}" />
<copy file="LICENSE.txt" todir="timeline_${version}" />
<copy file="README.txt" todir="timeline_${version}" />
<copy file="run" todir="timeline_${version}" />
<copy file="run.bat" todir="timeline_${version}" />
</target>
<target name="timeline_source.zip" depends="create_output1">
<!-- Create timeline_source.zip - entire source tree: tools, lib, src -->
<delete file="timeline_source.zip" />
<zip destfile="timeline_source.zip"
basedir="."
update="yes"
duplicate="fail"
includes="timeline_${version}/**"
/>
<delete dir="timeline_${version}"/>
</target>
<target name="create_output2" depends="bundle">
<!-- Create versioned timeline dir with just bundled libraries and support files -->
<!-- timeline files -->
<property name="webapp_api" value="src/webapp/api/" />
<delete dir="timeline_${version}"/>
<copy file="${webapp_api}timeline-api.js" todir="timeline_${version}/timeline_js" />
<copy file="${webapp_api}timeline-bundle.js" todir="timeline_${version}/timeline_js" />
<copy file="${webapp_api}timeline-bundle.css" todir="timeline_${version}/timeline_js" />
<copy file="LICENSE.txt" todir="timeline_${version}" />
<copy todir="timeline_${version}/timeline_js/images">
<fileset dir="${webapp_api}images" excludes="**/.svn/**, **/*.bak" />
</copy>
<copy todir="timeline_${version}/timeline_js/scripts/l10n">
<fileset dir="${webapp_api}scripts/l10n" excludes="**/.svn/**, **/*.bak" />
</copy>
<!-- ajax files -->
<property name="ajax_api" value="src/ajax/api/" />
<copy file="${ajax_api}simile-ajax-api.js" todir="timeline_${version}/timeline_ajax" />
<copy file="${ajax_api}simile-ajax-bundle.js" todir="timeline_${version}/timeline_ajax" />
<copy todir="timeline_${version}/timeline_ajax/images">
<fileset dir="${ajax_api}images" excludes="**/.svn/**, **/*.bak" />
</copy>
<copy todir="timeline_${version}/timeline_ajax/styles">
<fileset dir="${ajax_api}styles" excludes="**/.svn/**, **/*.bak" />
</copy>
<copy todir="timeline_${version}/timeline_ajax/content">
<fileset dir="${ajax_api}content" excludes="**/.svn/**, **/*.bak" />
</copy>
<copy file="${ajax_api}scripts/signal.js" todir="timeline_${version}/timeline_ajax/scripts" />
<!-- release files -->
<copy file="CHANGES.txt" todir="timeline_${version}" />
<copy file="LICENSE.txt" todir="timeline_${version}" />
<copy file="README.txt" todir="timeline_${version}" />
</target>
<target name="timeline_libraries.zip" depends="create_output2">
<!-- Create timeline_libraries.zip - entire source tree: tools, lib, src -->
<delete file="timeline_libraries.zip" />
<zip destfile="timeline_libraries.zip"
basedir="."
update="yes"
duplicate="fail"
includes="timeline_${version}/**"
/>
<delete dir="timeline_${version}"/>
</target>
</project>
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<!-- =============================================================== -->
<!-- Configure the Jetty Server -->
<!-- =============================================================== -->
<Configure id="Server" class="org.mortbay.jetty.Server">
<!-- =========================================================== -->
<!-- Server Thread Pool -->
<!-- =========================================================== -->
<Set name="ThreadPool">
<New class="org.mortbay.thread.BoundedThreadPool">
<Set name="minThreads">25</Set>
<Set name="maxThreads">250</Set>
</New>
</Set>
<!-- =========================================================== -->
<!-- Set connectors -->
<!-- =========================================================== -->
<!-- One of each type! -->
<!-- =========================================================== -->
<Set name="connectors">
<Array type="org.mortbay.jetty.Connector">
<Item>
<New class="org.mortbay.jetty.bio.SocketConnector">
<Set name="port">9999</Set>
<Set name="maxIdleTime">50000</Set>
</New>
</Item>
</Array>
</Set>
<!-- =========================================================== -->
<!-- Set handler Collection Structure -->
<!-- =========================================================== -->
<Set name="handler">
<New id="handlers" class="org.mortbay.jetty.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.mortbay.jetty.Handler">
<Item>
<New id="contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
</Item>
<Item>
<New id="defaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
</Item>
</Array>
</Set>
</New>
</Set>
<!-- ======================================================= -->
<!-- Configure specific contexts -->
<!-- ======================================================= -->
<Ref id="contexts">
<Set name="handlers">
<Array type="org.mortbay.jetty.Handler">
<!-- ======================================================= -->
<!-- Configure a context directly - no XML parser required -->
<!-- ======================================================= -->
<Item>
<New id="aContext" class="org.mortbay.jetty.handler.ContextHandler">
<Set name="contextPath">/timeline</Set>
<Set name="resourceBase">./src/webapp/</Set>
<Set name="handler">
<New id="javadocServletHandler" class="org.mortbay.jetty.servlet.ServletHandler">
<Set name="servlets">
<Array type="org.mortbay.jetty.servlet.ServletHolder">
<Item>
<New class="org.mortbay.jetty.servlet.ServletHolder">
<Set name="name">Timeline</Set>
<Set name="className">org.mortbay.jetty.servlet.DefaultServlet</Set>
</New>
</Item>
</Array>
</Set>
<Set name="servletMappings">
<Array type="org.mortbay.jetty.servlet.ServletMapping">
<Item>
<New class="org.mortbay.jetty.servlet.ServletMapping">
<Set name="pathSpec">/</Set>
<Set name="servletName">Timeline</Set>
</New>
</Item>
</Array>
</Set>
</New>
</Set>
</New>
</Item>
<Item>
<New id="aContext" class="org.mortbay.jetty.handler.ContextHandler">
<Set name="contextPath">/timeline/api</Set>
<Set name="resourceBase">./src/webapp/api/</Set>
<Set name="handler">
<New id="javadocServletHandler" class="org.mortbay.jetty.servlet.ServletHandler">
<Set name="servlets">
<Array type="org.mortbay.jetty.servlet.ServletHolder">
<Item>
<New class="org.mortbay.jetty.servlet.ServletHolder">
<Set name="name">Timeline</Set>
<Set name="className">org.mortbay.jetty.servlet.DefaultServlet</Set>
</New>
</Item>
</Array>
</Set>
<Set name="servletMappings">
<Array type="org.mortbay.jetty.servlet.ServletMapping">
<Item>
<New class="org.mortbay.jetty.servlet.ServletMapping">
<Set name="pathSpec">/</Set>
<Set name="servletName">Timeline</Set>
</New>
</Item>
</Array>
</Set>
</New>
</Set>
</New>
</Item>
<Item>
<New id="aContext" class="org.mortbay.jetty.handler.ContextHandler">
<Set name="contextPath">/ajax/api</Set>
<Set name="resourceBase">./src/ajax/api/</Set>
<Set name="handler">
<New id="javadocServletHandler" class="org.mortbay.jetty.servlet.ServletHandler">
<Set name="servlets">
<Array type="org.mortbay.jetty.servlet.ServletHolder">
<Item>
<New class="org.mortbay.jetty.servlet.ServletHolder">
<Set name="name">Ajax</Set>
<Set name="className">org.mortbay.jetty.servlet.DefaultServlet</Set>
</New>
</Item>
</Array>
</Set>
<Set name="servletMappings">
<Array type="org.mortbay.jetty.servlet.ServletMapping">
<Item>
<New class="org.mortbay.jetty.servlet.ServletMapping">
<Set name="pathSpec">/</Set>
<Set name="servletName">Ajax</Set>
</New>
</Item>
</Array>
</Set>
</New>
</Set>
</New>
</Item>
</Array>
</Set>
</Ref>
<!-- =========================================================== -->
<!-- extra options -->
<!-- =========================================================== -->
<Set name="stopAtShutdown">true</Set>
<!-- ensure/prevent Server: header being sent to browsers -->
<Set name="sendServerVersion">true</Set>
</Configure>
#!/bin/sh
java -jar lib/start.jar jetty.xml
java -jar lib/start.jar jetty.xml
\ No newline at end of file
<html>
<head>
<title>Dummy Page for Keeping Track of History</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
/*==================================================
* General, miscellaneous SimileAjax stuff
*==================================================
*/
SimileAjax.ListenerQueue = function(wildcardHandlerName) {
this._listeners = [];
this._wildcardHandlerName = wildcardHandlerName;
};
SimileAjax.ListenerQueue.prototype.add = function(listener) {
this._listeners.push(listener);
};
SimileAjax.ListenerQueue.prototype.remove = function(listener) {
var listeners = this._listeners;
for (var i = 0; i < listeners.length; i++) {
if (listeners[i] == listener) {
listeners.splice(i, 1);
break;
}
}
};
SimileAjax.ListenerQueue.prototype.fire = function(handlerName, args) {
var listeners = [].concat(this._listeners);
for (var i = 0; i < listeners.length; i++) {
var listener = listeners[i];
if (handlerName in listener) {
try {
listener[handlerName].apply(listener, args);
} catch (e) {
SimileAjax.Debug.exception("Error firing event of name " + handlerName, e);
}
} else if (this._wildcardHandlerName != null &&
this._wildcardHandlerName in listener) {
try {
listener[this._wildcardHandlerName].apply(listener, [ handlerName ]);
} catch (e) {
SimileAjax.Debug.exception("Error firing event of name " + handlerName + " to wildcard handler", e);
}
}
}
};
This diff is collapsed.
This diff is collapsed.
/*==================================================
* Debug Utility Functions
*==================================================
*/
SimileAjax.Debug = {
silent: false
};
SimileAjax.Debug.log = function(msg) {
var f;
if ("console" in window && "log" in window.console) { // FireBug installed
f = function(msg2) {
console.log(msg2);
}
} else {
f = function(msg2) {
if (!SimileAjax.Debug.silent) {
alert(msg2);
}
}
}
SimileAjax.Debug.log = f;
f(msg);
};
SimileAjax.Debug.warn = function(msg) {
var f;
if ("console" in window && "warn" in window.console) { // FireBug installed
f = function(msg2) {
console.warn(msg2);
}
} else {
f = function(msg2) {
if (!SimileAjax.Debug.silent) {
alert(msg2);
}
}
}
SimileAjax.Debug.warn = f;
f(msg);
};
SimileAjax.Debug.exception = function(e, msg) {
var f, params = SimileAjax.parseURLParameters();
if (params.errors == "throw" || SimileAjax.params.errors == "throw") {
f = function(e2, msg2) {
throw(e2); // do not hide from browser's native debugging features
};
} else if ("console" in window && "error" in window.console) { // FireBug installed
f = function(e2, msg2) {
if (msg2 != null) {
console.error(msg2 + " %o", e2);
} else {
console.error(e2);
}
throw(e2); // do not hide from browser's native debugging features
};
} else {
f = function(e2, msg2) {
if (!SimileAjax.Debug.silent) {
alert("Caught exception: " + msg2 + "\n\nDetails: " + ("description" in e2 ? e2.description : e2));
}
throw(e2); // do not hide from browser's native debugging features
};