diff --git a/examples/basic.html b/examples/basic.html
index 576c6cf..f9f500b 100644
--- a/examples/basic.html
+++ b/examples/basic.html
@@ -33,14 +33,14 @@
start: "2009-05-18"
});*/
- $('#calendar').fullCalendar("removeEvent", 3);
+ //$('#calendar').fullCalendar("removeEvent", 3);
- /*var events = $('#calendar').fullCalendar('getEventsById', 2);
+ var events = $('#calendar').fullCalendar('getEventsById', 2);
var ev1 = events[0];
ev1.title = "yo";
ev1.start = '2009-05-14';
ev1.end = '2009-05-16';
- $('#calendar').fullCalendar('updateEvent', ev1);*/
+ $('#calendar').fullCalendar('updateEvent', ev1);
});
@@ -79,8 +79,7 @@
end: new Date(y, m, 29),
url: "http://facebook.com/"
}
- ],
- rightToLeft: false
+ ]
});
});
diff --git a/fullcalendar.js b/fullcalendar.js
index a32f120..36279ba 100644
--- a/fullcalendar.js
+++ b/fullcalendar.js
@@ -108,6 +108,8 @@
gotoMonth: gotoMonth,
refresh: updateMonth,
+ // event crud
+
addEvent: function(event) {
events.push(normalizeEvent(event));
clearEvents();
@@ -173,6 +175,26 @@
}
}
return res;
+ },
+
+ // event source crud
+
+ addEventSource: function(src) {
+ eventSources.push(src);
+ clearEvents();
+ renderEvents();
+ },
+
+ removeEventSource: function(src) {
+ var newSources = [];
+ for (var i=0; i