通过删除外部事件来更新事件 [英] Update an event by dropping an external event
本文介绍了通过删除外部事件来更新事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想通过从同一个列表中删除另一个事件来更新现有事件的标题。我怎么能做到这一点。
我写了这个函数(下面),我从fullcalendar.js的bindSegHandlers函数中调用它,但它不起作用,创建了一个新事件。
$ p $
function droppableEvent ',
容忍度:'指针',
activeClass:'ui-state-hover',
hoverClass:'ui-state-active',
drop:function(ev, ui){
alert('call dropped');
}
});
}
您能帮我吗?
感谢
解决方案
我自己找到了解决方案:eventRender是正确的地方! b
$ b
$('#calendar')。fullCalendar({
eventRender:function(evt,element){
element.droppable ({
accept:'.myevent',
tolerance:'pointer',
activeClass:'ui-state-hover',
hoverClass:'ui-state-active' ,
drop:function(ev,ui){
alert('call dropped');
}
});
},
.. ..
....
});
不需要修改fullcalendar.js
fullcalendar 1.4.7 allow adding new events by dropping them onto the calendar from an external list of events. I would like to update the title of an existing event by dropping another event from the same list. How i can do that. I wrote this function (below) and i call it from the "bindSegHandlers" function of fullcalendar.js but it doesn't work, a new event is created.
function droppableEvent(event, eventElement) {
eventElement.droppable({
accept: '.myevent',
tolerance: 'pointer',
activeClass: 'ui-state-hover',
hoverClass: 'ui-state-active',
drop: function(ev, ui) {
alert('call dropped');
}
});
}
Can you help me?
thanks
解决方案
I found the solution by myself: eventRender is the right place for that!
$('#calendar').fullCalendar({
eventRender: function(evt, element) {
element.droppable({
accept: '.myevent',
tolerance: 'pointer',
activeClass: 'ui-state-hover',
hoverClass: 'ui-state-active',
drop: function(ev, ui) {
alert('call dropped');
}
});
},
....
....
});
it is not necessary to modify fullcalendar.js
这篇关于通过删除外部事件来更新事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文