CC-4873: Airtime takes 7 seconds to load 32K (very small) from db
-we know what month will be the initial view for the user. -Provide this data ahead of time.
This commit is contained in:
parent
548b73db42
commit
091f5ff49f
3 changed files with 50 additions and 12 deletions
|
@ -326,19 +326,26 @@ function eventResize( event, dayDelta, minuteDelta, revertFunc, jsEvent, ui, vie
|
|||
});
|
||||
}
|
||||
|
||||
var initialLoad = true;
|
||||
function getFullCalendarEvents(start, end, callback) {
|
||||
var url, start_date, end_date;
|
||||
|
||||
start_date = makeTimeStamp(start);
|
||||
end_date = makeTimeStamp(end);
|
||||
|
||||
url = baseUrl+'Schedule/event-feed';
|
||||
|
||||
var d = new Date();
|
||||
|
||||
$.post(url, {format: "json", start: start_date, end: end_date, cachep: d.getTime()}, function(json){
|
||||
callback(json.events);
|
||||
});
|
||||
if (initialLoad) {
|
||||
initialLoad = false;
|
||||
callback(calendarEvents);
|
||||
} else {
|
||||
var url, start_date, end_date;
|
||||
|
||||
start_date = makeTimeStamp(start);
|
||||
end_date = makeTimeStamp(end);
|
||||
url = baseUrl+'Schedule/event-feed';
|
||||
|
||||
var d = new Date();
|
||||
$.post(url, {format: "json", start: start_date, end: end_date, cachep: d.getTime()}, function(json){
|
||||
callback(json.events);
|
||||
});
|
||||
}
|
||||
//TODO: Look at the type of calendar view...we may be returning too much information
|
||||
|
||||
}
|
||||
|
||||
function checkSCUploadStatus(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue