Updated readme and demo

This commit is contained in:
Travis
2014-03-11 14:23:28 -08:00
parent 6415ba5879
commit efb5222403
5 changed files with 35 additions and 10 deletions
+8 -1
View File
@@ -8,9 +8,10 @@ Now you can make calendar friendly files client-side. It outputs .ics files, so
How To Use
----------
Simply use invoke the object and use the functions...
var cal = ics();
cal.addEvent(subject, description, location, begin, end);
cal.addEvent(subject, description, location, begin, end); // yes, you can have multiple events :-)
cal.download(filename);
`begin` and `end` need to be formatted in a way that is friendly to `Date()`
@@ -52,3 +53,9 @@ Supported Browsers
| Opera Next | [FileSaver.js](https://github.com/eligrey/FileSaver.js) |
| Opera < 15 | [FileSaver.js](https://github.com/eligrey/FileSaver.js), [Blob.js](https://github.com/eligrey/Blob.js) |
| Safari ≤ 6 | [FileSaver.js](https://github.com/eligrey/FileSaver.js), [Blob.js](https://github.com/eligrey/Blob.js) |
Credits
------------------
* [Travis Krause](https://github.com/nwcell): Me
* [Kyle Hornberg](https://github.com/khornberg): Added multi event functionality and made everything a package firendly
+2 -2
View File
@@ -1,8 +1,8 @@
{
"name": "ics.js",
"main": "ics.js",
"version": "0.1.1",
"homepage": "https://github.com/khornberg/ics.js",
"version": "0.1.2",
"homepage": "https://github.com/nwcell/ics.js",
"contributors": [
"Travis Krause <travis@codeforemen.com>",
"Kyle Hornberg <kyle.hornberg@gmail.com>"
+6 -2
View File
@@ -40,12 +40,16 @@
background-color: #428bca;
border-color: #357ebd;
font-family: sans-serif;
width: 120px;
}
</style>
</head>
<body>
<div class="wrap">
<a href="javascript:cal.download('christmas')">Download iCal</a>
Look at the console too!
<a href="javascript:cal_single.download('Awesome Day')">Single Event</a>
<br>
<a href="javascript:cal.download('Holidays')">Multiple Events</a>
<br>
<a href="javascript:makelogs(cal)">Console Output</a>
</div>
</html>
+16 -2
View File
@@ -2,5 +2,19 @@
var cal = ics();
cal.addEvent('Christmas', 'Christian holiday celebrating the birth of Jesus Christ', 'Bethlehem', '12/25/2013', '12/25/2013');
cal.addEvent('Christmas', 'Christian holiday celebrating the birth of Jesus Christ', 'Bethlehem', '12/25/2014', '12/25/2014');
console.log('Events\n' + cal.events());
console.log('Calendar\n' + cal.calendar());
cal.addEvent('New Years', 'Watch the ball drop!', 'New York', '01/01/2015', '01/01/2015');
cal.addEvent('New Years', 'Watch the ball drop!', 'New York', '01/01/2016', '01/01/2016');
var cal_single = ics();
cal_single.addEvent('Best Day', 'This is the best day to demonstrate a single event.', 'New York', '11/12/1987', '11/12/1987');
// You can use this for easy debugging
var makelogs = function(obj) {
console.log('Events Array');
console.log('=================');
console.log(obj.events());
console.log('Calendar With Header');
console.log('=================');
console.log(obj.calendar());
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "ics.js",
"version": "0.1.1",
"version": "0.1.2",
"description": "A browser firendly .ics/.vcs file generator written entirely in javascript",
"main": "icsjs",
"dependencies": {
@@ -17,7 +17,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/khornberg/ics.js.git"
"url": "https://github.com/nwcell/ics.js.git"
},
"keywords": [
"ics",
@@ -30,6 +30,6 @@
],
"license": "MIT",
"bugs": {
"url": "https://github.com/khornberg/ics.js/issues"
"url": "https://github.com/nwcell/ics.js/issues"
}
}