Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将jquery对话框与fullcalendar eventDrop方法相结合_Jquery_Fullcalendar - Fatal编程技术网

将jquery对话框与fullcalendar eventDrop方法相结合

将jquery对话框与fullcalendar eventDrop方法相结合,jquery,fullcalendar,Jquery,Fullcalendar,我有一段代码: eventDrop: function(event,dayDelta,minuteDelta,allDay,revertFunc) { if (!confirm('some question')) { revertFunc(); } else { $.ajax({ url: '/some/url/', error: function(){ revertFunc(); alert('so

我有一段代码:

eventDrop: function(event,dayDelta,minuteDelta,allDay,revertFunc) {
if (!confirm('some question')) {
    revertFunc();
}
else {
    $.ajax({
        url: '/some/url/',
        error: function(){
            revertFunc();
            alert('some text');
        },
    });
}
}

我希望使用jquery对话框,而不是带有eventDrop方法(带有revertFunc)的标准js确认框


有什么想法吗?

我找不到在eventDrop方法中使用jquery对话框和revertFunc的方法,所以我做了一些变通:

  • 在eventDrop上调用以url为参数的jquery对话框:

    url='/some/url/with/datetime'; $('#对话框确认')。数据('url',url)。对话框('open')

  • 在对话框选项中,定义按钮,确认时调用ajax,取消时调用“refetchEvents”(而不是eventDrop中的“revertFunc”):

    $(“#日历”).fullCalendar('refetchEvents')