Created
August 12, 2009 13:53
-
-
Save tmaslen/166515 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB"> | |
<head profile="http://dublincore.org/documents/dcq-html/"> | |
<title></title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<meta name="description" content="" /> | |
<meta name="keywords" content="" /> | |
<link rel="schema.dcterms" href="http://purl.org/dc/terms/" /> | |
<meta name="DCTERMS.created" content="2006-09-15T12:00:00Z" /> | |
<meta name="DCTERMS.modified" content="2006-09-15T12:35:00Z" /> | |
<script src="http://www.bbc.co.uk/glow/1.5.1/core/core.js" type="text/javascript"></script> | |
<script src="http://www.bbc.co.uk/glow/1.5.1/widgets/widgets.debug.js" type="text/javascript"></script> | |
<link href="http://www.bbc.co.uk/glow/1.5.1/widgets/widgets.css" type="text/css" rel="stylesheet" /> | |
<script type="text/javascript"> | |
glow.ready(function() { | |
function scaleMe(data) { | |
var start = data.start, | |
hours = Math.floor(data.start.valueOf() / 3600000) % 24, | |
ampm = ["am", "pm"][Math.floor(hours / 12)], | |
hh = ((hours - 24) % 12) + 12; | |
return hh + ampm; | |
} | |
var myTimetable = new glow.widgets.Timetable( | |
"#introExample", | |
"1 January 2010 00:00", "1 January 2010 11:00", | |
"1 January 2010 00:30", "1 January 2010 02:30", | |
{ | |
vertical: false, | |
size: 564 | |
} | |
).setBanding("hour") | |
.addScale("hour", "left", 30, {template: scaleMe}) | |
.addScrollbar("hour", "right", 15, {template: scaleMe}) | |
var myTrack = myTimetable.addTrack("myTrack", 150); | |
var item1 = myTrack.addItem("item1", "1 January 2010 07:30", "1 January 2010 09:45"); | |
var item2 = myTrack.addItem("item2", "1 January 2010 10:30", "1 January 2010 10:45"); | |
myTimetable.draw(); | |
}); | |
</script> | |
</head> | |
<body> | |
<div id="introExample"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment