]> code.delx.au - comingnext/blobdiff - comingNext/index.html
support for third panel
[comingnext] / comingNext / index.html
index ce0d15dbdf65b1fe4ee64e3e481336569de0b66b..ad665667916acdcf621703e0baccaad8dd544c52 100644 (file)
@@ -175,7 +175,7 @@ function isToday(date)
 \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
@@ -476,7 +476,7 @@ function updateData()
                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
@@ -578,7 +578,7 @@ function updateData()
                                }\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