mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Updated AdminLTE to 3.04 assets, added search to side bar, added company select drop down on sidebar. removed extra delete under edit contact
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
FullCalendar Interaction Plugin v4.3.0
|
||||
FullCalendar Interaction Plugin v4.4.0
|
||||
Docs & License: https://fullcalendar.io/
|
||||
(c) 2019 Adam Shaw
|
||||
*/
|
||||
@@ -1130,11 +1130,12 @@ Docs & License: https://fullcalendar.io/
|
||||
// won't even fire if moving was ignored
|
||||
_this.handleDragEnd = function (ev) {
|
||||
var component = _this.component;
|
||||
var _a = component.context, calendar = _a.calendar, view = _a.view;
|
||||
var pointer = _this.dragging.pointer;
|
||||
if (!pointer.wasTouchScroll) {
|
||||
var _a = _this.hitDragging, initialHit = _a.initialHit, finalHit = _a.finalHit;
|
||||
var _b = _this.hitDragging, initialHit = _b.initialHit, finalHit = _b.finalHit;
|
||||
if (initialHit && finalHit && isHitsEqual(initialHit, finalHit)) {
|
||||
component.calendar.triggerDateClick(initialHit.dateSpan, initialHit.dayEl, component.view, ev.origEvent);
|
||||
calendar.triggerDateClick(initialHit.dateSpan, initialHit.dayEl, view, ev.origEvent);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1164,7 +1165,8 @@ Docs & License: https://fullcalendar.io/
|
||||
_this.dragSelection = null;
|
||||
_this.handlePointerDown = function (ev) {
|
||||
var _a = _this, component = _a.component, dragging = _a.dragging;
|
||||
var canSelect = component.opt('selectable') &&
|
||||
var options = component.context.options;
|
||||
var canSelect = options.selectable &&
|
||||
component.isValidDateDownEl(ev.origEvent.target);
|
||||
// don't bother to watch expensive moves if component won't do selection
|
||||
dragging.setIgnoreMove(!canSelect);
|
||||
@@ -1172,10 +1174,10 @@ Docs & License: https://fullcalendar.io/
|
||||
dragging.delay = ev.isTouch ? getComponentTouchDelay(component) : null;
|
||||
};
|
||||
_this.handleDragStart = function (ev) {
|
||||
_this.component.calendar.unselect(ev); // unselect previous selections
|
||||
_this.component.context.calendar.unselect(ev); // unselect previous selections
|
||||
};
|
||||
_this.handleHitUpdate = function (hit, isFinal) {
|
||||
var calendar = _this.component.calendar;
|
||||
var calendar = _this.component.context.calendar;
|
||||
var dragSelection = null;
|
||||
var isInvalid = false;
|
||||
if (hit) {
|
||||
@@ -1204,15 +1206,16 @@ Docs & License: https://fullcalendar.io/
|
||||
_this.handlePointerUp = function (pev) {
|
||||
if (_this.dragSelection) {
|
||||
// selection is already rendered, so just need to report selection
|
||||
_this.component.calendar.triggerDateSelect(_this.dragSelection, pev);
|
||||
_this.component.context.calendar.triggerDateSelect(_this.dragSelection, pev);
|
||||
_this.dragSelection = null;
|
||||
}
|
||||
};
|
||||
var component = settings.component;
|
||||
var options = component.context.options;
|
||||
var dragging = _this.dragging = new FeaturefulElementDragging(component.el);
|
||||
dragging.touchScrollAllowed = false;
|
||||
dragging.minDistance = component.opt('selectMinDistance') || 0;
|
||||
dragging.autoScroller.isEnabled = component.opt('dragScroll');
|
||||
dragging.minDistance = options.selectMinDistance || 0;
|
||||
dragging.autoScroller.isEnabled = options.dragScroll;
|
||||
var hitDragging = _this.hitDragging = new HitDragging(_this.dragging, core.interactionSettingsToStore(settings));
|
||||
hitDragging.emitter.on('pointerdown', _this.handlePointerDown);
|
||||
hitDragging.emitter.on('dragstart', _this.handleDragStart);
|
||||
@@ -1226,9 +1229,10 @@ Docs & License: https://fullcalendar.io/
|
||||
return DateSelecting;
|
||||
}(core.Interaction));
|
||||
function getComponentTouchDelay(component) {
|
||||
var delay = component.opt('selectLongPressDelay');
|
||||
var options = component.context.options;
|
||||
var delay = options.selectLongPressDelay;
|
||||
if (delay == null) {
|
||||
delay = component.opt('longPressDelay');
|
||||
delay = options.longPressDelay;
|
||||
}
|
||||
return delay;
|
||||
}
|
||||
@@ -1274,19 +1278,20 @@ Docs & License: https://fullcalendar.io/
|
||||
var origTarget = ev.origEvent.target;
|
||||
var _a = _this, component = _a.component, dragging = _a.dragging;
|
||||
var mirror = dragging.mirror;
|
||||
var initialCalendar = component.calendar;
|
||||
var options = component.context.options;
|
||||
var initialCalendar = component.context.calendar;
|
||||
var subjectSeg = _this.subjectSeg = core.getElSeg(ev.subjectEl);
|
||||
var eventRange = _this.eventRange = subjectSeg.eventRange;
|
||||
var eventInstanceId = eventRange.instance.instanceId;
|
||||
_this.relevantEvents = core.getRelevantEvents(initialCalendar.state.eventStore, eventInstanceId);
|
||||
dragging.minDistance = ev.isTouch ? 0 : component.opt('eventDragMinDistance');
|
||||
dragging.minDistance = ev.isTouch ? 0 : options.eventDragMinDistance;
|
||||
dragging.delay =
|
||||
// only do a touch delay if touch and this event hasn't been selected yet
|
||||
(ev.isTouch && eventInstanceId !== component.props.eventSelection) ?
|
||||
getComponentTouchDelay$1(component) :
|
||||
null;
|
||||
mirror.parentNode = initialCalendar.el;
|
||||
mirror.revertDuration = component.opt('dragRevertDuration');
|
||||
mirror.revertDuration = options.dragRevertDuration;
|
||||
var isValid = component.isValidSegDownEl(origTarget) &&
|
||||
!core.elementClosest(origTarget, '.fc-resizer'); // NOT on a resizer
|
||||
dragging.setIgnoreMove(!isValid);
|
||||
@@ -1296,7 +1301,8 @@ Docs & License: https://fullcalendar.io/
|
||||
ev.subjectEl.classList.contains('fc-draggable');
|
||||
};
|
||||
_this.handleDragStart = function (ev) {
|
||||
var initialCalendar = _this.component.calendar;
|
||||
var context = _this.component.context;
|
||||
var initialCalendar = context.calendar;
|
||||
var eventRange = _this.eventRange;
|
||||
var eventInstanceId = eventRange.instance.instanceId;
|
||||
if (ev.isTouch) {
|
||||
@@ -1316,7 +1322,7 @@ Docs & License: https://fullcalendar.io/
|
||||
el: _this.subjectSeg.el,
|
||||
event: new core.EventApi(initialCalendar, eventRange.def, eventRange.instance),
|
||||
jsEvent: ev.origEvent,
|
||||
view: _this.component.view
|
||||
view: context.view
|
||||
}
|
||||
]);
|
||||
}
|
||||
@@ -1327,7 +1333,7 @@ Docs & License: https://fullcalendar.io/
|
||||
}
|
||||
var relevantEvents = _this.relevantEvents;
|
||||
var initialHit = _this.hitDragging.initialHit;
|
||||
var initialCalendar = _this.component.calendar;
|
||||
var initialCalendar = _this.component.context.calendar;
|
||||
// states based on new hit
|
||||
var receivingCalendar = null;
|
||||
var mutation = null;
|
||||
@@ -1341,9 +1347,10 @@ Docs & License: https://fullcalendar.io/
|
||||
};
|
||||
if (hit) {
|
||||
var receivingComponent = hit.component;
|
||||
receivingCalendar = receivingComponent.calendar;
|
||||
receivingCalendar = receivingComponent.context.calendar;
|
||||
var receivingOptions = receivingComponent.context.options;
|
||||
if (initialCalendar === receivingCalendar ||
|
||||
receivingComponent.opt('editable') && receivingComponent.opt('droppable')) {
|
||||
receivingOptions.editable && receivingOptions.droppable) {
|
||||
mutation = computeEventMutation(initialHit, hit, receivingCalendar.pluginSystem.hooks.eventDragMutationMassagers);
|
||||
if (mutation) {
|
||||
mutatedRelevantEvents = core.applyMutationToEventStore(relevantEvents, receivingCalendar.eventUiBases, mutation, receivingCalendar);
|
||||
@@ -1389,8 +1396,9 @@ Docs & License: https://fullcalendar.io/
|
||||
};
|
||||
_this.handleDragEnd = function (ev) {
|
||||
if (_this.isDragging) {
|
||||
var initialCalendar_1 = _this.component.calendar;
|
||||
var initialView = _this.component.view;
|
||||
var context = _this.component.context;
|
||||
var initialCalendar_1 = context.calendar;
|
||||
var initialView = context.view;
|
||||
var _a = _this, receivingCalendar = _a.receivingCalendar, validMutation = _a.validMutation;
|
||||
var eventDef = _this.eventRange.def;
|
||||
var eventInstance = _this.eventRange.instance;
|
||||
@@ -1471,10 +1479,11 @@ Docs & License: https://fullcalendar.io/
|
||||
_this.cleanup();
|
||||
};
|
||||
var component = _this.component;
|
||||
var options = component.context.options;
|
||||
var dragging = _this.dragging = new FeaturefulElementDragging(component.el);
|
||||
dragging.pointer.selector = EventDragging.SELECTOR;
|
||||
dragging.touchScrollAllowed = false;
|
||||
dragging.autoScroller.isEnabled = component.opt('dragScroll');
|
||||
dragging.autoScroller.isEnabled = options.dragScroll;
|
||||
var hitDragging = _this.hitDragging = new HitDragging(_this.dragging, core.interactionSettingsStore);
|
||||
hitDragging.useSubjectCenter = settings.useEventCenter;
|
||||
hitDragging.emitter.on('pointerdown', _this.handlePointerDown);
|
||||
@@ -1489,7 +1498,7 @@ Docs & License: https://fullcalendar.io/
|
||||
};
|
||||
// render a drag state on the next receivingCalendar
|
||||
EventDragging.prototype.displayDrag = function (nextCalendar, state) {
|
||||
var initialCalendar = this.component.calendar;
|
||||
var initialCalendar = this.component.context.calendar;
|
||||
var prevCalendar = this.receivingCalendar;
|
||||
// does the previous calendar need to be cleared?
|
||||
if (prevCalendar && prevCalendar !== nextCalendar) {
|
||||
@@ -1516,7 +1525,7 @@ Docs & License: https://fullcalendar.io/
|
||||
}
|
||||
};
|
||||
EventDragging.prototype.clearDrag = function () {
|
||||
var initialCalendar = this.component.calendar;
|
||||
var initialCalendar = this.component.context.calendar;
|
||||
var receivingCalendar = this.receivingCalendar;
|
||||
if (receivingCalendar) {
|
||||
receivingCalendar.dispatch({ type: 'UNSET_EVENT_DRAG' });
|
||||
@@ -1546,14 +1555,14 @@ Docs & License: https://fullcalendar.io/
|
||||
var standardProps = {};
|
||||
if (dateSpan0.allDay !== dateSpan1.allDay) {
|
||||
standardProps.allDay = dateSpan1.allDay;
|
||||
standardProps.hasEnd = hit1.component.opt('allDayMaintainDuration');
|
||||
standardProps.hasEnd = hit1.component.context.options.allDayMaintainDuration;
|
||||
if (dateSpan1.allDay) {
|
||||
// means date1 is already start-of-day,
|
||||
// but date0 needs to be converted
|
||||
date0 = core.startOfDay(date0);
|
||||
}
|
||||
}
|
||||
var delta = core.diffDates(date0, date1, hit0.component.dateEnv, hit0.component === hit1.component ?
|
||||
var delta = core.diffDates(date0, date1, hit0.component.context.dateEnv, hit0.component === hit1.component ?
|
||||
hit0.component.largeUnit :
|
||||
null);
|
||||
if (delta.milliseconds) { // has hours/minutes/seconds
|
||||
@@ -1570,9 +1579,10 @@ Docs & License: https://fullcalendar.io/
|
||||
return mutation;
|
||||
}
|
||||
function getComponentTouchDelay$1(component) {
|
||||
var delay = component.opt('eventLongPressDelay');
|
||||
var options = component.context.options;
|
||||
var delay = options.eventLongPressDelay;
|
||||
if (delay == null) {
|
||||
delay = component.opt('longPressDelay');
|
||||
delay = options.longPressDelay;
|
||||
}
|
||||
return delay;
|
||||
}
|
||||
@@ -1591,13 +1601,13 @@ Docs & License: https://fullcalendar.io/
|
||||
var component = _this.component;
|
||||
var seg = _this.querySeg(ev);
|
||||
var eventRange = _this.eventRange = seg.eventRange;
|
||||
_this.dragging.minDistance = component.opt('eventDragMinDistance');
|
||||
_this.dragging.minDistance = component.context.options.eventDragMinDistance;
|
||||
// if touch, need to be working with a selected event
|
||||
_this.dragging.setIgnoreMove(!_this.component.isValidSegDownEl(ev.origEvent.target) ||
|
||||
(ev.isTouch && _this.component.props.eventSelection !== eventRange.instance.instanceId));
|
||||
};
|
||||
_this.handleDragStart = function (ev) {
|
||||
var calendar = _this.component.calendar;
|
||||
var _a = _this.component.context, calendar = _a.calendar, view = _a.view;
|
||||
var eventRange = _this.eventRange;
|
||||
_this.relevantEvents = core.getRelevantEvents(calendar.state.eventStore, _this.eventRange.instance.instanceId);
|
||||
_this.draggingSeg = _this.querySeg(ev);
|
||||
@@ -1607,12 +1617,12 @@ Docs & License: https://fullcalendar.io/
|
||||
el: _this.draggingSeg.el,
|
||||
event: new core.EventApi(calendar, eventRange.def, eventRange.instance),
|
||||
jsEvent: ev.origEvent,
|
||||
view: _this.component.view
|
||||
view: view
|
||||
}
|
||||
]);
|
||||
};
|
||||
_this.handleHitUpdate = function (hit, isFinal, ev) {
|
||||
var calendar = _this.component.calendar;
|
||||
var calendar = _this.component.context.calendar;
|
||||
var relevantEvents = _this.relevantEvents;
|
||||
var initialHit = _this.hitDragging.initialHit;
|
||||
var eventInstance = _this.eventRange.instance;
|
||||
@@ -1662,8 +1672,7 @@ Docs & License: https://fullcalendar.io/
|
||||
}
|
||||
};
|
||||
_this.handleDragEnd = function (ev) {
|
||||
var calendar = _this.component.calendar;
|
||||
var view = _this.component.view;
|
||||
var _a = _this.component.context, calendar = _a.calendar, view = _a.view;
|
||||
var eventDef = _this.eventRange.def;
|
||||
var eventInstance = _this.eventRange.instance;
|
||||
var eventApi = new core.EventApi(calendar, eventDef, eventInstance);
|
||||
@@ -1714,7 +1723,7 @@ Docs & License: https://fullcalendar.io/
|
||||
var dragging = _this.dragging = new FeaturefulElementDragging(component.el);
|
||||
dragging.pointer.selector = '.fc-resizer';
|
||||
dragging.touchScrollAllowed = false;
|
||||
dragging.autoScroller.isEnabled = component.opt('dragScroll');
|
||||
dragging.autoScroller.isEnabled = component.context.options.dragScroll;
|
||||
var hitDragging = _this.hitDragging = new HitDragging(_this.dragging, core.interactionSettingsToStore(settings));
|
||||
hitDragging.emitter.on('pointerdown', _this.handlePointerDown);
|
||||
hitDragging.emitter.on('dragstart', _this.handleDragStart);
|
||||
@@ -1731,7 +1740,7 @@ Docs & License: https://fullcalendar.io/
|
||||
return EventDragging;
|
||||
}(core.Interaction));
|
||||
function computeMutation(hit0, hit1, isFromStart, instanceRange, transforms) {
|
||||
var dateEnv = hit0.component.dateEnv;
|
||||
var dateEnv = hit0.component.context.dateEnv;
|
||||
var date0 = hit0.dateSpan.range.start;
|
||||
var date1 = hit1.dateSpan.range.start;
|
||||
var delta = core.diffDates(date0, date1, dateEnv, hit0.component.largeUnit);
|
||||
@@ -1836,7 +1845,7 @@ Docs & License: https://fullcalendar.io/
|
||||
origSeg: null
|
||||
};
|
||||
if (hit) {
|
||||
receivingCalendar = hit.component.calendar;
|
||||
receivingCalendar = hit.component.context.calendar;
|
||||
if (_this.canDropElOnCalendar(ev.subjectEl, receivingCalendar)) {
|
||||
droppableEvent = computeEventForDateSpan(hit.dateSpan, _this.dragMeta, receivingCalendar);
|
||||
interaction.mutatedEvents = core.eventTupleToStore(droppableEvent);
|
||||
@@ -1868,7 +1877,7 @@ Docs & License: https://fullcalendar.io/
|
||||
_this.clearDrag();
|
||||
if (receivingCalendar && droppableEvent) {
|
||||
var finalHit = _this.hitDragging.finalHit;
|
||||
var finalView = finalHit.component.view;
|
||||
var finalView = finalHit.component.context.view;
|
||||
var dragMeta = _this.dragMeta;
|
||||
var arg = __assign({}, receivingCalendar.buildDatePointApi(finalHit.dateSpan), { draggedEl: pev.subjectEl, jsEvent: pev.origEvent, view: finalView });
|
||||
receivingCalendar.publiclyTrigger('drop', [arg]);
|
||||
|
||||
Reference in New Issue
Block a user