Fix js bug.
This commit is contained in:
parent
592eab19a2
commit
659c6b21fd
|
@ -848,7 +848,6 @@ var AgendaView = function(calendar){
|
||||||
dataType : "json",
|
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},
|
||||||
success : function(data){
|
success : function(data){
|
||||||
console.log(data)
|
|
||||||
$("#agenda_start,#agenda_end").datepicker({
|
$("#agenda_start,#agenda_end").datepicker({
|
||||||
dateFormat: "yy/mm",
|
dateFormat: "yy/mm",
|
||||||
onChangeMonthYear: function( year, month, inst ){
|
onChangeMonthYear: function( year, month, inst ){
|
||||||
|
|
|
@ -668,7 +668,7 @@ var AgendaView = function(calendar){
|
||||||
return x.clone();
|
return x.clone();
|
||||||
}
|
}
|
||||||
var eventsManager = function(){
|
var eventsManager = function(){
|
||||||
var url = "/xhr/calendars/agenda",
|
var url = "/xhr/calendars/index_agenda",
|
||||||
sd = new Date(start_year,start_month,1),
|
sd = new Date(start_year,start_month,1),
|
||||||
ed = new Date(end_year,end_month+1,0),
|
ed = new Date(end_year,end_month+1,0),
|
||||||
usd = Math.round(sd/1000),
|
usd = Math.round(sd/1000),
|
||||||
|
@ -677,7 +677,7 @@ var AgendaView = function(calendar){
|
||||||
type : "get",
|
type : "get",
|
||||||
url : url,
|
url : url,
|
||||||
dataType : "json",
|
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){
|
success : function(data){
|
||||||
data = data.events;
|
data = data.events;
|
||||||
$("#agenda_start,#agenda_end").datepicker({
|
$("#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));
|
datetimeFormat += (' ' + getDateString(s,calendar_variable.time_format) + ' - ' + getDateString(e,calendar_variable.time_format));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
console.log(event);
|
|
||||||
console.log(event.start);
|
|
||||||
console.log(event.end);
|
|
||||||
if(event.allDay){
|
if(event.allDay){
|
||||||
datetimeFormat = getDateString(s,calendar_variable.short_date) + ' - ' + getDateString(e,calendar_variable.short_date);
|
datetimeFormat = getDateString(s,calendar_variable.short_date) + ' - ' + getDateString(e,calendar_variable.short_date);
|
||||||
}else{
|
}else{
|
||||||
|
|
Loading…
Reference in New Issue