Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maximed/timetablejs
Javascript plugin to create timetables
https://github.com/maximed/timetablejs
Last synced: 26 days ago
JSON representation
Javascript plugin to create timetables
- Host: GitHub
- URL: https://github.com/maximed/timetablejs
- Owner: MaximeD
- Created: 2014-07-09T16:40:25.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-23T05:33:23.000Z (over 8 years ago)
- Last Synced: 2024-10-15T22:15:11.341Z (2 months ago)
- Language: CoffeeScript
- Size: 239 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Timetable
`Timetable` is a simple javascript plugin to create weekly plannings.
## Dependencies
* Boostrap 3
* jquery
* underscorejs## Usage
Create a `DOM` element with an id on which you wish the timetable to be inserted.
Create a script with the following:```
$( document ).ready(function() {
myTimetable = new Timetable( '#node_id', {
timelapse: {
start: 08,
end: 20
},
events: [
// hashes of events
]
}
}
```Events should be an array where each event has the following form:
```
{
name: "name of your event",
comment: "an optional comment",
other: "optional other informations that will only be displayed in tooltip",
id: "uniq identifier, can be a string",
color: "the color you wish your event to be displayed",
times: [ // array of time where event is repeated
{
day: "day number, starts from 0",
start: "starting time, format HH:MM",
end: "ending time, format HH:MM"
},
...
]
},
...
```[See it online](http://maximed.github.io/timetablejs/) for a working example.