0
다른 게시물을 보았고 SchedulerEventRecorder에서 이벤트를 편집, 변경, 삭제하는 방법을 확인했습니다. 내가 찾을 수없는 한 가지는 드래그 이벤트를 수신하는 방법입니다. 나는 그것에 관한 어떤 문서라도 발견 할 수없는 것 같다.합금 스케쥴러 끌기 이벤트
YUI().use(
'aui-scheduler',
function(Y) {
var events = [
{
color: '#8B0000',
repeated: true,
content: 'Event1',
endDate: new Date(2017, 12, 1, 16),
startDate: new Date(2017, 12, 1, 1)
}
];
var agendaView = new Y.SchedulerAgendaView();
var dayView = new Y.SchedulerDayView();
var monthView = new Y.SchedulerMonthView();
var weekView = new Y.SchedulerWeekView();
var eventRecorder = new Y.SchedulerEventRecorder({
on: {
save: function(event) {
alert('Save Event:' + this.isNew() + ' --- ' + this.getContentNode().val()+'-----startDate='+this.get('startDate')+'-----EndDate='+this.get('endDate'));
},
edit: function(event) {
alert('Edit Event:' + this.isNew() + ' --- ' + this.getContentNode().val());
},
delete: function(event) {
alert('Delete Event:' + this.isNew() + ' --- ' + this.getContentNode().val());
// Note: The cancel event seems to be buggy and occurs at the wrong times, so I commented it out.
// },
// cancel: function(event) {
// alert('Cancel Event:' + this.isNew() + ' --- ' + this.getContentNode().val());
}
}
});
schedule =new Y.Scheduler(
{
activeView: weekView,
boundingBox: '#myScheduler',
date: new Date(2017, 12, 1),
eventRecorder: eventRecorder,
items: events,
render: true,
views: [dayView, weekView, monthView, agendaView]
}
);
}
);