mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-07-09 00:20:27 +08:00
allow eventLimitClick to return a value
This commit is contained in:
@@ -192,14 +192,9 @@ $.extend(DayGrid.prototype, {
|
||||
var reslicedAllSegs = _this.resliceDaySegs(allSegs, date);
|
||||
var reslicedHiddenSegs = _this.resliceDaySegs(hiddenSegs, date);
|
||||
|
||||
if (clickOption === 'popover') {
|
||||
_this.showSegPopover(date, cell, moreEl, reslicedAllSegs);
|
||||
}
|
||||
else if (typeof clickOption === 'string') { // a view name
|
||||
view.calendar.zoomTo(date, clickOption);
|
||||
}
|
||||
else if (typeof clickOption === 'function') {
|
||||
view.trigger('eventLimitClick', null, {
|
||||
if (typeof clickOption === 'function') {
|
||||
// the returned value can be an atomic option
|
||||
clickOption = view.trigger('eventLimitClick', null, {
|
||||
date: date,
|
||||
dayEl: dayEl,
|
||||
moreEl: moreEl,
|
||||
@@ -207,6 +202,13 @@ $.extend(DayGrid.prototype, {
|
||||
hiddenSegs: reslicedHiddenSegs
|
||||
}, ev);
|
||||
}
|
||||
|
||||
if (clickOption === 'popover') {
|
||||
_this.showSegPopover(date, cell, moreEl, reslicedAllSegs);
|
||||
}
|
||||
else if (typeof clickOption === 'string') { // a view name
|
||||
view.calendar.zoomTo(date, clickOption);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user