My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions

Issue 1061 attachment: fc-refetch-source.diff (1.1 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- fullcalendar.js.orig 2011-04-09 14:13:16.000000000 +0200
+++ fullcalendar.js 2011-07-30 15:31:31.000000000 +0200
@@ -500,8 +500,8 @@
}


- function refetchEvents() {
- fetchEvents(currentView.visStart, currentView.visEnd); // will call reportEvents
+ function refetchEvents(source) {
+ fetchEvents(currentView.visStart, currentView.visEnd, source); // will call reportEvents
}


@@ -897,15 +897,16 @@
}


- function fetchEvents(start, end) {
+ function fetchEvents(start, end, src) {
rangeStart = start;
rangeEnd = end;
- cache = [];
+ cache = typeof src != 'undefined' ? $.grep(cache, function(e) { return !isSourcesEqual(e.source, src); }) : [];
var fetchID = ++currentFetchID;
var len = sources.length;
- pendingSourceCnt = len;
+ pendingSourceCnt = typeof src == 'undefined' ? len : 1;
for (var i=0; i<len; i++) {
- fetchEventSource(sources[i], fetchID);
+ if (typeof src == 'undefined' || isSourcesEqual(sources[i], src))
+ fetchEventSource(sources[i], fetchID);
}
}

@@ -5204,5 +5205,5 @@
};

}
-
+
})(jQuery);
\ No newline at end of file
Powered by Google Project Hosting