fontsize: { Type: 'Enum', Default: 'auto', Value: 'auto', ValidValues: ['auto', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28'],},\r
eventsPerWidget: { Type: 'Int', Default: 4, Value: 4,},\r
monthRange: { Type: 'Int', Default: 2, Value: 2,},\r
+ maxNumberOfEventsOnFullscreen: { Type: 'Int', Default: 30, Value: 30,},\r
includeTodos: { Type: 'Bool', Default: true, Value: true,},\r
useBackgroundImage: { Type: 'Bool', Default: true, Value: true,},\r
backgroundImageLocation: { Type: 'Enum', Default: 'internal', Value: 'internal', ValidValues: ['internal', 'external']},\r
showCalendarIndicator: { Type: 'Bool', Default: true, Value: true,},\r
excludedCalendars: { Type: 'Array', Default: [], Value: [],},\r
enableLogging: { Type: 'Bool', Default: false, Value: false,},\r
+ anonymizeLogging: { Type: 'Bool', Default: false, Value: false,},\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
var use12hoursTimeFormat = false; // defines how time should be formated: 19:00 or 07:00 pm\r
var timeFormatSeparator = ":"; // format time 19:00 or 19.00 depending on system setting\r
var defaultFontSize = null; // default browser font size will be set by init\r
+var displayOffset = 0;\r
\r
// vars for daylight saving time\r
var summertime = false; // true, if current date is in summer, false if in winter\r
log('parseDate(): fixing time +1h: ' + result);\r
}\r
}\r
+ if (displayOffset != 0) {\r
+ result = new Date(result.getTime() + displayOffset);\r
+ }\r
\r
return result;\r
}\r
if (mode == 0) {\r
if (config['fontsize'].Value == config['fontsize'].ValidValues[0]) {\r
fontsize = parseInt(72 / config['eventsPerWidget'].Value) + 'px';\r
- lineheight = parseInt(82 / config['eventsPerWidget'].Value) + 'px';\r
+ lineheight = parseInt(72 / config['eventsPerWidget'].Value) + 'px';\r
}\r
}\r
if (config['fontsize'].Value != config['fontsize'].ValidValues[0]) {\r
fontsize = config['fontsize'].Value + 'px';\r
lineheight = fontsize;\r
}\r
- changeCssClass('.icon', config['cssStyle_icon'].Value + '; width:' + lineheight + '; height:' + lineheight + ';');\r
+ changeCssClass('.icon', config['cssStyle_icon'].Value + '; width:' + fontsize + '; height:' + fontsize + ';');\r
var entriesHtml = '<table style="font-size:' + fontsize + '; line-height:' + lineheight + ';">';\r
if (mode == 0)\r
entriesHtml = '<table width="307" height="82"><tr><td>' + entriesHtml; // this is needed to center the actual content vertically\r
if (mode == 0)\r
max = (panelNum + 1) * config['eventsPerWidget'].Value;\r
else\r
- max = 30; // we can display a lot more events in fullscreen mode\r
+ max = config["maxNumberOfEventsOnFullscreen"].Value; // we can display a lot more events in fullscreen mode\r
\r
if (config['enableLogging'].Value) {\r
var listinfo = "";\r
else {\r
mode = 1;\r
}\r
+ checkForOffByOneBug();\r
log("init(): updateScreen()");\r
updateScreen();\r
if (config['useBackgroundImage'].Value)\r
statupSuccessful = true;\r
}\r
\r
+function checkForOffByOneBug() {\r
+ var tz = new Date().getTimezoneOffset();\r
+ if (tz < 0) {\r
+ tz = -tz;\r
+ }\r
+ tz = tz / 60;\r
+ if (tz > 12) {\r
+ displayOffset = 24*3600*1000;\r
+ }\r
+}\r
+\r
function checkOrientation()\r
{\r
//updateScreen();\r
if (!itemCopy['CalendarName']) {\r
itemCopy['CalendarName'] = calendarName;\r
}\r
+ if (config['anonymizeLogging'].Value && config['enableLogging'].Value) {\r
+ if (itemCopy['Summary'])\r
+ itemCopy['Summary'] = getHashForString(itemCopy['Summary']);\r
+ if (itemCopy['Location'])\r
+ itemCopy['Location'] = getHashForString(itemCopy['Location']);\r
+ }\r
array.push(itemCopy);\r
txt += array[array.length - 1].Summary + ", ";\r
}\r
return defaultFontSize;\r
}\r
\r
+function getHashForString(string)\r
+{\r
+ // cheap hashing, loosly based on Java's String.hashCode()\r
+ for (var hash = 0, i = 0; i < string.length; i++)\r
+ hash = (hash << 5) - hash + string.charCodeAt(i);\r
+ hash = hash & hash; // Convert to 32bit integer\r
+ if (hash < 0)\r
+ hash = -hash;\r
+ return hash.toString(16).toUpperCase();\r
+}\r
+\r
</script>\r
\r
<style type="text/css">\r