Fix displaying events in month view
This commit is contained in:
parent
6ad64c6f8a
commit
7e3fa85a00
2 changed files with 15 additions and 9 deletions
|
@ -764,8 +764,8 @@ function oc_cal_load_events(loadview) {
|
|||
var weekdaynum = 0;
|
||||
var weeknum = 1;
|
||||
for(var i = 0; i <= 41; i++) {
|
||||
var loadevents_month = dates[i][0];
|
||||
var loadevents_days = dates[i][1];
|
||||
var loadevents_month = dates[i][1];
|
||||
var loadevents_days = dates[i][0];
|
||||
if( typeof (oc_cal_events[oc_cal_year][loadevents_month]) != "undefined") {
|
||||
if( typeof (oc_cal_events[oc_cal_year][loadevents_month][loadevents_days]) != "undefined") {
|
||||
var pnum = 0;
|
||||
|
@ -786,12 +786,12 @@ function oc_cal_load_events(loadview) {
|
|||
if( typeof (oc_cal_events[oc_cal_year][loadevents_month][loadevents_days][time]) != "undefined") {
|
||||
var eventnumber = 1;
|
||||
var eventcontainer = document.getElementById("events_onemonthview_" + weekdays[weekdaynum] + "_" + weeknum);
|
||||
while( typeof (oc_cal_events[year][loadevents_month][loadevents_days][i][eventnumber]) != "undefined") {
|
||||
while( typeof (oc_cal_events[oc_cal_year][loadevents_month][loadevents_days][time][eventnumber]) != "undefined") {
|
||||
var newp = document.createElement("p");
|
||||
newp.id = "onemonthview_" + i + "_" + eventnumber;
|
||||
newp.id = "onemonthview_" + time + "_" + eventnumber;
|
||||
newp.className = "onemonthview_event";
|
||||
eventcontainer.appendChild(newp);
|
||||
document.getElementById("onemonthview_" + i + "_" + eventnumber).innerHTML = oc_cal_events[oc_cal_year][loadevents_month][loadevents_days][i][eventnumber]["description"];
|
||||
document.getElementById("onemonthview_" + time + "_" + eventnumber).innerHTML = oc_cal_events[oc_cal_year][loadevents_month][loadevents_days][time][eventnumber]["description"];
|
||||
eventnumber++;
|
||||
pnum++;
|
||||
}
|
||||
|
@ -892,4 +892,4 @@ function oc_cal_choosecalendar(){
|
|||
}else{
|
||||
alert(t("calendar", "You can't open more than one dialog per site!"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,8 +52,14 @@ var oc_cal_opendialog = 0;
|
|||
var oc_cal_datemonthyear = String(oc_cal_dayofmonth) + String(oc_cal_month) + String(oc_cal_year);
|
||||
var oc_cal_calendars = new Array();
|
||||
//event vars
|
||||
var oc_cal_events = new Array(2011);
|
||||
oc_cal_events[2011] = new Array(0,1,2,3,4,5,6,7,8,9,10,11);
|
||||
var oc_cal_events = new Array();
|
||||
oc_cal_events[2011] = new Array();
|
||||
oc_cal_events[2011][7] = new Array();
|
||||
oc_cal_events[2011][7][7] = new Array();
|
||||
oc_cal_events[2011][7][13] = new Array();
|
||||
oc_cal_events[2011][7][7]['allday'] = new Array();
|
||||
oc_cal_events[2011][7][7]['allday'][1] = new Array();
|
||||
oc_cal_events[2011][7][7]['allday'][1]['description'] = 'allday event';
|
||||
oc_cal_events[2011][7][13] = new Array();
|
||||
oc_cal_events[2011][7][13][10] = new Array();
|
||||
oc_cal_events[2011][7][13][10][1] = new Array();
|
||||
oc_cal_events[2011][7][13][10][1]['description'] = '10:00 event';
|
||||
|
|
Loading…
Reference in a new issue