mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-09-12 12:21:04 +08:00
.
This commit is contained in:
@@ -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,4 +1,3 @@
|
||||
/// <reference path="../build/out/fullcalendar.min.js" />
|
||||
|
||||
fc.sourceNormalizers = [];
|
||||
fc.sourceFetchers = [];
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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'));
|
||||
|
||||
@@ -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,4 +1,3 @@
|
||||
|
||||
setDefaults({
|
||||
allDaySlot: true,
|
||||
allDayText: 'all-day',
|
||||
|
||||
Reference in New Issue
Block a user