Added iCal feed for the calendar, reachable through

/feed/calendar/NzbDrone.ics or through the calendar page.
This commit is contained in:
Peter Czyz
2014-03-03 16:18:56 +01:00
committed by Taloth
parent 7445adb455
commit cf1e0a4946
10 changed files with 165 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
'use strict';
define(
[
'marionette',
], function (Marionette) {
return Marionette.Layout.extend({
template: 'Calendar/CalendarFeedViewTemplate',
onRender: function() {
// hackish way to determine the correct url, as using urlBase seems to only work for reverse proxies or so
var ics = '//' + window.location.host + '/feed/calendar/NzbDrone.ics';
this.$('#ical-url').val(window.location.protocol + ics);
this.$('#ical-subscribe-button').attr('href', 'webcal:' + ics);
}
});
});