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 eventFootprint = seg.footprint;
var eventDef = eventFootprint.eventDef;
var componentFootprint = eventFootprint.componentFootprint;
var url = eventDef.url;
var success = eventDef.miscProps.success;
var id = eventDef.id;
var timeHtml;
console.log(eventDef);
if (componentFootprint.isAllDay) {
timeHtml = view.getAllDayHtml();
}
// if the event appears to span more than one day
else if (view.isMultiDayRange(componentFootprint.unzonedRange)) {
if (seg.isStart || seg.isEnd) { // outer segment that probably lasts part of the day
timeHtml = htmlEscape(this._getEventTimeText(
calendar.msToMoment(seg.startMs),
calendar.msToMoment(seg.endMs),
componentFootprint.isAllDay
));
}
else { // inner segment that lasts the whole day
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>' +
'<td class="fc-list-item-title fc-widget-content"><input type="button" class="btn btn-primary" id="ok" value="Tamamlandı">'+htmlEscape(eventDef.miscProps.success)+'</input></td>' +
'</tr>';
console.log(eventDef.success);
}
});
;;
$('#del').click(function(){
var id = eventDef.id;
$.ajax({
type : 'POST',
url : '../../../app/ajaxdelete.php',
data : {"id":id},
success: function(sd){
console.log(sd);
}
});
}); Ajax butonlar çalışmıyor
0
●352
- 03-10-2017, 22:12:38Kimlik doğrulama veya yönetimden onay bekliyor.Merhaba arkadaşlar fullcalendar.io nun list görünümünde butonlar ekledim. Veri tabanından veriyi alıyorum. Ajax ile #del yani sil butonuna tıklandığında silmesi için id yi gönderiyorum. Ama ne console da çıktı alıyorum neden herhangi silinme olayı oluyor. Nerede hata yapıyorum.