Merge remote-tracking branch 'jerrett/master'
This commit is contained in:
commit
572741f5f0
2 changed files with 4 additions and 13 deletions
|
@ -36,7 +36,6 @@ function EventManager(options, _sources) {
|
||||||
var stickySource = { events: [] };
|
var stickySource = { events: [] };
|
||||||
var sources = [ stickySource ];
|
var sources = [ stickySource ];
|
||||||
var rangeStart, rangeEnd;
|
var rangeStart, rangeEnd;
|
||||||
var offsetStart, offsetEnd;
|
|
||||||
var currentFetchID = 0;
|
var currentFetchID = 0;
|
||||||
var pendingSourceCnt = 0;
|
var pendingSourceCnt = 0;
|
||||||
var loadingLevel = 0;
|
var loadingLevel = 0;
|
||||||
|
@ -61,8 +60,6 @@ function EventManager(options, _sources) {
|
||||||
function fetchEvents(start, end) {
|
function fetchEvents(start, end) {
|
||||||
rangeStart = start;
|
rangeStart = start;
|
||||||
rangeEnd = end;
|
rangeEnd = end;
|
||||||
offsetStart = start.getTimezoneOffset()*60*1000;
|
|
||||||
offsetEnd = end.getTimezoneOffset()*60*1000;
|
|
||||||
cache = [];
|
cache = [];
|
||||||
var fetchID = ++currentFetchID;
|
var fetchID = ++currentFetchID;
|
||||||
var len = sources.length;
|
var len = sources.length;
|
||||||
|
@ -134,18 +131,10 @@ function EventManager(options, _sources) {
|
||||||
var startParam = firstDefined(source.startParam, options.startParam);
|
var startParam = firstDefined(source.startParam, options.startParam);
|
||||||
var endParam = firstDefined(source.endParam, options.endParam);
|
var endParam = firstDefined(source.endParam, options.endParam);
|
||||||
if (startParam) {
|
if (startParam) {
|
||||||
var tmpstart = rangeStart;
|
data[startParam] = (options.startEndDateOnly) ? (rangeStart.getYear()+'-'+(rangeStart.getMonth()+1)+'-'+rangeStart.getDate()) : Math.round(+rangeStart / 1000);
|
||||||
if (source.startParamUTC) {
|
|
||||||
tmpstart -= offsetStart;
|
|
||||||
}
|
|
||||||
data[startParam] = Math.round(+tmpstart / 1000);
|
|
||||||
}
|
}
|
||||||
if (endParam) {
|
if (endParam) {
|
||||||
var tmpend = rangeEnd;
|
data[endParam] = (options.startEndDateOnly) ? (rangeEnd.getYear()+'-'+(rangeEnd.getMonth()+1)+'-'+rangeEnd.getDate()) : Math.round(+rangeEnd / 1000);
|
||||||
if (source.endParamUTC) {
|
|
||||||
tmpend -= offsetEnd;
|
|
||||||
}
|
|
||||||
data[endParam] = Math.round(+tmpend / 1000);
|
|
||||||
}
|
}
|
||||||
pushLoading();
|
pushLoading();
|
||||||
$.ajax($.extend({}, ajaxDefaults, source, {
|
$.ajax($.extend({}, ajaxDefaults, source, {
|
||||||
|
|
|
@ -19,10 +19,12 @@ var defaults = {
|
||||||
allDayDefault: true,
|
allDayDefault: true,
|
||||||
ignoreTimezone: true,
|
ignoreTimezone: true,
|
||||||
|
|
||||||
|
|
||||||
// event ajax
|
// event ajax
|
||||||
lazyFetching: true,
|
lazyFetching: true,
|
||||||
startParam: 'start',
|
startParam: 'start',
|
||||||
endParam: 'end',
|
endParam: 'end',
|
||||||
|
startEndDateOnly: false,
|
||||||
|
|
||||||
// time formats
|
// time formats
|
||||||
titleFormat: {
|
titleFormat: {
|
||||||
|
|
Loading…
Reference in a new issue