]> code.delx.au - comingnext/blobdiff - comingNext/index.html
fixed help button on settings page require double tap (bug no. 3302891)
[comingnext] / comingNext / index.html
index 761cf5cebcd71d65f4cfe2f464d6587d7ef4d5ad..f30cb7d77a95fb9ebbc17fd69b41b0d55a7ed599 100644 (file)
@@ -83,7 +83,7 @@ var config = {
 // Nothing of interest from here on...\r
 //-------------------------------------------------------\r
 var panelNum = 0; // use 1 for second panel\r
-var version = "1.35";\r
+var version = "1.37";\r
 var versionURL = "http://comingnext.sourceforge.net/version.xml";\r
 var calendarService = null;\r
 var cacheEntriesHtml = [];\r
@@ -375,11 +375,16 @@ function collectLocales()
        }\r
 }\r
 \r
+function stringEndsWith(str, suffix)\r
+{\r
+       return str.indexOf(suffix, str.length - suffix.length) !== -1;\r
+}\r
+\r
 // detects the system's current time format by parsing a native calendar timestamp (this is the only reliable formating across all devices and firmwares)\r
 function detectTimeFormat(localeTimeString)\r
 {\r
        localeTimeString = localeTimeString.toLowerCase();\r
-       use12hoursTimeFormat = localeTimeString.indexOf("am") != -1 || localeTimeString.indexOf("pm") != -1 ? true : false;\r
+       use12hoursTimeFormat = stringEndsWith(localeTimeString, "am") || stringEndsWith(localeTimeString, "pm");\r
        timeFormatSeparator = localeTimeString.indexOf(":") != -1 ? ":" : ".";\r
 }\r
 \r
@@ -936,6 +941,7 @@ function updateData()
                        var text = config['nothingText'].Value.replace(/%d/, config['monthRange'].Value);\r
                        entriesHtml = '<div style="width:295px; height:75px; text-align:center; line-height:75px; overflow:visible;">' + text + '</div>';\r
                }\r
+               log("output: " + entriesHtml);\r
                if (cacheEntriesHtml != entriesHtml) {\r
                        if (mode == 0)\r
                                document.getElementById('calendarList').innerHTML = entriesHtml;\r
@@ -954,16 +960,21 @@ function updateData()
 // called by handleOnShow() and onResize events\r
 function updateScreen()\r
 {\r
-       log('updateScreen()');\r
+       log('updateScreen(): mode=' + mode + ', window.innerHeight=' + window.innerHeight);\r
 \r
        // check if opening fullscreen\r
-       if( window.innerHeight > 91 && mode == 0) {\r
+\r
+       // Note: according to Nokia's documentation, an innerHeight of >91 is an indicator for fullscreen view. \r
+       // However a bug in E6's firmware causes different window widths and heights (disabled compatibility scaling). \r
+       // So far, values of 104 and 115 for window.innerHeight were reported, we use a safty margin here and check \r
+       // for 150 instead.\r
+       if( window.innerHeight > 150 && mode == 0) {\r
                mode = 1;\r
                cacheEntriesHtml = '';\r
                document.getElementById('body').style.backgroundImage = "";\r
                showFullscreen();\r
        }\r
-       else if (window.innerHeight <= 91 && mode != 0) {\r
+       else if (window.innerHeight <= 150 && mode != 0) {\r
                mode = 0;\r
                cacheEntriesHtml = '';\r
                showHomescreen();\r
@@ -1294,7 +1305,7 @@ function loadSettings()
                                        log('Warning: unknown or invalid setting: ' + stringlist[i]);\r
                                        continue;\r
                                }\r
-                               log('stringlist: ' + key + '=\'' + value + '\'');\r
+                               log('stringlist[' + i + ']: ' + key + '=\'' + value + '\'');\r
                                if (config[key].Type == 'Int') {\r
                                        config[key].Value = Number(value);\r
                                        if (isNaN(config[key].Value))\r
@@ -1386,7 +1397,7 @@ function printHintBox(text)
 {\r
        uniqueId++;\r
        return '<td width="1%" align="right" onclick="javascript:toggleVisibility(\'info' + uniqueId + '\')">' + getLocalizedText('settings.help') + '</td></tr></table>'+\r
-              '<div class="settingsInfo" id="info' + uniqueId + '">' + text + '</div>';\r
+              '<div class="settingsInfo" id="info' + uniqueId + '" style="display:none">' + text + '</div>';\r
 }\r
 \r
 function showAbout()\r
@@ -1766,11 +1777,15 @@ hr { color:#ffffff; background-color:#ffffff; height:1px; text-align:left; borde
        <p>Contributions:</p>\r
                <p class="credits">Paul Moore (bug fixes, new features and code cleanup)</p>\r
                <p class="credits">Manfred Hanselmann (DST support)</p>\r
-               <p class="credits">Christophe Milsent (translation support & french translation)</p>\r
-               <p class="credits">Flavio Nathan (portuguese-brazilian translation)</p>\r
-               <p class="credits">Tokeda (russian translation)</p>\r
-               <p class="credits">Marcella Ferrari (italian translation)</p>\r
-               <p class="credits">Venos (italian translation)</p>\r
+               <p class="credits">Christophe Milsent (translation support & French translation)</p>\r
+               <p class="credits">Flavio Nathan (Portuguese-Brazilian translation)</p>\r
+               <p class="credits">Tokeda (Russian translation)</p>\r
+               <p class="credits">Marcella Ferrari (Italian translation)</p>\r
+               <p class="credits">Venos (Italian translation)</p>\r
+               <p class="credits">Francisco Rodero (Catalan translation)</p>\r
+               <p class="credits">zbigzbig20 (Polish translation)</p>\r
+               <p class="credits">Streamkeskus (Finnish translation)</p>\r
+               <p class="credits">renek (Czech translation)</p>\r
        <p>This software is open source and licensed under the GPLv3.</p>\r
        <p>Visit <a onclick="widget.openURL('http://comingnext.sf.net/'); return false;" href="http://comingnext.sf.net/">comingnext.sf.net</a> for free updates.</p>\r
        <hr />\r