完整日历可还原外部删除事件

时间:2018-01-23 15:55:13

标签: fullcalendar fullcalendar-scheduler

我是关于完整日历的完全初学者,所以对可能的简单问题道歉。 我试图恢复外部事件的下降。如果我使用revertFunc(),事件会回到列表中的原始位置,但事件仍然在日历上,直到刷新为止。理想情况下,我希望它在对话框关闭后立即消失。这是代码

drop: function(date, jsEvent, ui, resourceId) 
{
  var tag = $(this).data('event').tag;
  var eventDate = $(this).data('event').projectDate;
  var calDate =  date.format();

  if (tag == PSTag) 
  {                                              
    if(eventDate != calDate)
    {
      alert('You must drop the event on the correct date'); 
      revertFunc();
      return;
    }
    var eventObjectId = $(this).data('event').schWork;
  }

  if (tag == WOTag) 
  {                                              
    var eventObjectId = $(this).data('event').workorder;
  }

  var title = $(this).data('event').title;
  alert(tag);    
  updateCalendarEvent(eventObjectId, date.format(), resourceId, tag, title);  

  if (tag != PHTag) 
  {                                              
    $(this).remove();
  }    
  setupDraggableEvents();
}

非常感谢您的帮助

0 个答案:

没有答案
相关问题