Merge remote-tracking branch 'adobo/master'

This commit is contained in:
Wojciech Zylinski 2012-01-08 03:18:05 +00:00
commit f800f3c492
2 changed files with 14 additions and 3 deletions

View file

@ -36,6 +36,7 @@ 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;
@ -60,6 +61,8 @@ 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;
@ -130,10 +133,18 @@ 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) {
data[startParam] = Math.round(+rangeStart / 1000); var tmpstart = rangeStart;
if (source.startParamUTC) {
tmpstart -= offsetStart;
}
data[startParam] = Math.round(+tmpstart / 1000);
} }
if (endParam) { if (endParam) {
data[endParam] = Math.round(+rangeEnd / 1000); var tmpend = rangeEnd;
if (source.endParamUTC) {
tmpend -= offsetEnd;
}
data[endParam] = Math.round(+tmpend / 1000);
} }
pushLoading(); pushLoading();
$.ajax($.extend({}, ajaxDefaults, source, { $.ajax($.extend({}, ajaxDefaults, source, {

View file

@ -71,7 +71,7 @@ function Header(calendar, options) {
var icon = options.theme ? smartProperty(options.buttonIcons, buttonName) : null; // why are we using smartProperty here? var icon = options.theme ? smartProperty(options.buttonIcons, buttonName) : null; // why are we using smartProperty here?
var text = smartProperty(options.buttonText, buttonName); // why are we using smartProperty here? var text = smartProperty(options.buttonText, buttonName); // why are we using smartProperty here?
var button = $( var button = $(
"<span class='fc-button fc-button-" + buttonName + " " + tm + "-state-default'>" + "<span class='fc-button "+(tm == 'ui' ? 'ui-button' : '')+" fc-button-" + buttonName + " " + tm + "-state-default'>" +
"<span class='fc-button-inner'>" + "<span class='fc-button-inner'>" +
"<span class='fc-button-content'>" + "<span class='fc-button-content'>" +
(icon ? (icon ?