From 6b9f6de931fb3d20b5ce729d02ec879baf18f014 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Mon, 25 May 2009 17:26:13 +0000 Subject: [PATCH] fixed weekStart bug --- examples/basic.html | 9 ++++----- fullcalendar.js | 24 +++++++++++++++++++++++- 2 files changed, 27 insertions(+), 6 deletions(-) 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