" +
- "
" +
+ "
" +
"
" +
htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) +
"
" +
- "
" +
- "
" +
"
" +
htmlEscape(event.title) +
"
" +
"
" +
- "
" +
- "
"; // close inner
+ "
";
if (seg.isEnd && isEventResizable(event)) {
html +=
"
=
";
@@ -3965,7 +4112,8 @@ function AgendaEventRenderer() {
var dis = opt('isRTL') ? -1 : 1;
var hoverListener = getHoverListener();
var colWidth = getColWidth();
- var slotHeight = getSlotHeight();
+ var snapHeight = getSnapHeight();
+ var snapMinutes = getSnapMinutes();
var minMinute = getMinMinute();
eventElement.draggable({
zIndex: 9,
@@ -3996,9 +4144,9 @@ function AgendaEventRenderer() {
eventElement.width(colWidth - 10); // don't use entire width
setOuterHeight(
eventElement,
- slotHeight * Math.round(
- (event.end ? ((event.end - event.start) / MINUTE_MS) : opt('defaultEventMinutes'))
- / opt('slotMinutes')
+ snapHeight * Math.round(
+ (event.end ? ((event.end - event.start) / MINUTE_MS) : opt('defaultEventMinutes')) /
+ snapMinutes
)
);
eventElement.draggable('option', 'grid', [colWidth, 1]);
@@ -4030,8 +4178,8 @@ function AgendaEventRenderer() {
// changed!
var minuteDelta = 0;
if (!allDay) {
- minuteDelta = Math.round((eventElement.offset().top - getBodyContent().offset().top) / slotHeight)
- * opt('slotMinutes')
+ minuteDelta = Math.round((eventElement.offset().top - getBodyContent().offset().top) / snapHeight)
+ * snapMinutes
+ minMinute
- (event.start.getHours() * 60 + event.start.getMinutes());
}
@@ -4064,11 +4212,12 @@ function AgendaEventRenderer() {
var hoverListener = getHoverListener();
var colCnt = getColCnt();
var colWidth = getColWidth();
- var slotHeight = getSlotHeight();
+ var snapHeight = getSnapHeight();
+ var snapMinutes = getSnapMinutes();
eventElement.draggable({
zIndex: 9,
scroll: false,
- grid: [colWidth, slotHeight],
+ grid: [colWidth, snapHeight],
axis: colCnt==1 ? 'y' : false,
opacity: opt('dragOpacity'),
revertDuration: opt('dragRevertDuration'),
@@ -4102,7 +4251,7 @@ function AgendaEventRenderer() {
}, ev, 'drag');
},
drag: function(ev, ui) {
- minuteDelta = Math.round((ui.position.top - origPosition.top) / slotHeight) * opt('slotMinutes');
+ minuteDelta = Math.round((ui.position.top - origPosition.top) / snapHeight) * snapMinutes;
if (minuteDelta != prevMinuteDelta) {
if (!allDay) {
updateTimeText(minuteDelta);
@@ -4139,7 +4288,7 @@ function AgendaEventRenderer() {
// convert back to original slot-event
if (allDay) {
timeElement.css('display', ''); // show() was causing display=inline
- eventElement.draggable('option', 'grid', [colWidth, slotHeight]);
+ eventElement.draggable('option', 'grid', [colWidth, snapHeight]);
allDay = false;
}
}
@@ -4152,38 +4301,39 @@ function AgendaEventRenderer() {
function resizableSlotEvent(event, eventElement, timeElement) {
- var slotDelta, prevSlotDelta;
- var slotHeight = getSlotHeight();
+ var snapDelta, prevSnapDelta;
+ var snapHeight = getSnapHeight();
+ var snapMinutes = getSnapMinutes();
eventElement.resizable({
handles: {
- s: 'div.ui-resizable-s'
+ s: '.ui-resizable-handle'
},
- grid: slotHeight,
+ grid: snapHeight,
start: function(ev, ui) {
- slotDelta = prevSlotDelta = 0;
+ snapDelta = prevSnapDelta = 0;
hideEvents(event, eventElement);
eventElement.css('z-index', 9);
trigger('eventResizeStart', this, event, ev, ui);
},
resize: function(ev, ui) {
// don't rely on ui.size.height, doesn't take grid into account
- slotDelta = Math.round((Math.max(slotHeight, eventElement.height()) - ui.originalSize.height) / slotHeight);
- if (slotDelta != prevSlotDelta) {
+ snapDelta = Math.round((Math.max(snapHeight, eventElement.height()) - ui.originalSize.height) / snapHeight);
+ if (snapDelta != prevSnapDelta) {
timeElement.text(
formatDates(
event.start,
- (!slotDelta && !event.end) ? null : // no change, so don't display time range
- addMinutes(eventEnd(event), opt('slotMinutes')*slotDelta),
+ (!snapDelta && !event.end) ? null : // no change, so don't display time range
+ addMinutes(eventEnd(event), snapMinutes*snapDelta),
opt('timeFormat')
)
);
- prevSlotDelta = slotDelta;
+ prevSnapDelta = snapDelta;
}
},
stop: function(ev, ui) {
trigger('eventResizeStop', this, event, ev, ui);
- if (slotDelta) {
- eventResize(this, event, 0, opt('slotMinutes')*slotDelta, ev, ui);
+ if (snapDelta) {
+ eventResize(this, event, 0, snapMinutes*snapDelta, ev, ui);
}else{
eventElement.css('z-index', 8);
showEvents(event, eventElement);
@@ -4215,6 +4365,8 @@ function countForwardSegs(levels) {
+;;
+
function View(element, calendar, viewName) {
var t = this;
@@ -4469,6 +4621,8 @@ function View(element, calendar, viewName) {
}
+;;
+
function DayEventRenderer() {
var t = this;
@@ -4606,28 +4760,22 @@ function DayEventRenderer() {
for (i=0; i
" +
- "";
+ "
";
if (!event.allDay && seg.isStart) {
html +=
"" +
@@ -4813,7 +4958,7 @@ function DayEventRenderer() {
var rowDivs = [];
for (i=0; i div'); // optimal selector?
+ .find('div.fc-day-content > div'); // optimal selector?
}
return rowDivs;
}
@@ -4856,7 +5001,7 @@ function DayEventRenderer() {
function resizableDayEvent(event, element, seg) {
var rtl = opt('isRTL');
var direction = rtl ? 'w' : 'e';
- var handle = element.find('div.ui-resizable-' + direction);
+ var handle = element.find('.ui-resizable-' + direction); // TODO: stop using this class because we aren't using jqui for this
var isResizing = false;
// TODO: look into using jquery-ui mouse widget for this stuff
@@ -4952,6 +5097,8 @@ function DayEventRenderer() {
}
+;;
+
//BUG: unselect needs to be triggered when events are dragged+dropped
function SelectionManager() {
@@ -5049,6 +5196,8 @@ function SelectionManager() {
}
+
+;;
function OverlayManager() {
var t = this;
@@ -5087,6 +5236,8 @@ function OverlayManager() {
}
+;;
+
function CoordinateGrid(buildFunc) {
var t = this;
@@ -5133,6 +5284,8 @@ function CoordinateGrid(buildFunc) {
}
+;;
+
function HoverListener(coordinateGrid) {
@@ -5191,6 +5344,8 @@ function _fixUIEvent(event) { // for issue 1168
event.pageY = event.originalEvent.pageY;
}
}
+;;
+
function HorizontalPositionCache(getElement) {
var t = this,
@@ -5218,4 +5373,6 @@ function HorizontalPositionCache(getElement) {
}
-})(jQuery);
+;;
+
+})(jQuery);
\ No newline at end of file