.description { }\r
.icon { }\r
.overdue {}\r
+.calendar1 {}\r
+.calendar2 {}\r
+.calendar3 {}\r
+.calendar4 {}\r
+.calendar5 {}\r
+.calendar6 {}\r
</style>\r
\r
<script type="text/javascript" src="localizedTextStrings.js" charset="utf-8" />\r
if (meetingResult.ErrorCode != 0)\r
throw("Error fetching calendar data: " + meetingResult.ErrorCode + ': ' + meetingResult.ErrorMessage);\r
var list = meetingResult.ReturnValue;\r
- meetingList = meetingList.concat(listToArray(list));\r
+ meetingList = meetingList.concat(listToArray(list, calendarList[i]));\r
}\r
console.info("updateData(): meetingList.sort()");\r
meetingList.sort(sortCalendarEntries);\r
}\r
var todayTodoResult = calendarService.IDataSource.GetList(todayTodoListFiltering);\r
var list = todayTodoResult.ReturnValue;\r
- todayTodoList = todayTodoList.concat(listToArray(list));\r
+ todayTodoList = todayTodoList.concat(listToArray(list, calendarList[i]));\r
}\r
console.info("updateData(): todayTodoList.sort()");\r
todayTodoList.sort(sortCalendarEntries);\r
// generate html output\r
entriesHtml += '<tr>';\r
if (config['showCalendarIndicator'].Value && calendarList.length > 1) {\r
- entriesHtml += '<td class="calendar' + calendarColors[entry.CalendarName] + '"> </td>';\r
+ entriesHtml += '<td><span class="calendar' + calendarColors[entry.CalendarName] + '"> </span></td>';\r
}\r
entriesHtml += '<td><img class="icon" src="' + entry.Type + '.png" /></td>';\r
if(date == null) {\r
}\r
\r
// Copies all objects and their properties to an array. Data is copied so nothing gets lost when the reference is removed\r
-function listToArray(list)\r
+// Note: this will also set the "CalendarName" property of every entry to the name specified by the calendarName parameter if it has not been defined already\r
+function listToArray(list, calendarName)\r
{\r
var array = new Array();\r
var item;\r
for(var i=0; i < entryFields.length; i++) {\r
itemCopy[entryFields[i]] = item[entryFields[i]];\r
}\r
+ // for some reason, the CalendarName property is never correctly queried, so we assign it manually here\r
+ if (!itemCopy['CalendarName']) {\r
+ itemCopy['CalendarName'] = calendarName;\r
+ }\r
array.push(itemCopy);\r
txt += array[array.length - 1].Summary + ", ";\r
}\r
\r
function updateCalendarColors()\r
{\r
+ var maxColors = 6;\r
calendarColors = [];\r
- if (calendarList.length > 6) {\r
+ if (calendarList.length > maxColors) {\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
+ calendarColors[calendarList[i]] = (i % maxColors) + 1;\r
}\r
}\r
\r
.textInput { width:90%; }\r
.credits { margin-left:40px; text-indent: -20px; margin-bottom:0px; }\r
#homescreenView { width: 315px; height:91px; overflow:hidden; }\r
-#calendarList { position:absolute; left:10px; top:4px; width:295px; height:75px; overflow:hidden; }\r
+#calendarList { position:absolute; left:5px; top:4px; width:295px; height:75px; overflow:hidden; }\r
#name { text-align:center; }\r
#appicon { display: block; margin-left: auto; margin-right: auto; margin-top: 10px; }\r
#smallappicon { width:22px; height:22px; margin-right:10px; float:left; }\r