diff --git a/.meteor/packages b/.meteor/packages index 7eef4d5..e49d91b 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -42,3 +42,4 @@ coderstv:chat meteorhacks:kadira cottz:publish-relations manuelschoebel:ms-seo +pfafman:filesaver diff --git a/.meteor/versions b/.meteor/versions index eb8dfbe..c22a3ef 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -76,6 +76,7 @@ oauth2@1.1.2 observe-sequence@1.0.4 ordered-dict@1.0.2 patrickleet:tags@1.1.3 +pfafman:filesaver@0.2.0_1 raix:handlebar-helpers@0.2.4 random@1.0.2 reactive-dict@1.0.5 diff --git a/client/lib/ics-calendar.js b/client/lib/ics-calendar.js new file mode 100644 index 0000000..2c16d20 --- /dev/null +++ b/client/lib/ics-calendar.js @@ -0,0 +1,23 @@ +ics = {}; + +ics.createFile = function (data) { + 'use strict'; + var calendar = 'BEGIN:VCALENDAR\r\n' + +'CALSCALE:GREGORIAN\r\n' + +'PRODID:-//CodersTV//Calendar CodersTV//EN\r\n' + +'VERSION:2.0\r\n' + +'BEGIN:VEVENT\r\n' + +'LOCATION:CodersTV - http://coderstv.com\r\n' + +'DTSTART;TZID=America/Sao_Paulo:'+ moment().add(1, 'day').format('YYYYMMDDTHHmmss') + '\r\n' + +'DTEND;TZID=America/Sao_Paulo:'+ moment().add(1, 'day').format('YYYYMMDDTHHmmss') + '\r\n' + +'DESCRIPTION: '+ data.description.substring(0, 50) + '\r\n' + +'SUMMARY:CodersTV - '+ data.title.substring(0, 25) + ' \r\n' + +'BEGIN:VALARM\r\n' + +'TRIGGER:-PT1H\r\n' + +'ACTION:DISPLAY\r\n' + +'END:VALARM\r\n' + +'ORGANIZER;CN="CodersTV":mailto:help@coderstv.com\r\n' + +'END:VEVENT\r\n' + +'END:VCALENDAR\r\n'; + return calendar; +}; diff --git a/client/views/agenda/agenda.html b/client/views/agenda/agenda.html index ab3779c..87711be 100644 --- a/client/views/agenda/agenda.html +++ b/client/views/agenda/agenda.html @@ -14,7 +14,7 @@