calendar: cleanup
parent
4fcd9dba40
commit
7a6aa80f30
|
|
@ -236,7 +236,6 @@ const drawCalendar = function(date) {
|
|||
|
||||
const eventsThisDay = eventsThisMonthPerDay[curDay.getDate()];
|
||||
if (eventsThisDay && eventsThisDay.length > 0) {
|
||||
eventsThisDay.sort((a,b) => a.date - b.date);
|
||||
// Display events for this day
|
||||
eventsThisDay.forEach((ev, idx) => {
|
||||
if (sameDay(ev.date, curDay)) {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,7 @@
|
|||
(function (back) {
|
||||
var FILE = "calendar.json";
|
||||
const FILE = "calendar.json";
|
||||
const HOLIDAY_FILE = "calendar.days.json";
|
||||
var settings = require('Storage').readJSON(FILE, true) || {};
|
||||
if (settings.ndColors === undefined)
|
||||
if (process.env.HWVERSION == 2) {
|
||||
settings.ndColors = true;
|
||||
} else {
|
||||
settings.ndColors = false;
|
||||
}
|
||||
const settings = require('Storage').readJSON(FILE, true) || {};
|
||||
if (settings.ndColors === undefined) {
|
||||
if (process.env.HWVERSION == 2) {
|
||||
settings.ndColors = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue