This commit is contained in:
Sean Kenny
2014-07-26 15:01:11 +01:00
parent 7f7e945a33
commit 58fdc57018
9 changed files with 26 additions and 23 deletions
+1
View File
@@ -517,6 +517,7 @@ function Calendar(element, instanceOptions) {
-----------------------------------------------------------------------------*/
// TODO: going forward, most of this stuff should be directly handled by the view
function refetchEvents() { // can be called as an API method
clearEvents();
fetchAndRenderEvents();
-1
View File
@@ -1,4 +1,3 @@
/// <reference path="../build/out/fullcalendar.min.js" />
fc.sourceNormalizers = [];
fc.sourceFetchers = [];
+2 -2
View File
@@ -98,11 +98,11 @@ function ResourceManager(options) {
data: data,
dataType: 'json',
cache: false,
success: function (res) {
success: function(res) {
res = res || [];
resources = res;
},
error: function () {
error: function() {
alert("ajax error getting json from " + url);
},
async: false // too much work coordinating callbacks so dumb it down
+1 -3
View File
@@ -446,9 +446,7 @@ function View(element, calendar, viewName) {
function rangeToSegments(start, end) {
var rowCnt = t.getRowCnt();
// HAAAACK! Can't really think of a way yet to get this working.
var colCnt = t.name === 'resourceDay' ? 1 : t.getColCnt();
var colCnt = t.getColCnt();
var segments = []; // array of segments to return
// day offset for given date range
+1 -1
View File
@@ -26,7 +26,7 @@ function ResourceDayView(element, calendar) {
}
skipHiddenDays(date, delta < 0 ? -1 : 1);
var start = cloneDate(date, true);
var start = date.cloneDate().stripTime();
var end = addDays(cloneDate(start), 1);
t.title = formatDate(date, opt('titleFormat'));
+6 -6
View File
@@ -237,8 +237,8 @@ function ResourceEventRenderer() {
}
}
left = leftmost + // leftmost possible
(availWidth / (levelI + forward + 1) * levelI) // indentation
* dis + (rtl ? availWidth - outerWidth : 0); // rtl
(availWidth / (levelI + forward + 1) * levelI) * // indentation
dis + (rtl ? availWidth - outerWidth : 0); // rtl
seg.top = top;
seg.left = left;
seg.outerWidth = outerWidth;
@@ -460,10 +460,10 @@ function ResourceEventRenderer() {
// changed!
var minuteDelta = 0;
if (!allDay) {
minuteDelta = Math.round((eventElement.offset().top - getSlotContainer().offset().top) / snapHeight)
* snapMinutes
+ minMinute
- (event.start.getHours() * 60 + event.start.getMinutes());
minuteDelta = Math.round((eventElement.offset().top - getSlotContainer().offset().top) / snapHeight) *
snapMinutes +
minMinute -
(event.start.getHours() * 60 + event.start.getMinutes());
}
eventDrop(this, event, dayDelta, minuteDelta, allDay, ev, ui);
}
-1
View File
@@ -1,4 +1,3 @@
setDefaults({
allDaySlot: true,
allDayText: 'all-day',