Fix js bug.

This commit is contained in:
BoHung Chiu 2022-07-13 15:37:21 +08:00
parent 592eab19a2
commit 659c6b21fd
2 changed files with 2 additions and 6 deletions

View File

@ -848,7 +848,6 @@ var AgendaView = function(calendar){
dataType : "json",
data : {"agenda_start":sd.toLocaleString(),"agenda_end":ed.toLocaleString(),"unix_start":usd,"unix_end":ued},
success : function(data){
console.log(data)
$("#agenda_start,#agenda_end").datepicker({
dateFormat: "yy/mm",
onChangeMonthYear: function( year, month, inst ){

View File

@ -668,7 +668,7 @@ var AgendaView = function(calendar){
return x.clone();
}
var eventsManager = function(){
var url = "/xhr/calendars/agenda",
var url = "/xhr/calendars/index_agenda",
sd = new Date(start_year,start_month,1),
ed = new Date(end_year,end_month+1,0),
usd = Math.round(sd/1000),
@ -677,7 +677,7 @@ var AgendaView = function(calendar){
type : "get",
url : url,
dataType : "json",
data : {"agenda_start":sd.toLocaleString(),"agenda_end":ed.toLocaleString(),"unix_start":usd,"unix_end":ued},
data : {"agenda_start":sd.toLocaleString(),"agenda_end":ed.toLocaleString(),"unix_start":usd,"unix_end":ued,"subpart_id":calendar.page_id},
success : function(data){
data = data.events;
$("#agenda_start,#agenda_end").datepicker({
@ -773,9 +773,6 @@ var AgendaView = function(calendar){
datetimeFormat += (' ' + getDateString(s,calendar_variable.time_format) + ' - ' + getDateString(e,calendar_variable.time_format));
}
}else{
console.log(event);
console.log(event.start);
console.log(event.end);
if(event.allDay){
datetimeFormat = getDateString(s,calendar_variable.short_date) + ' - ' + getDateString(e,calendar_variable.short_date);
}else{