Skip to content

Commit

Permalink
Merge pull request #33 from makrohard/colorsupport
Browse files Browse the repository at this point in the history
Added Color support from ics files
- good point, Johannes, I was not aware of this possilbility - thanks 😄
  • Loading branch information
wernerjoss committed Aug 2, 2021
2 parents 6906660 + 20f93b8 commit b0cc93f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ jQuery(document).ready(function () {
if (duration < 86400000) fcevents["allDay"] = false; // duration less than 1 day: allDay = false
var entry = item.getFirstPropertyValue("description"); // add description 22.06.20
if (entry !== null) fcevents["description"] = entry;
var entry = item.getFirstPropertyValue("color"); // add color from ics
if (entry !== null) fcevents["color"] = entry;

// not used options go here

Expand Down Expand Up @@ -234,7 +236,7 @@ jQuery(document).ready(function () {
if (verbose) console.log('fcrrules:', fcrrules);
}
}
fcevents["backgroundColor"] = colors[index];
if(fcevents["color"] == null) { fcevents["backgroundColor"] = colors[index];}
if (verbose) console.log('fcevents:', fcevents);
if (item.getFirstPropertyValue("class") === "PRIVATE") {
return null;
Expand Down

0 comments on commit b0cc93f

Please sign in to comment.