enableDaylightSaving: { Type: 'Bool', Default: true, Value: true,},\r
daylightSavingOffset: { Type: 'Int', Default: 1, Value: 1,},\r
hideWidgetOnCalendarOpen: { Type: 'Bool', Default: false, Value: false,},\r
+ showCalendarIndicator: { Type: 'Bool', Default: true, Value: true,},\r
cssStyle_background: { Type: 'String', Default: 'color:#ffffff; background-color:#000000', Value: 'color:#ffffff; background-color:#000000',},\r
cssStyle_backgroundFullscreen: { Type: 'String', Default: 'color:#ffffff; background-color:#000000', Value: 'color:#ffffff; background-color:#000000',},\r
cssStyle_weekDay: { Type: 'String', Default: '', Value: '',},\r
cssStyle_description: { Type: 'String', Default: '', Value: '',},\r
cssStyle_icon: { Type: 'String', Default: 'width:15px; height:15px', Value: 'width:15px; height:15px',},\r
cssStyle_overdue: { Type: 'String', Default: 'color:#ffff00', Value: 'color:#ffff00',},\r
+ cssStyle_calendar1: { Type: 'String', Default: 'background-color:#800000', Value: 'background-color:#800000',},\r
+ cssStyle_calendar2: { Type: 'String', Default: 'background-color:#ff0000', Value: 'background-color:#ff0000',},\r
+ cssStyle_calendar3: { Type: 'String', Default: 'background-color:#808000', Value: 'background-color:#808000',},\r
+ cssStyle_calendar4: { Type: 'String', Default: 'background-color:#ffff00', Value: 'background-color:#ffff00',},\r
+ cssStyle_calendar5: { Type: 'String', Default: 'background-color:#008000', Value: 'background-color:#008000',},\r
+ cssStyle_calendar6: { Type: 'String', Default: 'background-color:#008080', Value: 'background-color:#008080',},\r
}\r
\r
\r
var settingsCache = null;\r
var notificationRequests = new Array();\r
var calendarList = [];\r
+var calendarColors = [];\r
\r
// vars for daylight saving time\r
var summertime = false; // true, if current date is in summer, false if in winter\r
var entryFields = [\r
"id",\r
"Type",\r
+ "CalendarName",\r
"Summary",\r
"Location",\r
"Status",\r
try {\r
var result = calendarService.IDataSource.Cancel(notificationRequests[i]);\r
if (result.ErrorCode)\r
- error('requestNotification failed with error code ' + result.ErrorCode);\r
+ error('cancelNotification failed with error code ' + result.ErrorCode);\r
} catch (e) {\r
- error("requestNotification: " + e + ', line ' + e.line);\r
+ error("cancelNotification: " + e + ', line ' + e.line);\r
}\r
}\r
}\r
var newCalendarList = listCalendars();\r
if (newCalendarList.length != calendarList.length) {\r
calendarList = newCalendarList;\r
+ updateCalendarColors();\r
cancelNotification();\r
requestNotification();\r
}\r
}\r
\r
// generate html output\r
- entriesHtml += '<tr><td><img class="icon" src="' + entry.Type + '.png" /></td>';\r
+ entriesHtml += '<tr>';\r
+ if (config['showCalendarIndicator'].Value && calendarList.length > 1) {\r
+ entriesHtml += '<td class="calendar' + calendarColors[entry.CalendarName] + '"> </td>';\r
+ }\r
+ entriesHtml += '<td><img class="icon" src="' + entry.Type + '.png" /></td>';\r
if(date == null) {\r
// some languages have very strange locale date formats, can't parse all those. Also some todos don't have dates at all.\r
entriesHtml += '<td colspan="4"><span class="date">' + entryDate + '</span> ';\r
\r
calendarList = listCalendars();\r
loadSettings();\r
+ updateCalendarColors();\r
collectLocales();\r
//updateData();\r
requestNotification();\r
return 0;\r
}\r
\r
+function updateCalendarColors()\r
+{\r
+ calendarColors = [];\r
+ if (calendarList.length > 6) {\r
+ console.info("updateCalendarColors(): Warning: more calendars than available indicator colors");\r
+ }\r
+ for(var i=0; i < calendarList.length; i++) {\r
+ calendarColors[calendarList[i]] = (i % 6) + 1;\r
+ }\r
+}\r
+\r
</script>\r
\r
<style type="text/css">\r
<p class="credits">Flavio Nathan (portuguese-brazilian translation)</p>\r
<p class="credits">Tokeda (russian translation)</p>\r
<p>This software is open source and licensed under the GPLv3.</p>\r
- <p>Visit sourceforge.net/projects/comingnext for free updates.</p>\r
+ <p>Visit <a href="http://sourceforge.net/projects/comingnext">sourceforge.net/projects/comingnext</a> for free updates.</p>\r
<hr />\r
</div>\r
<div id="updateView" style="display:none">\r