Jquery UI 对话框和阻塞问题
我正在使用带有 FullCalendar 插件的 Jquery UI 对话框。
我的问题是 UI 对话框是非阻塞的。
FullCalendar 有一个回调函数 eventResizeStop
,在这个回调函数中,我计划包含一个用于用户输入的对话框。
eventResizeStop: function (event, jsEvent, ui, view) {
$('#testDiv').dialog({
autoOpen: true,
modal: true,
width: 500,
buttons: {
"Ok": function () {
event.id = 123;
$(this).dialog("close");
}
}
});
}
问题是此回调函数操作在显示此对话框时没有被阻止。 它只是继续其操作并调用 FullCalendar 插件中的 EventResize
函数。
我使用阻塞循环来防止这种行为,但页面变得无响应,这导致了问题。
如何使其成为阻塞事件? 或者建议我一些其他具有此功能的插件。
I am using Jquery UI Dialog box with FullCalendar plugin.
My problem is UI Dialog box is non blocking.
FullCalendar has a callback function, eventResizeStop
, and inside this callback function, I am planning to include a dialog box for user input.
eventResizeStop: function (event, jsEvent, ui, view) {
$('#testDiv').dialog({
autoOpen: true,
modal: true,
width: 500,
buttons: {
"Ok": function () {
event.id = 123;
$(this).dialog("close");
}
}
});
}
The problem is this callback function operation is not getting blocked on showing this dialog.
It just continues its operation and calls EventResize
function within FullCalendar plugin.
I used blocking loops to prevent the behavior, but the page is becoming non-responsive and that's causing issues.
How to make this a blocking event?
Or suggest me some other plugin which has this functionality.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有点难以调试,但根据您所描述的内容,当您将函数保留为空时会发生什么
,
或者不在对象定义中添加调用,甚至将 return false;在函数中。如果您可以提供代码块,这可能有助于调试。
我希望这有帮助。
kind of hard to debug, but based on what you described, what happens when you leave the function empty like so
or
or don't add the call in your object definition or even put a return false; in the function. if you could provide a code block, this might help in the debugging.
i hope this helps.
我最终创建了一个新的 fullcalendar 函数,当我从 UI 发起调用时,它可以调整事件的大小。因此,我遵循的方法是从 fullcalendar 插件内的调整大小停止句柄中删除 eventResize,并在完成后单独调用它。
这需要包括一个新的属性函数来处理来自UI的调用,然后从它们重定向到特定视图的函数。比如从日历的函数->视图函数并调用事件调整大小。
当然,这需要来回传递变量。
I ended up creating a new fullcalendar function which can resize my event when I initiate call from my UI.So the method I followed is to remove the eventResize from my resize stop handle inside fullcalendar plugin and call it separately once it is finished.
This requires including a new property function to handle the call from UI and then redirecting from their to a specific view's function.Say from Calendar's function->Views function and call event resize.
Of course this requires variables being passed back and forth.