X-Git-Url: https://code.delx.au/comingnext/blobdiff_plain/e9768ba1344752c5225e20ba834efec89229f24a..87be3643590aaed8ca6eff098510aaa9701eb08b:/comingNext/index.html diff --git a/comingNext/index.html b/comingNext/index.html index 7077a4e..ce0d15d 100644 --- a/comingNext/index.html +++ b/comingNext/index.html @@ -17,6 +17,7 @@ .now { } .description { } .icon { } +.overdue {} @@ -35,6 +36,8 @@ var config = { tomorrowText: { Type: 'String', Default: getLocalizedText('settings.default.tomorrowText'), Value: getLocalizedText('settings.default.tomorrowText'),}, showNowAsText: { Type: 'Bool', Default: true, Value: true,}, nowText: { Type: 'String', Default: getLocalizedText('settings.default.nowText'), Value: getLocalizedText('settings.default.nowText'),}, + markOverdueTodos: { Type: 'Bool', Default: true, Value: true,}, + overdueText: {Type: 'String', Default: getLocalizedText('settings.default.overdueText'), Value: getLocalizedText('settings.default.overdueText'),}, dateSeparator: { Type: 'String', Default: getLocalizedText('settings.default.dateSeparator'), Value: getLocalizedText('settings.default.dateSeparator'),}, dateFormat: { Type: 'Enum', Default: 'auto', Value: 'auto', ValidValues: ['auto', 'DDMM', 'MMDD'],}, weekDayLength: { Type: 'Int', Default: 2, Value: 2,}, @@ -55,6 +58,7 @@ var config = { cssStyle_now: { Type: 'String', Default: 'color:#ff00ff', Value: 'color:#ff00ff',}, cssStyle_description: { Type: 'String', Default: '', Value: '',}, cssStyle_icon: { Type: 'String', Default: 'width:15px; height:15px', Value: 'width:15px; height:15px',}, + cssStyle_overdue: { Type: 'String', Default: 'color:#ffff00', Value: 'color:#ffff00',}, } @@ -578,6 +582,16 @@ function updateData() console.info('skipping (already in first widget) ' + entry.id); continue; } + + // mark overdue todos + var overdue = false; + if (entry.Type == 'ToDo') { + var tmp1 = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0,0,0); + var tmp2 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0,0,0); + if (tmp1.getTime() < tmp2.getTime()) { + overdue = true; + } + } // generate html output entriesHtml += '