|
|
@@ -8,6 +8,12 @@ var GcalEventSource = EventSource.extend({
|
|
|
ajaxSettings: null,
|
|
|
|
|
|
|
|
|
+ constructor: function() {
|
|
|
+ EventSource.apply(this, arguments);
|
|
|
+ this.ajaxSettings = {};
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
fetch: function(start, end, timezone) {
|
|
|
var _this = this;
|
|
|
var url = this.buildUrl();
|
|
|
@@ -160,8 +166,8 @@ var GcalEventSource = EventSource.extend({
|
|
|
},
|
|
|
|
|
|
|
|
|
- applyManualRawProps: function(rawProps) {
|
|
|
- var superSuccess = EventSource.prototype.applyManualRawProps.apply(this, arguments);
|
|
|
+ applyManualStandardProps: function(rawProps) {
|
|
|
+ var superSuccess = EventSource.prototype.applyManualStandardProps.apply(this, arguments);
|
|
|
var googleCalendarId = rawProps.googleCalendarId;
|
|
|
|
|
|
if (googleCalendarId == null && rawProps.url) {
|
|
|
@@ -178,8 +184,8 @@ var GcalEventSource = EventSource.extend({
|
|
|
},
|
|
|
|
|
|
|
|
|
- applyOtherRawProps: function(rawProps) {
|
|
|
- this.ajaxSettings = rawProps;
|
|
|
+ applyMiscProps: function(rawProps) {
|
|
|
+ $.extend(this.ajaxSettings, rawProps);
|
|
|
}
|
|
|
|
|
|
});
|
|
|
@@ -188,7 +194,7 @@ var GcalEventSource = EventSource.extend({
|
|
|
GcalEventSource.API_BASE = 'https://www.googleapis.com/calendar/v3/calendars';
|
|
|
|
|
|
|
|
|
-GcalEventSource.allowRawProps({
|
|
|
+GcalEventSource.defineStandardProps({
|
|
|
// manually process...
|
|
|
url: false,
|
|
|
googleCalendarId: false,
|
|
|
@@ -202,7 +208,7 @@ GcalEventSource.allowRawProps({
|
|
|
GcalEventSource.parse = function(rawInput, calendar) {
|
|
|
var rawProps;
|
|
|
|
|
|
- if (typeof rawInput === 'object') { // long form. might fail in applyManualRawProps
|
|
|
+ if (typeof rawInput === 'object') { // long form. might fail in applyManualStandardProps
|
|
|
rawProps = rawInput;
|
|
|
}
|
|
|
else if (typeof rawInput === 'string') { // short form
|