\r
function collectLocales()\r
{\r
- var tmpyear = ((panelNum == 0) ? 2000 : 2001);\r
+ var tmpyear = 2000 + panelNum;\r
var month = 0;\r
\r
if (months_translated.length > 0)\r
var eventIds = [];\r
var max;\r
if (mode == 0)\r
- max = ((panelNum == 0) ? config['eventsPerWidget'].Value : 2 * config['eventsPerWidget'].Value);\r
+ max = (panelNum + 1) * config['eventsPerWidget'].Value;\r
else\r
max = 30; // we can display a lot more events in fullscreen mode\r
\r
}\r
\r
// skip events for the first panel in case this is the second one and we're not in fullscreen mode\r
- if (mode == 0 && panelNum == 1 && counter < config['eventsPerWidget'].Value + 1) {\r
+ if (mode == 0 && panelNum > 0 && counter < panelNum * config['eventsPerWidget'].Value + 1) {\r
console.info('skipping (already in first widget) ' + entry.id);\r
continue;\r
}\r