Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efb5222403 |
@@ -8,9 +8,10 @@ Now you can make calendar friendly files client-side. It outputs .ics files, so
|
|||||||
How To Use
|
How To Use
|
||||||
----------
|
----------
|
||||||
Simply use invoke the object and use the functions...
|
Simply use invoke the object and use the functions...
|
||||||
|
|
||||||
var cal = ics();
|
var cal = ics();
|
||||||
cal.addEvent(subject, description, location, begin, end);
|
cal.addEvent(subject, description, location, begin, end);
|
||||||
|
cal.addEvent(subject, description, location, begin, end); // yes, you can have multiple events :-)
|
||||||
cal.download(filename);
|
cal.download(filename);
|
||||||
|
|
||||||
`begin` and `end` need to be formatted in a way that is friendly to `Date()`
|
`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 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) |
|
| 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) |
|
| 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
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "ics.js",
|
"name": "ics.js",
|
||||||
"main": "ics.js",
|
"main": "ics.js",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"homepage": "https://github.com/khornberg/ics.js",
|
"homepage": "https://github.com/nwcell/ics.js",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Travis Krause <[email protected]>",
|
"Travis Krause <[email protected]>",
|
||||||
"Kyle Hornberg <[email protected]>"
|
"Kyle Hornberg <[email protected]>"
|
||||||
|
|||||||
+6
-2
@@ -40,12 +40,16 @@
|
|||||||
background-color: #428bca;
|
background-color: #428bca;
|
||||||
border-color: #357ebd;
|
border-color: #357ebd;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
|
width: 120px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<a href="javascript:cal.download('christmas')">Download iCal</a>
|
<a href="javascript:cal_single.download('Awesome Day')">Single Event</a>
|
||||||
Look at the console too!
|
<br>
|
||||||
|
<a href="javascript:cal.download('Holidays')">Multiple Events</a>
|
||||||
|
<br>
|
||||||
|
<a href="javascript:makelogs(cal)">Console Output</a>
|
||||||
</div>
|
</div>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
+16
-2
@@ -2,5 +2,19 @@
|
|||||||
var cal = ics();
|
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/2013', '12/25/2013');
|
||||||
cal.addEvent('Christmas', 'Christian holiday celebrating the birth of Jesus Christ', 'Bethlehem', '12/25/2014', '12/25/2014');
|
cal.addEvent('Christmas', 'Christian holiday celebrating the birth of Jesus Christ', 'Bethlehem', '12/25/2014', '12/25/2014');
|
||||||
console.log('Events\n' + cal.events());
|
cal.addEvent('New Years', 'Watch the ball drop!', 'New York', '01/01/2015', '01/01/2015');
|
||||||
console.log('Calendar\n' + cal.calendar());
|
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
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ics.js",
|
"name": "ics.js",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"description": "A browser firendly .ics/.vcs file generator written entirely in javascript",
|
"description": "A browser firendly .ics/.vcs file generator written entirely in javascript",
|
||||||
"main": "icsjs",
|
"main": "icsjs",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/khornberg/ics.js.git"
|
"url": "https://github.com/nwcell/ics.js.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ics",
|
"ics",
|
||||||
@@ -30,6 +30,6 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/khornberg/ics.js/issues"
|
"url": "https://github.com/nwcell/ics.js/issues"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user