X-Git-Url: https://code.delx.au/comingnext/blobdiff_plain/b19c3492f1e0d8689b3e09cbc6a0cef0832fa514..7462eb0578c84056fb0934aa0cbd1acb4873a993:/comingNext/index.html diff --git a/comingNext/index.html b/comingNext/index.html index 761cf5c..f30cb7d 100644 --- a/comingNext/index.html +++ b/comingNext/index.html @@ -83,7 +83,7 @@ var config = { // Nothing of interest from here on... //------------------------------------------------------- var panelNum = 0; // use 1 for second panel -var version = "1.35"; +var version = "1.37"; var versionURL = "http://comingnext.sourceforge.net/version.xml"; var calendarService = null; var cacheEntriesHtml = []; @@ -375,11 +375,16 @@ function collectLocales() } } +function stringEndsWith(str, suffix) +{ + return str.indexOf(suffix, str.length - suffix.length) !== -1; +} + // detects the system's current time format by parsing a native calendar timestamp (this is the only reliable formating across all devices and firmwares) function detectTimeFormat(localeTimeString) { localeTimeString = localeTimeString.toLowerCase(); - use12hoursTimeFormat = localeTimeString.indexOf("am") != -1 || localeTimeString.indexOf("pm") != -1 ? true : false; + use12hoursTimeFormat = stringEndsWith(localeTimeString, "am") || stringEndsWith(localeTimeString, "pm"); timeFormatSeparator = localeTimeString.indexOf(":") != -1 ? ":" : "."; } @@ -936,6 +941,7 @@ function updateData() var text = config['nothingText'].Value.replace(/%d/, config['monthRange'].Value); entriesHtml = '
' + text + '
'; } + log("output: " + entriesHtml); if (cacheEntriesHtml != entriesHtml) { if (mode == 0) document.getElementById('calendarList').innerHTML = entriesHtml; @@ -954,16 +960,21 @@ function updateData() // called by handleOnShow() and onResize events function updateScreen() { - log('updateScreen()'); + log('updateScreen(): mode=' + mode + ', window.innerHeight=' + window.innerHeight); // check if opening fullscreen - if( window.innerHeight > 91 && mode == 0) { + + // Note: according to Nokia's documentation, an innerHeight of >91 is an indicator for fullscreen view. + // However a bug in E6's firmware causes different window widths and heights (disabled compatibility scaling). + // So far, values of 104 and 115 for window.innerHeight were reported, we use a safty margin here and check + // for 150 instead. + if( window.innerHeight > 150 && mode == 0) { mode = 1; cacheEntriesHtml = ''; document.getElementById('body').style.backgroundImage = ""; showFullscreen(); } - else if (window.innerHeight <= 91 && mode != 0) { + else if (window.innerHeight <= 150 && mode != 0) { mode = 0; cacheEntriesHtml = ''; showHomescreen(); @@ -1294,7 +1305,7 @@ function loadSettings() log('Warning: unknown or invalid setting: ' + stringlist[i]); continue; } - log('stringlist: ' + key + '=\'' + value + '\''); + log('stringlist[' + i + ']: ' + key + '=\'' + value + '\''); if (config[key].Type == 'Int') { config[key].Value = Number(value); if (isNaN(config[key].Value)) @@ -1386,7 +1397,7 @@ function printHintBox(text) { uniqueId++; return '' + getLocalizedText('settings.help') + ''+ - '
' + text + '
'; + ''; } function showAbout() @@ -1766,11 +1777,15 @@ hr { color:#ffffff; background-color:#ffffff; height:1px; text-align:left; borde

Contributions:

Paul Moore (bug fixes, new features and code cleanup)

Manfred Hanselmann (DST support)

-

Christophe Milsent (translation support & french translation)

-

Flavio Nathan (portuguese-brazilian translation)

-

Tokeda (russian translation)

-

Marcella Ferrari (italian translation)

-

Venos (italian translation)

+

Christophe Milsent (translation support & French translation)

+

Flavio Nathan (Portuguese-Brazilian translation)

+

Tokeda (Russian translation)

+

Marcella Ferrari (Italian translation)

+

Venos (Italian translation)

+

Francisco Rodero (Catalan translation)

+

zbigzbig20 (Polish translation)

+

Streamkeskus (Finnish translation)

+

renek (Czech translation)

This software is open source and licensed under the GPLv3.

Visit comingnext.sf.net for free updates.