大家好,我正在使用 arshaw fullcalendar,它是一个很棒的插件,我想在视图更改时收到通知,以便将类添加到跨度。我试过
$('#calendar').fullCalendar({
viewRender: function(view,element){alert("aha");},
defaultView:'basicDay',
theme: true,
header:{
right: 'month basicWeek basicDay',
left: 'prev,next today',
center: 'title'
},
loading: function(bool){
if(bool){
$("body").addClass("loading");
}else{
$("body").removeClass("loading");
}
},
lazyFetching: true,
minTime: 8,
maxTime: 17,
allDaySlot: false,
eventSources:[
{
url: '/apptCalendar/appt?q=1',
color: '#FAF29B',
textColor: 'black',
allDayDefault: false
},
{
url: '/apptCalendar/appt?q=2',
color: '#4e394d1',
textColor: '#FAF29B',
allDayDefault: false
},
{
url: '/apptCalendar/appt?q=3',
color: '#38df64',
textColor: 'black',
allDayDefault: false
}
],
eventRender: function(event, element){
element.find('span.fc-event-title').html(element.find('span.fc-event-title').text());
element.qtip({
content: {text:"<script>$('.qtip .addTitleInfo').addClass('hidden'); $(document).ready(function(){ $('#eventApptID"+event.id+"').each(function(){ $('#eventApptID"+event.id+"').val('"+event.appStatusID+"'); }); });</script><div><h6>Therapy Type: "+event.therapyType+"</h6></div><a href='/eval/new-eval/"+event.pat_id+"?appID="+event.thirdPAppID+"'"+"><i class='icon-plus-sign'></i> New Eval</a><br>\
<a href='/note/new-note/"+event.pat_id+"?appID="+event.thirdPAppID+"'"+"><i class='icon-plus-sign'></i> New Note</a>\
<div>DOB: "+event.dob+"</div><div>SSN: "+event.l4SSN+"</div><div>Appointment Status:</div><select id='eventApptID"+event.id+"' class='input-large' onChange='updateApptStatus(this.value,"+event.id+","+event.pat_id+")'>"+items+"</select><div>Comments: "+event.description+"</div>",
title: {text: event.title},
button: 'Close'},
show: {
solo: true
},
style: {
classes: 'qtip-bootstrap',
width: 300,
height: 300
},
hide: {
event: 'unfocus',
},
position:{
my: 'bottom center',
at: 'top center',
target: 'event',
viewport: $('#calendar')
}
});
}
});
并且视图更改时没有提示警报。我愿意。谁能帮我吗?
目前我已经尝试了其他通知方法,但无法让它工作。请让我知道我需要做什么才能完成这项工作。