我没有在列表视图的完整日历中使用Ajax。 我在日历的列表视图中添加了按钮。 我添加了Ajax方法和按钮。其他代码由fullcalendar.io创建。我如何使用Ajax发布。 这不起作用。控制台不显示日志。我找不到错误。
请帮帮我......
fgSegHtml: function(seg) {
var view = this.view;
var calendar = view.calendar;
var theme = calendar.theme;
var classes = [ 'fc-list-item' ].concat(this.getSegCustomClasses(seg));
var bgColor = this.getSegBackgroundColor(seg);
var success = eventDef.miscProps.success;
var id = eventDef.id;
var timeHtml;
if (componentFootprint.isAllDay) {
timeHtml = view.getAllDayHtml();
}
else if (view.isMultiDayRange(componentFootprint.unzonedRange){
if (seg.isStart || seg.isEnd) {
timeHtml = htmlEscape(this._getEventTimeText(
calendar.msToMoment(seg.startMs),
calendar.msToMoment(seg.endMs),
componentFootprint.isAllDay
));
}
else {
timeHtml = view.getAllDayHtml();
}
}
else {
// Display the normal time text for the *event's* times
timeHtml = htmlEscape(this.getEventTimeText(eventFootprint));
}
if (url) {
classes.push('fc-has-url');
}
return '<tr class="' + classes.join(' ') + '">' +
(this.displayEventTime ?
'<td class="fc-list-item-time ' + theme.getClass('widgetContent') + '">' +
(timeHtml || '') +
'</td>' :
'') +
'<td class="fc-list-item-marker ' + theme.getClass('widgetContent') + '">' +
'<span class="fc-event-dot"' +
(bgColor ?
' style="background-color:' + bgColor + '"' :
'') +
'></span>' +
'</td>' +
'<td class="fc-list-item-title ' + theme.getClass('widgetContent') + '">' +
'<a' + (url ? ' href="' + htmlEscape(url) + '"' : '') + '>' +
htmlEscape(eventDef.title || '') +
'</a>' +
'</td>' +
'<td class="fc-list-item-title fc-widget-content"><input type="button" class="btn btn-danger" id="del" value="Sil">'+htmlEscape(eventDef.miscProps.success)+'</input></td>' +
'</tr>';
}
});
;;
$('#del').click(function(){
var id = eventDef.id;
$.ajax({
type : 'POST',
url : '../../../app/ajaxdelete.php',
data : {"id":id},
success: function(sd){
console.log(sd);
}
});
});