From: Michael Prager Date: Sat, 26 Mar 2011 14:40:33 +0000 (+0100) Subject: added 'Help' menu, changed link color, added help link for "missing calendar service... X-Git-Url: https://code.delx.au/comingnext/commitdiff_plain/530102bbe0361b899b948235cb5f9010b4d6df1b added 'Help' menu, changed link color, added help link for "missing calendar service" error. Widget will now load properly on such an error too. Also updated URLs to website to new location comingnext.sf.net --- diff --git a/Readme.txt b/Readme.txt index 7ee2179..4767858 100644 --- a/Readme.txt +++ b/Readme.txt @@ -7,7 +7,7 @@ events on your S60 5th Edition phone's home screen. It consists of tree separate widgets, displaying 4 events each. For more info or to report bugs, please refer to -http://sourceforge.net/projects/comingnext +http://comingnext.sf.net/ and http://www.symbian-freak.com/forum/viewtopic.php?t=38045 @@ -260,3 +260,4 @@ Changelog: - fixed sorting of events without date - fixed calendar indicators not showing in some cases - fixed homescreen widget not updating properly on N8 + - added help menu diff --git a/comingNext/de.lproj/localizedTextStrings.js b/comingNext/de.lproj/localizedTextStrings.js index 03471ec..faf9a0a 100644 --- a/comingNext/de.lproj/localizedTextStrings.js +++ b/comingNext/de.lproj/localizedTextStrings.js @@ -4,6 +4,7 @@ localizedText['menu.settings'] = 'Einstellungen'; localizedText['menu.openCalendarApp'] = 'Öffne Kalender'; localizedText['menu.about'] = 'Über'; localizedText['menu.update'] = 'Nach Updates suchen'; +localizedText['menu.help'] = 'Hilfe'; localizedText['softkey.back'] = 'Zurück'; diff --git a/comingNext/es-ES.lproj/localizedTextStrings.js b/comingNext/es-ES.lproj/localizedTextStrings.js index 5998be4..bd3e0c6 100644 --- a/comingNext/es-ES.lproj/localizedTextStrings.js +++ b/comingNext/es-ES.lproj/localizedTextStrings.js @@ -4,6 +4,7 @@ localizedText['menu.settings'] = 'Configuración'; localizedText['menu.openCalendarApp'] = 'Abrir Calendario'; localizedText['menu.about'] = 'Acerca de'; localizedText['menu.update'] = 'Comprobar nueva versión'; +localizedText['menu.help'] = 'Ayuda'; localizedText['softkey.back'] = 'Atrás'; diff --git a/comingNext/fr.lproj/localizedTextStrings.js b/comingNext/fr.lproj/localizedTextStrings.js index a6df253..4fa7447 100644 --- a/comingNext/fr.lproj/localizedTextStrings.js +++ b/comingNext/fr.lproj/localizedTextStrings.js @@ -4,6 +4,7 @@ localizedText['menu.settings'] = 'Parametres'; localizedText['menu.openCalendarApp'] = 'Ouvrir Calendrier'; localizedText['menu.about'] = 'A propos'; localizedText['menu.update'] = 'Check for new version'; +localizedText['menu.help'] = 'Aide'; localizedText['softkey.back'] = 'Back'; diff --git a/comingNext/index.html b/comingNext/index.html index af47f3b..7e774b9 100644 --- a/comingNext/index.html +++ b/comingNext/index.html @@ -99,6 +99,7 @@ var calendarColors = []; var updateTimer = null; var screenRotationTimer = null; var lastUpdateTime = now; +var errorOccured = false; // vars for daylight saving time var summertime = false; // true, if current date is in summer, false if in winter @@ -193,6 +194,9 @@ function error(message) { console.info('Error: ' + message); document.getElementById("calendarList").innerHTML = 'Error: ' + message; + document.getElementById("fullscreenCalendarList").innerHTML = 'Error: ' + message; + errorOccured = true; + document.onclick = null; } function areDatesEqual(date1, date2) @@ -515,6 +519,9 @@ function formatTime(date) function updateData() { console.info('updateData()'); + if (errorOccured) { + return; + } // check if we got additional or less calendars since our last update var newCalendarList = listCalendars(); @@ -847,8 +854,8 @@ function init() else throw('device object does not exist'); } catch(e) { - error('loading Calendar service: ' + e + ', line ' + e.line); - return; + error('loading Calendar service: ' + e + ', line ' + e.line + '
' + getLocalizedText('menu.help') + ''); + //return; } calendarList = listCalendars(); @@ -896,15 +903,18 @@ function createMenu() var id = 0; var menuSettings = new MenuItem(getLocalizedText('menu.settings'), id++); var menuCallApp = new MenuItem(getLocalizedText('menu.openCalendarApp'), id++); + var menuHelp = new MenuItem(getLocalizedText('menu.help'), id++); var menuUpdate = new MenuItem(getLocalizedText('menu.update'), id++); var menuAbout = new MenuItem(getLocalizedText('menu.about'), id++); menuSettings.onSelect = showSettings; menuAbout.onSelect = showAbout; menuCallApp.onSelect = launchCalendar; menuUpdate.onSelect = showUpdate; + menuHelp.onSelect = showHelp; window.menu.clear(); window.menu.append(menuCallApp); window.menu.append(menuSettings); + window.menu.append(menuHelp); window.menu.append(menuUpdate); window.menu.append(menuAbout); } @@ -1203,6 +1213,10 @@ function showAbout() document.getElementById("name").innerHTML = "Coming Next " + version; } +function showHelp() { + widget.openURL('http://comingnext.sf.net/help'); +} + function updateFullscreen() { } @@ -1213,13 +1227,16 @@ function showFullscreen() hideViews(); document.getElementById("fullscreenView").style.display = "block"; document.getElementById('body').className = "backgroundFullscreen"; - document.onclick = launchCalendar; + if (!errorOccured) + document.onclick = launchCalendar; createMenu(); updateData(); } function getBackgroundImage() { + if (errorOccured) + return ''; var bgImage; if (config['backgroundImageLocation'].Value == config['backgroundImageLocation'].ValidValues[0]) // internal bgImage = 'background_' + orientation + '.png'; @@ -1495,6 +1512,7 @@ function updateCalendarColors()