<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
<html xmlns="http://www.w3.org/1999/xhtml">\r
<head>\r
+\r
<title>Coming Next</title>\r
+\r
<style type="text/css">\r
-/* -----------------------------------------------------------------------\r
-here you can customize background color, font color, font size etc...\r
---------------------------------------------------------------------------- */\r
-.background { color:#ffffff; background-color:#000000; font:normal 12pt; } /* Defines the background of the widget. If you want to use a background image, set useBackgroundImage = true below */\r
-.weekDay { } /* Defines the appearance of all week day texts */\r
-.date { } /* Defines the appearance of all date texts */\r
-.today { color:#ff0000; } /* Defines the appearance of "Today" text */\r
-.time { } /* Defines the appearance of all time texts */\r
-.now { color:#ff0000; } /* Defines the appearance of "Now" text */\r
-.description { } /* Defines the appearance of all event descriptions */\r
-.icon { width:15px; height:15px; } /* Defines size and appearance of icons */\r
+/* The following classes can be modified by widget settings */\r
+.background { }\r
+.backgroundFullscreen { }\r
+.weekDay { }\r
+.date { }\r
+.today { }\r
+.tomorrow { }\r
+.time { }\r
+.now { }\r
+.description { }\r
+.icon { }\r
</style>\r
+\r
<script>\r
-//---------------------------------------------------------------\r
-// The following section contains settings you may want to tweak\r
-//---------------------------------------------------------------\r
-var monthRange = 2; // number of months to include in the event list\r
-var includeTodos = true; // disable to remove ToDos from event list\r
-var useBackgroundImage = true; // use background_portrait.png and background_landscape.png to fake transparency. Set to "false" to use a solid background color\r
-var showTodayAsText = true; // if enabled, the current date will be shown as "Today" instead of "31.12"\r
-var todayText = 'Today'; // text to display for "Today"\r
-var showNowAsText = true; // if enabled, the appointment time will be shown as "Now" instead of "12:00"\r
-var nowText = 'Now'; // text to display for "Now"\r
-var dateSeparator = '.'; // separator for dates. e.g. "31.12" or "31/12"\r
-var dateFormat = 'auto' // how dates will be displayed. 'auto' will autodetect your phone's date format setting. 'MMDD' will write month first, 'DDMM' will write day first\r
-var weekDayLength = 2; // defines how many characters of the weekday will be shown. E.g. 2 will cut "Friday" to "Fr"\r
-var updateDataInterval = 5; // how many minutes to wait before updating the displayed data. The higher the number, the less battery is used\r
-var calendarApp = 0x10005901; // UID of the calendar app to run when clicking the widget. 0x10005901 = buildin calendar, 0x20004ec1 = Epocware Handy Calendar\r
-var eventsPerWidget = 4; // number of events to show per widget. Default is 4\r
-var showNothingText = true; // if set to "true", show a text if no events are in the list\r
-var nothingText = 'No further events within '+monthRange+' months'; // text to show when no events are in the list\r
+// valid types for the config object are 'Int', 'Bool', 'String', 'Enum', 'UID'\r
+var config = {\r
+monthRange: {\r
+ Type: 'Int',\r
+ Default: 2,\r
+ Value: 2,\r
+ Name: 'Month Range',\r
+ Info: 'number of months to include in the event list',},\r
+includeTodos: {\r
+ Type: 'Bool',\r
+ Default: true,\r
+ Value: true,\r
+ Name: 'Include ToDos',\r
+ Info: 'disable to remove ToDos from event list',},\r
+useBackgroundImage: {\r
+ Type: 'Bool',\r
+ Default: true,\r
+ Value: true,\r
+ Name: 'Use Background Image',\r
+ Info: 'use background_portrait.png and background_landscape.png to fake transparency. Disable to use a solid background color',},\r
+showCombinedDateTime: {\r
+ Type: 'Bool',\r
+ Default: false,\r
+ Value: false,\r
+ Name: 'Show Combined Date/Time',\r
+ Info: 'only show the time for events happening today, otherwise just show the date',},\r
+showLocation: {\r
+ Type: 'Bool',\r
+ Default: true,\r
+ Value: true,\r
+ Name: 'Show Location',\r
+ Info: 'show the location for meeting events',},\r
+showTodayAsText: {\r
+ Type: 'Bool',\r
+ Default: true,\r
+ Value: true,\r
+ Name: 'Show Today as Text',\r
+ Info: 'if enabled, the current date will be shown as "Today" instead of "31.12"',},\r
+todayText: {\r
+ Type: 'String',\r
+ Default: 'Today',\r
+ Value: 'Today',\r
+ Name: '"Today" Text',\r
+ Info: 'text to display for "Today"',},\r
+tomorrowText: {\r
+ Type: 'String',\r
+ Default: 'Tomorrow',\r
+ Value: 'Tomorrow',\r
+ Name: '"Tomorrow" Text',\r
+ Info: 'text to display for "Tomorrow"',},\r
+showNowAsText: {\r
+ Type: 'Bool',\r
+ Default: true,\r
+ Value: true,\r
+ Name: 'Show Now as Text',\r
+ Info: 'if enabled, the appointment time will be shown as "Now" instead of "12:00"',},\r
+nowText: {\r
+ Type: 'String',\r
+ Default: 'Now',\r
+ Value: 'Now',\r
+ Name: '"Now" Text',\r
+ Info: 'text to display for "Now"',},\r
+dateSeparator: {\r
+ Type: 'String',\r
+ Default: '.',\r
+ Value: '.',\r
+ Name: 'Date Separator',\r
+ Info: 'separator for dates. e.g. "31.12" or "31/12"',},\r
+dateFormat: {\r
+ Type: 'Enum',\r
+ Default: 'auto',\r
+ Value: 'auto',\r
+ ValidValues: ['auto', 'DDMM', 'MMDD'],\r
+ Name: 'Date Format',\r
+ Info: 'how dates will be displayed. \'auto\' will autodetect your phone\'s date format setting. \'MMDD\' will write month first, \'DDMM\' will write day first',},\r
+weekDayLength: {\r
+ Type: 'Int',\r
+ Default: 2,\r
+ Value: 2,\r
+ Name: 'Weekday Length',\r
+ Info: 'defines how many characters of the weekday will be shown. E.g. 2 will cut "Friday" to "Fr"',},\r
+updateDataInterval: {\r
+ Type: 'Int',\r
+ Default: 5,\r
+ Value: 5,\r
+ Name: 'Update Data Interval',\r
+ Info: 'how many minutes to wait before updating the displayed data. The higher the number, the less battery is used',},\r
+calendarApp: {\r
+ Type: 'UID',\r
+ Default: 0x10005901,\r
+ Value: 0x10005901,\r
+ Name: 'Calendar Application To Run',\r
+ Info: 'UID of the calendar app to run when clicking the widget. 0x10005901 = buildin calendar, 0x20004ec1 = Epocware Handy Calendar',},\r
+eventsPerWidget: {\r
+ Type: 'Int',\r
+ Default: 4,\r
+ Value: 4,\r
+ Name: 'Events Per Widget',\r
+ Info: 'number of events to show per widget. Default is 4',},\r
+showNothingText: {\r
+ Type: 'Bool',\r
+ Default: true,\r
+ Value: true,\r
+ Name: 'Show "Nothing" Text',\r
+ Info: 'if enabled, show a text if no events are in the list',},\r
+nothingText: {\r
+ Type: 'String',\r
+ Default: 'No further events within 2 months',\r
+ Value: 'No further events within 2 months',\r
+ Name: '"No further events..." Text',\r
+ Info: 'text to show when no events are in the list',},\r
+enableDaylightSaving: {\r
+ Type: 'Bool',\r
+ Default: true,\r
+ Value: true,\r
+ Name: 'Enable Daylight Saving (+1h)',\r
+ Info: 'enable this if you are in a timezone that has daylight saving time (+1h)',},\r
+cssStyle_background: {\r
+ Type: 'String',\r
+ Default: 'color:#ffffff; background-color:#000000',\r
+ Value: 'color:#ffffff; background-color:#000000',\r
+ Name: '.background',\r
+ Info: 'Defines the background of the widget. If you want to use a background image, set useBackgroundImage = true below. For the default themes, black, gray, and light blue, codes are #292029, #e7dfe7, #009aef',},\r
+cssStyle_backgroundFullscreen: {\r
+ Type: 'String',\r
+ Default: 'color:#ffffff; background-color:#000000',\r
+ Value: 'color:#ffffff; background-color:#000000',\r
+ Name: '.backgroundFullscreen',\r
+ Info: 'Same as background but for the fullscreen version of the widget',},\r
+cssStyle_weekDay: {\r
+ Type: 'String',\r
+ Default: '',\r
+ Value: '',\r
+ Name: '.weekDay',\r
+ Info: 'Defines the appearance of all week day texts',},\r
+cssStyle_date: {\r
+ Type: 'String',\r
+ Default: '',\r
+ Value: '',\r
+ Name: '.date',\r
+ Info: 'Defines the appearance of all date texts',},\r
+cssStyle_today: {\r
+ Type: 'String',\r
+ Default: 'color:#ff0000',\r
+ Value: 'color:#ff0000',\r
+ Name: '.today',\r
+ Info: 'Defines the appearance of "Today" text',},\r
+cssStyle_tomorrow: {\r
+ Type: 'String',\r
+ Default: 'color:#0000ff',\r
+ Value: 'color:#0000ff',\r
+ Name: '.tomorrow',\r
+ Info: 'Defines the appearance of "Tomorrow" text',},\r
+cssStyle_time: {\r
+ Type: 'String',\r
+ Default: '',\r
+ Value: '',\r
+ Name: '.time',\r
+ Info: 'Defines the appearance of all time texts',},\r
+cssStyle_now: {\r
+ Type: 'String',\r
+ Default: 'color:#ff00ff',\r
+ Value: 'color:#ff00ff',\r
+ Name: '.now',\r
+ Info: 'Defines the appearance of "Now" text',},\r
+cssStyle_description: {\r
+ Type: 'String',\r
+ Default: '',\r
+ Value: '',\r
+ Name: '.description',\r
+ Info: 'Defines the appearance of all event descriptions',},\r
+cssStyle_icon: {\r
+ Type: 'String',\r
+ Default: 'width:15px; height:15px',\r
+ Value: 'width:15px; height:15px',\r
+ Name: '.icon',\r
+ Info: 'Defines size and appearance of icons',},\r
+}\r
\r
//-------------------------------------------------------\r
// Nothing of interest from here on...\r
//-------------------------------------------------------\r
var panelNum = 1; // use 1 for second panel\r
+var version = "1.23";\r
var calendarService = null;\r
var cacheEntriesHtml = [];\r
var months_translated = [];\r
var orientation = '';\r
var now = new Date();\r
+var mode = 0; // 0 = homescreen, 1 = fullscreen, 2 = settings, 3 = about\r
+\r
+// vars for daylight saving time\r
+var daylightsavingWinter = 0;\r
+var daylightsavingSummer = 0;\r
+var summertime = false;\r
\r
window.onload = init;\r
window.onresize = updateScreen;\r
window.onshow = updateScreen;\r
\r
-function error(message){\r
+function isLeapYear( year ) {\r
+ if (( year % 4 == 0 && year % 100 != 0 ) || year % 400 == 0 )\r
+ return true;\r
+ else\r
+ return false;\r
+}\r
+ \r
+function calcLeapYear(year, days)\r
+{\r
+ if (isLeapYear(year))\r
+ return ++days;\r
+ else\r
+ return days;\r
+}\r
+ \r
+function subToSunday(myDate, year, days, prevMonthDays)\r
+{\r
+ for (i = myDate.getDay(); i > 0 ;i--)\r
+ days--;\r
+ days -= prevMonthDays;\r
+ days = isLeapYear(year) ? --days : days;\r
+ return days;\r
+}\r
+ \r
+function calcDaylightSaving()\r
+{\r
+ var thisYearS = new Date(now.getFullYear(), 3, 0, 0, 0, 0 );\r
+ var thisYearW = new Date(now.getFullYear(), 10, 0, 0, 0, 0 );\r
+ var nextYearS = new Date(now.getFullYear() + 1, 3, 0, 0, 0, 0 );\r
+ var nextYearW = new Date(now.getFullYear() + 1, 10, 0, 0, 0, 0 );\r
+ var summer = false;\r
+ var winter = false;\r
+ \r
+ thisYearSDays = nextYearSDays = 90;\r
+ thisYearWDays = nextYearWDays = 304;\r
+ \r
+ thisYearSDays = calcLeapYear(now.getFullYear(), thisYearSDays);\r
+ thisYearWDays = calcLeapYear(now.getFullYear(), thisYearWDays);\r
+ nextYearSDays = calcLeapYear(now.getFullYear() + 1, nextYearSDays);\r
+ nextYearWDays = calcLeapYear(now.getFullYear() + 1, nextYearWDays);\r
+ \r
+ thisYearSDays = subToSunday(thisYearS, now.getFullYear(), thisYearSDays, 59);\r
+ thisYearWDays = subToSunday(thisYearW, now.getFullYear(), thisYearWDays, 273);\r
+ nextYearSDays = subToSunday(nextYearS, now.getFullYear() + 1, nextYearSDays, 59);\r
+ nextYearWDays = subToSunday(nextYearW, now.getFullYear() + 1, nextYearWDays, 273);\r
+ \r
+ daylightsavingSummer = new Date (now.getFullYear(), 03-1, thisYearSDays, 2, 0, 0);\r
+ daylightsavingWinter = new Date (now.getFullYear(), 10-1, thisYearWDays, 2, 0, 0);\r
+ if (daylightsavingSummer < now) {\r
+ daylightsavingSummer = new Date (now.getFullYear()+1, 03-1, nextYearSDays, 2, 0, 0);\r
+ var summer = true;\r
+ }\r
+ if (daylightsavingWinter < now) {\r
+ daylightsavingWinter = new Date (now.getFullYear()+1, 10-1, nextYearWDays, 2, 0, 0);\r
+ var winter = true;\r
+ }\r
+ if (summer && !winter)\r
+ summertime = true;\r
+ else\r
+ summertime = false;\r
+}\r
+\r
+function error(message)\r
+{\r
console.info('Error: ' + message);\r
document.getElementById("calendarList").innerHTML = 'Error: ' + message;\r
}\r
\r
-function collectLocales(){\r
- if (months_translated.length > 0){\r
- return;\r
- }\r
+function isToday(date)\r
+{\r
+ if (date.getDate() == now.getDate() && date.getMonth() == now.getMonth())\r
+ return true;\r
+ return false;\r
+}\r
+\r
+function isTomorrow(date)\r
+{\r
+ if ((date.getDate() == now.getDate() + 1 && date.getMonth() == now.getMonth()) ||\r
+ (date.getDate() == 0 && date.getMonth() == now.getMonth() + 1) ||\r
+ (date.getDate() == 0 && date.getMonth() == now.getMonth() + 1 && date.getYear() == now.getYear() + 1))\r
+ return true;\r
+ return false;\r
+}\r
+\r
+function collectLocales()\r
+{\r
var tmpyear = ((panelNum == 0) ? 2000 : 2001);\r
var month = 0;\r
- for(month = 0; month < 12; month++){\r
+\r
+ if (months_translated.length > 0)\r
+ return;\r
+ for (month = 0; month < 12; month++) {\r
var startDate = new Date(tmpyear, month, 15);\r
+\r
var item = new Object();\r
item.Type = "DayEvent";\r
item.StartTime = startDate;\r
\r
try {\r
var result = calendarService.IDataSource.Add(criteria);\r
- if (result.ErrorCode){\r
+ if (result.ErrorCode)\r
error(result.ErrorMessage);\r
- }\r
- }\r
- catch (e) {\r
+ } catch (e) {\r
error("collectLocales: " + e + ', line ' + e.line);\r
}\r
}\r
- try{\r
+ try {\r
var startTime = new Date(tmpyear,0,1);\r
var endTime = new Date(tmpyear,11,31);\r
var listFiltering = {\r
}\r
}\r
var result = calendarService.IDataSource.GetList(listFiltering);\r
- if (result.ErrorCode){\r
+ if (result.ErrorCode) {\r
error(result.ErrorMessage);\r
return;\r
}\r
var list = result.ReturnValue;\r
- }catch(e){ \r
+ } catch(e) {\r
error(e + ', line ' + e.line);\r
return;\r
}\r
var ids = new Array();\r
- try{\r
+ try {\r
var entry;\r
var counter = 0;\r
var dateArr = [];\r
- while( list && (entry = list.getNext()) != undefined ){\r
+\r
+ while (list && (entry = list.getNext()) != undefined) {\r
dateArr = entry.StartTime.replace(/,/g,'').replace(/\./g,':').replace(/ /g,' ').split(' ');\r
var day = dateArr[1];\r
var month = dateArr[2];\r
var year = dateArr[3];\r
+\r
// make sure month is set properly\r
- if (isNaN(parseInt(day))){\r
+ if (isNaN(parseInt(day))) {\r
var tmp = day;\r
day = month;\r
month = tmp;\r
- }\r
- else if (isNaN(parseInt(year))){\r
+ } else if (isNaN(parseInt(year))) {\r
var tmp = year;\r
year = month;\r
month = tmp;\r
}\r
+\r
console.info(entry.StartTime + ' -> ' + month + ' ' + counter);\r
ids[counter] = entry.id;\r
months_translated[month] = counter + 1;\r
counter++;\r
}\r
- }catch(e){\r
+ } catch(e) {\r
error(e + ', line ' + e.line);\r
return;\r
}\r
console.info(ids);\r
- try{\r
+ try {\r
var criteria = new Object();\r
criteria.Type = "CalendarEntry";\r
criteria.Data = {\r
IdList: ids\r
}\r
+\r
var result = calendarService.IDataSource.Delete(criteria);\r
if (result.ErrorCode)\r
error(result.ErrorMessage);\r
- }catch(e){\r
+ } catch(e) {\r
error('deleting temp calendar entries:' + e + ', line ' + e.line);\r
return;\r
}\r
}\r
\r
-function requestNotification(){\r
+function requestNotification()\r
+{\r
var criteria = new Object();\r
criteria.Type = "CalendarEntry";\r
+\r
try {\r
var result = calendarService.IDataSource.RequestNotification(criteria, callback);\r
if (result.ErrorCode)\r
error('loading Calendar items list');\r
- }\r
- catch (e) {\r
+ } catch (e) {\r
error("requestNotification: " + e + ', line ' + e.line);\r
}\r
}\r
\r
-function callback(transId, eventCode, result){\r
+function callback(transId, eventCode, result)\r
+{\r
updateData();\r
}\r
\r
Wednesday, August 26, 2009 12:00:00 am\r
Wednesday, 2009 August, 26 12:00:00 am\r
Wednesday, 2009 August, 28 8.00.00 pm\r
+ Wednesday, 2009 August, 28 08:00:00 PM\r
*/\r
+\r
if (dateString == "" || dateString == null)\r
return null;\r
- \r
var dateArr = dateString.replace(/,/g,'').replace(/\./g,':').replace(/ /g,' ').split(' ');\r
- \r
if (dateArr.length != 5 && dateArr.length != 6)\r
return null;\r
- \r
+\r
// parse date\r
var weekDay = dateArr[0];\r
var day = dateArr[1];\r
var month = dateArr[2];\r
var year = dateArr[3];\r
// make sure month is set properly\r
- if (isNaN(parseInt(day))){\r
+ if (isNaN(parseInt(day))) {\r
var tmp = day;\r
day = month;\r
month = tmp;\r
- }\r
- else if (isNaN(parseInt(year))){\r
+ } else if (isNaN(parseInt(year))) {\r
var tmp = year;\r
year = month;\r
month = tmp;\r
}\r
// make sure day and year are set properly\r
- if (Number(day) > Number(year))\r
- {\r
+ if (Number(day) > Number(year)) {\r
var tmp = year;\r
year = day;\r
day = tmp;\r
var hours = Number(timeArr[0]);\r
var minutes = Number(timeArr[1]);\r
var seconds = Number(timeArr[2]);\r
- if (dateArr.length == 6 && dateArr[5].toLowerCase() == 'pm')\r
+ if (dateArr.length == 6 && dateArr[5].toLowerCase() == 'pm' && hours < 12)\r
hours += 12;\r
- \r
+ if (dateArr.length == 6 && dateArr[5].toLowerCase() == 'am' && hours == 12)\r
+ hours = 0;\r
+\r
console.info('year=' + year + ' month=' + month + ' day=' + day + ' hours=' + hours + ' minutes=' + minutes+ ' seconds=' + seconds);\r
- \r
+\r
+ // take care of daylight saving time\r
+ if (config['enableDaylightSaving'].Value) {\r
+ var date = new Date(year, month - 1, day, hours, minutes, seconds);\r
+ if (summertime && date > daylightsavingWinter && date < daylightsavingSummer)\r
+ hours -= 1;\r
+ else if (!summertime && date > daylightsavingSummer && date < daylightsavingWinter)\r
+ hours += 1;\r
+ }\r
+\r
return new Date(year, month - 1, day, hours, minutes, seconds);\r
}\r
\r
while (day.length < 2) { day = '0' + day; }\r
while (month.length < 2) { month = '0' + month; }\r
\r
- if (showTodayAsText && now.getDate() == date.getDate() && now.getMonth() == date.getMonth())\r
- return '<span class="today">' + todayText + '</span>';\r
- \r
+ if (config['showTodayAsText'].Value && isToday(date))\r
+ return '<span class="today">' + config['todayText'].Value + '</span>';\r
+ if (config['showTodayAsText'].Value && isTomorrow(date))\r
+ return '<span class="tomorrow">' + config['tomorrowText'].Value + '</span>';\r
+\r
var dateArr = format.replace(/,/g,'').replace(/\./g,':').replace(/ /g,' ').split(' ');\r
- \r
- if (dateArr.length != 5 && dateArr.length != 6){\r
+ if (dateArr.length != 5 && dateArr.length != 6) {\r
// we don't know how to format this\r
- if (dateFormat == 'auto' || dateFormat == 'DDMM')\r
- return day + dateSeparator + month;\r
- else \r
- return month + dateSeparator + day;\r
+ if (config['dateFormat'].Value == 'auto' || config['dateFormat'].Value == 'DDMM')\r
+ return day + config['dateSeparator'].Value + month;\r
+ else\r
+ return month + config['dateSeparator'].Value + day;\r
}\r
- \r
+\r
var dayFirst = true;\r
- if (dateFormat == 'MMDD')\r
+ if (config['dateFormat'].Value == 'MMDD')\r
dayFirst = false;\r
- else if (dateFormat == 'DDMM')\r
+ else if (config['dateFormat'].Value == 'DDMM')\r
dayFirst = true;\r
- else { // dateFormat == 'auto', try to detect system setting\r
+ else {\r
+ // config['dateFormat'].Value == 'auto', try to detect system setting\r
// parse date\r
var day_ = dateArr[1];\r
var month_ = dateArr[2];\r
var year_ = dateArr[3];\r
// make sure month is set properly\r
- if (isNaN(parseInt(day_))){\r
+ if (isNaN(parseInt(day_))) {\r
var tmp = day_;\r
day_ = month_;\r
month_ = tmp;\r
dayFirst = false;\r
- }\r
- else if (isNaN(parseInt(year_))){\r
+ } else if (isNaN(parseInt(year_))) {\r
var tmp = year_;\r
year_ = month_;\r
month_ = tmp;\r
if (Number(day_) > Number(year_))\r
dayFirst = false;\r
}\r
- \r
+\r
if (dayFirst)\r
- return day + dateSeparator + month;\r
+ return day + config['dateSeparator'].Value + month;\r
else\r
- return month + dateSeparator + day;\r
+ return month + config['dateSeparator'].Value + day;\r
}\r
\r
function formatTime(date)\r
var time = date.toLocaleTimeString().replace(/[\.:]00/, ''); // remove seconds from string\r
if (time.replace(/\./, ':').split(':')[0].length < 2)\r
time = '0' + time;\r
- if (showNowAsText && date.getTime() == now.getTime())\r
- time = '<span class="now">' + nowText + '</span>';\r
+ if (config['showNowAsText'].Value && date.getTime() == now.getTime())\r
+ time = '<span class="now">' + config['nowText'].Value + '</span>';\r
return time;\r
}\r
\r
-function updateData(){\r
- try{\r
+function updateData()\r
+{\r
+ calcDaylightSaving();\r
+ try {\r
// meetings have time\r
// note: anniveraries have a start time of 12:00am. So since we want to include them, we have to query the whole day and check if events have passed later\r
now = new Date();\r
var meetingListFiltering = {\r
- Type:'CalendarEntry', \r
+ Type:'CalendarEntry',\r
Filter:{\r
- StartRange: (new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0)), \r
- EndRange: (new Date(now.getFullYear(), now.getMonth() + monthRange, now.getDate(), 0, 0, 0))\r
+ StartRange: (new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0)),\r
+ EndRange: (new Date(now.getFullYear(), now.getMonth() + config['monthRange'].Value, now.getDate(), 0, 0, 0))\r
}\r
}\r
var meetingResult = calendarService.IDataSource.GetList(meetingListFiltering);\r
var meetingList = meetingResult.ReturnValue;\r
+\r
// todos don't, they start on 00:00 hrs., but should be visible anyway\r
// this will generate a list of passed todos. We have to check if they have been marked as "done" yet\r
- if (includeTodos){\r
+ if (config['includeTodos'].Value) {\r
var todayTodoListFiltering = {\r
- Type:'CalendarEntry', \r
+ Type:'CalendarEntry',\r
Filter:{\r
Type: 'ToDo',\r
StartRange: (new Date(now.getFullYear() - 1, now.getMonth(), now.getDate(), 0, 0, 0)),\r
} else {\r
var entryLists = [meetingList];\r
}\r
- }catch(e){ \r
+ } catch(e) {\r
error('loading Calendar items list:' + e + ', line ' + e.line);\r
return;\r
}\r
- \r
- try{\r
+\r
+ try {\r
var entry;\r
var counter = 0;\r
var entryDate = '';\r
var dateArr = [];\r
var entriesHtml = '<table>';\r
var eventIds = [];\r
- var max = ((panelNum == 0) ? eventsPerWidget : 2 * eventsPerWidget);\r
+ var max;\r
+ if (mode == 0)\r
+ max = ((panelNum == 0) ? config['eventsPerWidget'].Value : 2 * config['eventsPerWidget'].Value);\r
+ else\r
+ max = 30; // we can display a lot more events in fullscreen mode\r
+\r
// the first outer loop iteration is for passed ToDos, the second loop is for all upcomming events (may also include ToDos)\r
- for(var i=0; counter < max && i < entryLists.length; i++){\r
- while( counter < max && (entry = entryLists[i].getNext()) != undefined ){\r
+ for (var i=0; counter < max && i < entryLists.length; i++) {\r
+ while (counter < max && (entry = entryLists[i].getNext()) != undefined) {\r
counter++;\r
- \r
+\r
// output event info for debugging\r
console.info(\r
'event: Id=' + entry.id + \r
',InstanceStartTime=' + entry.InstanceStartTime +\r
',InstanceEndTime=' + entry.InstanceEndTime\r
);\r
- \r
+\r
// we don't want ToDos when includeTodos == false or when they are completed\r
- if (entry.Type == 'ToDo' && (entry.Status == "TodoCompleted" || !includeTodos)){\r
+ if (entry.Type == 'ToDo' && (entry.Status == "TodoCompleted" || !config['includeTodos'].Value)) {\r
console.info('skipping ' + entry.id );\r
counter--;\r
continue;\r
}\r
\r
// make sure that we don't include an event twice (useful for ToDos that might come up twice)\r
- if (eventIds[entry.id] == 1){\r
+ if (eventIds[entry.id] == 1) {\r
console.info('skipped (already included) ' + entry.id);\r
counter--;\r
continue;\r
- } else {\r
+ } else\r
eventIds[entry.id] = 1;\r
- } \r
-\r
- // skip events for the first panel in case this is the second one\r
- if (panelNum == 1 && counter < eventsPerWidget + 1)\r
- continue;\r
\r
// summary can be undefined!\r
var Summary = ((entry.Summary == null) ? '' : entry.Summary);\r
- if (entry.Type == 'Meeting' && entry.Location != ''){\r
+ if (entry.Type == 'Meeting' && entry.Location != '' && config['showLocation'].Value)\r
Summary += ', ' + entry.Location;\r
- }\r
\r
// fix by yves: determine start and end dates/times\r
entryStartTime = ((entry.InstanceStartTime == null) ? entry.StartTime : entry.InstanceStartTime);\r
entryEndTime = ((entry.InstanceEndTime == null) ? entry.EndTime : entry.InstanceEndTime);\r
- \r
+\r
// there can be ToDos that have no date at all!\r
if (entry.Type == 'ToDo' && entry.EndTime == null)\r
entryDate = ""; // this will cause parseDate(entryDate) to return null;\r
else\r
entryDate = ((entry.Type == 'ToDo') ? entryEndTime : entryStartTime); // ToDo's use their EndTime, the rest use StartTime\r
- \r
+\r
// Convert date/time string to Date object\r
var date = parseDate(entryDate);\r
console.info('date: ' + date);\r
var endDate = ((entryEndTime == null) ? null : parseDate(entryEndTime));\r
console.info('endDate: ' + endDate);\r
- \r
+\r
// check if meeting event has already passed\r
- if (entry.Type == 'Meeting'){\r
+ if (entry.Type == 'Meeting') {\r
var compareTime = ((endDate == null) ? date.getTime() : endDate.getTime());\r
- if (now.getTime() > compareTime){\r
- console.info('skipped (already passed) ' + entry.id);\r
+ if (now.getTime() > compareTime) {\r
+ console.info('skipping Meeting (already passed) ' + entry.id);\r
counter--;\r
+ eventIds[entry.id] = 0;\r
continue;\r
}\r
}\r
- \r
- // fix DayEvents end time. A bug in WRT causes end times to be off by +12 hours. It's possible that the event has already passed\r
- if (entry.Type == 'DayEvent' && endDate != null){\r
- endDate.setHours(endDate.getHours() - 12);\r
+\r
+ // check if anniversary passed (not sure why they are in the list, the query was only for today - nokia?)\r
+ if (entry.Type == 'Anniversary') {\r
+ var tmp = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0,0,0);\r
+ if (date.getTime() < tmp.getTime()) {\r
+ console.info('skipping Anniversary (already passed) ' + entry.id);\r
+ counter--;\r
+ eventIds[entry.id] = 0;\r
+ continue;\r
+ }\r
+ }\r
+\r
+ // fix DayEvents end time. End times are off by 1 Second. It's possible that the event has already passed\r
+ if (entry.Type == 'DayEvent' && endDate != null) {\r
endDate.setMinutes(endDate.getMinutes() - 1);\r
console.info('fixing DayEvent endDate: ' + endDate);\r
- if (now.getTime() > endDate.getTime()){\r
- console.info('event already passed');\r
+ if (now.getTime() > endDate.getTime()) {\r
+ console.info('event already passed ' + entry.id);\r
counter--;\r
- continue; \r
+ eventIds[entry.id] = 0;\r
+ continue;\r
}\r
}\r
\r
// check if the event is currently taking place\r
- if (entryStartTime != null && entryEndTime != null && date != null && endDate != null)\r
- {\r
+ if (entryStartTime != null && entryEndTime != null && date != null && endDate != null) {\r
// check if we are between start and endtime\r
if ((date.getTime() < now.getTime()) && (now.getTime() < endDate.getTime())) {\r
date = now; // change appointment date/time to now\r
console.info('event is currently taking place: ' + date);\r
}\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
+ console.info('skipping (already in first widget) ' + entry.id);\r
+ continue;\r
+ }\r
+\r
// generate html output\r
entriesHtml += '<tr><td><img class="icon" src="' + entry.Type + '.png" /></td>';\r
- if(date == null){ // some languages have very strange locale date formats, can't parse all those. Also some todos don't have dates at all.\r
+ if(date == null) {\r
+ // some languages have very strange locale date formats, can't parse all those. Also some todos don't have dates at all.\r
entriesHtml += '<td colspan="4"><span class="date">' + entryDate + '</span> ';\r
- }else{\r
- var weekDay = date.toLocaleDateString().substr(0,weekDayLength);\r
+ } else {\r
+ var weekDay = date.toLocaleDateString().substr(0,config['weekDayLength'].Value);\r
var time = formatTime(date);\r
- date = formatDate(date, entryDate);\r
- if( entry.Type == 'ToDo' || entry.Type == 'Anniversary' || entry.Type == 'DayEvent' ){\r
- entriesHtml += '<td><span class="weekDay">' + weekDay +'</span></td><td><span class="date">'+ date +'</span></td><td colspan="2">';\r
- }else if( entry.Type == 'Meeting' || entry.Type == 'Reminder' ){\r
- entriesHtml += '<td><span class="weekDay">' + weekDay +'</span></td><td><span class="date">'+ date +'</span></td><td width="1px"><span class="time">'+ time +'</span></td><td>';\r
+ var dateStr = formatDate(date, entryDate);\r
+ if (entry.Type == 'ToDo' || entry.Type == 'Anniversary' || entry.Type == 'DayEvent' || entry.Type == 'Reminder') {\r
+ if ((isToday(date) || isTomorrow(date)) && config['showTodayAsText'].Value) // show weekday if the date string is not text. looks odd otherwise\r
+ entriesHtml += '<td colspan="4" width="1px"><span class="date">' + dateStr + '</span> ';\r
+ else\r
+ entriesHtml += '<td class="weekDay" width="1px">' + weekDay + '</td><td width="1px" class="date">' + dateStr + '</td><td colspan="2">';\r
+ } else if (entry.Type == 'Meeting') {\r
+ if (config['showCombinedDateTime'].Value) {\r
+ if (isToday(date))\r
+ entriesHtml += '<td width="1px" colspan="4"><span class="today">' + time + '</span> ';\r
+ else if (isTomorrow(date))\r
+ entriesHtml += '<td width="1px" colspan="4"><span class="tomorrow">' + dateStr + '</span> <span class="time">' + time + '</span> ';\r
+ else\r
+ entriesHtml += '<td width="1px" class="weekDay">' + weekDay + '</td><td width="1px" class="date">' + dateStr + '</td><td colspan="2">';\r
+ } else {\r
+ if ((isToday(date) || isTomorrow(date)) && config['showTodayAsText'].Value)\r
+ entriesHtml += '<td colspan="4" width="1px"><span class="today">' + dateStr + '</span> <span class="time">' + time + '</span> ';\r
+ else\r
+ entriesHtml += '<td width="1px" class="weekDay">' + weekDay + '</td><td width="1px" class="date">' + dateStr + '</td><td width="1px" class="time">' + time + '</td><td>';\r
+ }\r
}\r
}\r
- entriesHtml += '<span class="description">' + Summary +'</span></td></tr>';\r
+ entriesHtml += '<span class="description">' + Summary + '</span></td></tr>';\r
}\r
}\r
entriesHtml += '</table>';\r
- if (showNothingText && entriesHtml == '<table></table>')\r
- entriesHtml = '<div style="width:295px; height:75px; text-align:center; line-height:75px; overflow:visible;">' + nothingText + '</div>';\r
- if( cacheEntriesHtml != entriesHtml ){\r
- document.getElementById('calendarList').innerHTML = entriesHtml;\r
+ if (config['showNothingText'].Value && entriesHtml == '<table></table>')\r
+ entriesHtml = '<div style="width:295px; height:75px; text-align:center; line-height:75px; overflow:visible;">' + config['nothingText'].Value + '</div>';\r
+ if (cacheEntriesHtml != entriesHtml) {\r
+ if (mode == 0)\r
+ document.getElementById('calendarList').innerHTML = entriesHtml;\r
+ else\r
+ document.getElementById('fullscreenCalendarList').innerHTML = entriesHtml;\r
cacheEntriesHtml = entriesHtml;\r
}\r
- }catch(e){\r
+ } catch(e) {\r
error('displaying list:' + e + ', line ' + e.line);\r
return;\r
}\r
}\r
\r
-function updateScreen(){\r
- // Check if opening fullscreen\r
- if( window.innerHeight > 91){\r
- launchCalendar();\r
+function updateScreen()\r
+{\r
+ // check if opening fullscreen\r
+ if( window.innerHeight > 91 && 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
+ mode = 0;\r
+ cacheEntriesHtml = '';\r
+ showHomescreen();\r
}\r
\r
- if (useBackgroundImage){\r
+ if (mode == 0)\r
+ updateHomescreen();\r
+ else if (mode == 1)\r
+ updateFullscreen();\r
+}\r
+\r
+function launchCalendar()\r
+{\r
+ try {\r
+ widget.openApplication(config['calendarApp'].Value, "");\r
+ //window.close();\r
+ } catch(e) {\r
+ error('starting Calendar App');\r
+ return;\r
+ }\r
+}\r
+\r
+function init()\r
+{\r
+ try {\r
+ // call calendar service\r
+ calendarService = device.getServiceObject("Service.Calendar", "IDataSource");\r
+ } catch(e) {\r
+ error('loading Calendar service');\r
+ return;\r
+ }\r
+\r
+ loadSettings();\r
+ updateCssClasses();\r
+ collectLocales();\r
+ //updateData();\r
+ requestNotification();\r
+ window.setInterval('updateData()', 1000 * 60 * config['updateDataInterval'].Value);\r
+\r
+ mode = 0;\r
+ showHomescreen();\r
+ updateScreen();\r
+ if (config['useBackgroundImage'].Value)\r
+ // check for screen rotation every 1 secs\r
+ window.setInterval('updateScreen()', 1000 * 1);\r
+}\r
+\r
+function createMenu()\r
+{\r
+ window.menu.setLeftSoftkeyLabel("",null);\r
+ window.menu.setRightSoftkeyLabel("",null);\r
+ var id = 0;\r
+ var menuSettings = new MenuItem("Settings", id++);\r
+ var menuCallApp = new MenuItem("Open Calendar App", id++);\r
+ var menuAbout = new MenuItem("About", id++);\r
+ menuSettings.onSelect = showSettings;\r
+ menuAbout.onSelect = showAbout;\r
+ menuCallApp.onSelect = launchCalendar;\r
+ window.menu.clear();\r
+ window.menu.append(menuCallApp);\r
+ window.menu.append(menuSettings);\r
+ window.menu.append(menuAbout); \r
+}\r
+\r
+function showSettings()\r
+{\r
+ mode = 2;\r
+ document.getElementById("homescreenView").style.display = "none";\r
+ document.getElementById("fullscreenView").style.display = "none";\r
+ document.getElementById("aboutView").style.display = "none";\r
+ document.getElementById("settingsView").style.display = "block";\r
+ document.onclick = null;\r
+ \r
+ window.menu.setLeftSoftkeyLabel("Save", function()\r
+ {\r
+ for (var key in config) {\r
+ if (config[key].Type == 'String')\r
+ config[key].Value = document.forms[0].elements["settings." + key].value;\r
+ else if (config[key].Type == 'Int') {\r
+ config[key].Value = parseInt(document.forms[0].elements["settings." + key].value);\r
+ if (config[key].Value < 0)\r
+ config[key].Value = config[key].Default;\r
+ }\r
+ else if (config[key].Type == 'Bool')\r
+ config[key].Value = document.forms[0].elements["settings." + key].checked;\r
+ else if (config[key].Type == 'UID')\r
+ config[key].Value = parseInt(document.forms[0].elements["settings." + key].value);\r
+ else if (config[key].Type == 'Enum') {\r
+ config[key].Value = document.forms[0].elements["settings." + key].value;\r
+ if (config[key].ValidValues.indexOf(config[key].Value) == -1)\r
+ config[key].Value = config[key].Default;\r
+ }\r
+ }\r
+ \r
+ updateCssClasses();\r
+ \r
+ saveSettings();\r
+ \r
+ mode = 1;\r
+ showFullscreen();\r
+ });\r
+ window.menu.setRightSoftkeyLabel("Cancel", function()\r
+ {\r
+ mode = 1;\r
+ showFullscreen();\r
+ });\r
+ \r
+ var settingsHtml = '<form>';\r
+ for (var key in config) {\r
+ if (config[key].Type == 'String')\r
+ settingsHtml += '<table><tr><td>' + config[key].Name + '<br /><input class="textInput" name="settings.' + key + '" type="text" value="' + config[key].Value + '" /></td>' + printHintBox(config[key].Info) + '<hr />';\r
+ else if (config[key].Type == 'Int')\r
+ settingsHtml += '<table><tr><td>' + config[key].Name + '<br /><input class="textInput" name="settings.' + key + '" type="text" value="' + config[key].Value + '" /></td>' + printHintBox(config[key].Info) + '<hr />';\r
+ else if (config[key].Type == 'Bool')\r
+ settingsHtml += '<table><tr><td>' + config[key].Name + '<br /><input name="settings.' + key + '" type="checkbox" value="true" ' + (config[key].Value ? 'checked="checked"' : '') + '/></td>' + printHintBox(config[key].Info) + '<hr />';\r
+ else if (config[key].Type == 'UID')\r
+ settingsHtml += '<table><tr><td>' + config[key].Name + '<br /><input class="textInput" name="settings.' + key + '" type="text" value="0x' + config[key].Value.toString(16) + '" /></td>' + printHintBox(config[key].Info) + '<hr />';\r
+ else if (config[key].Type == 'Enum') {\r
+ settingsHtml += '<table><tr><td>' + config[key].Name + '<br /><select name="settings.' + key + '" size="1">';\r
+ for(var i = 0; i < config[key].ValidValues.length; i++)\r
+ settingsHtml += '<option label="' + config[key].ValidValues[i] + '"' + (config[key].Value == config[key].ValidValues[i] ? ' selected="selected"' : '') + '>' + config[key].ValidValues[i] + '</option>';\r
+ settingsHtml += '</select></div></td>' + printHintBox(config[key].Info) + '<hr />';\r
+ }\r
+ }\r
+ settingsHtml += '<input name="reset" type="button" value="Restore Defaults" onclick="javascript:restoreDefaultSettings();showSettings();" />';\r
+ settingsHtml += '</form>';\r
+ document.getElementById("settingsList").innerHTML = settingsHtml;\r
+}\r
+\r
+function changeCssClass(classname, properties)\r
+{\r
+ for(var i = 0; i < document.styleSheets[0]['cssRules'].length; i++)\r
+ {\r
+ if (document.styleSheets[0]['cssRules'][i].selectorText == classname) {\r
+ document.styleSheets[0].deleteRule(i);\r
+ document.styleSheets[0].insertRule(classname + ' { ' + properties + ' }', document.styleSheets[0]['cssRules'].length);\r
+ break;\r
+ }\r
+ }\r
+}\r
+\r
+function updateCssClasses()\r
+{\r
+ for(var key in config) {\r
+ changeCssClass(config[key].Name, config[key].Value);\r
+ }\r
+}\r
+\r
+function restoreDefaultSettings()\r
+{\r
+ for (var key in config)\r
+ config[key].Value = config[key].Default;\r
+}\r
+\r
+function loadSettings()\r
+{\r
+ for (var key in config) {\r
+ if (widget.preferenceForKey(key)) {\r
+ if (config[key].Type == 'Int')\r
+ config[key].Value = Number(widget.preferenceForKey(key));\r
+ else if (config[key].Type == 'String')\r
+ config[key].Value = widget.preferenceForKey(key);\r
+ else if (config[key].Type == 'Bool')\r
+ config[key].Value = (widget.preferenceForKey(key) == 'true')\r
+ else if (config[key].Type == 'Enum')\r
+ config[key].Value = widget.preferenceForKey(key);\r
+ else if (config[key].Type == 'UID')\r
+ config[key].Value = Number(widget.preferenceForKey(key));\r
+ }\r
+ else\r
+ config[key].Value = config[key].Default;\r
+ \r
+ }\r
+}\r
+\r
+function saveSettings()\r
+{\r
+ for (var key in config) {\r
+ if (config[key].Type == 'Int')\r
+ widget.setPreferenceForKey(config[key].Value.toString(), key);\r
+ else if (config[key].Type == 'String')\r
+ widget.setPreferenceForKey(config[key].Value, key);\r
+ else if (config[key].Type == 'Bool')\r
+ widget.setPreferenceForKey(config[key].Value ? 'true' : 'false', key);\r
+ else if (config[key].Type == 'Enum')\r
+ widget.setPreferenceForKey(config[key].Value, key);\r
+ else if (config[key].Type == 'UID')\r
+ widget.setPreferenceForKey(config[key].Value.toString(), key);\r
+ }\r
+}\r
+\r
+function toggleVisibility(elementId)\r
+{\r
+ if (document.getElementById(elementId).style.display == "none")\r
+ document.getElementById(elementId).style.display = "block";\r
+ else\r
+ document.getElementById(elementId).style.display = "none";\r
+}\r
+\r
+var uniqueId = 0;\r
+function printHintBox(text)\r
+{\r
+ uniqueId++;\r
+ return '<td width="1%" align="right" onclick="javascript:toggleVisibility(\'info' + uniqueId + '\')">Help</td></tr></table>'+\r
+ '<div class="settingsInfo" id="info' + uniqueId + '">' + text + '</div>';\r
+}\r
+\r
+function showAbout()\r
+{\r
+ mode = 3;\r
+ document.getElementById("homescreenView").style.display = "none";\r
+ document.getElementById("fullscreenView").style.display = "none";\r
+ document.getElementById("aboutView").style.display = "block";\r
+ document.getElementById("settingsView").style.display = "none";\r
+ document.onclick = null;\r
+ \r
+ window.menu.setLeftSoftkeyLabel(" ", function(){});\r
+ window.menu.setRightSoftkeyLabel("Back", function()\r
+ {\r
+ mode = 1;\r
+ showFullscreen();\r
+ });\r
+ \r
+ //document.getElementById("aboutView").innerHTML = 'aboutView';\r
+ document.getElementById("name").innerHTML = "Coming Next " + version;\r
+}\r
+\r
+function updateFullscreen()\r
+{\r
+}\r
+\r
+function showFullscreen()\r
+{\r
+ document.getElementById("homescreenView").style.display = "none";\r
+ document.getElementById("fullscreenView").style.display = "block";\r
+ document.getElementById("aboutView").style.display = "none";\r
+ document.getElementById("settingsView").style.display = "none";\r
+ document.getElementById('body').className = "backgroundFullscreen";\r
+ document.onclick = launchCalendar;\r
+ createMenu();\r
+ updateData();\r
+}\r
+\r
+function updateHomescreen()\r
+{\r
+ if (config['useBackgroundImage'].Value) {\r
// check for screen rotation\r
- if (orientation != 'portrait' && screen.width == 360 && screen.height == 640){\r
+ if (orientation != 'portrait' && screen.width == 360 && screen.height == 640) {\r
window.widget.prepareForTransition("fade");\r
orientation = 'portrait';\r
document.getElementById('body').style.backgroundImage = 'url(background_' + orientation + '.png)';\r
document.getElementById('body').style.backgroundColor = 'none';\r
window.widget.performTransition();\r
- }else if (orientation != 'landscape' && screen.width == 640 && screen.height == 360){\r
+ } else if (orientation != 'landscape' && screen.width == 640 && screen.height == 360) {\r
window.widget.prepareForTransition("fade");\r
orientation = 'landscape';\r
document.getElementById('body').style.backgroundImage = 'url(background_' + orientation + '.png)';\r
document.getElementById('body').style.backgroundColor = 'none';\r
window.widget.performTransition();\r
}\r
+ else if (document.getElementById('body').style.backgroundImage == "")\r
+ {\r
+ document.getElementById('body').style.backgroundImage = 'url(background_' + orientation + '.png)';\r
+ }\r
}\r
}\r
\r
-function launchCalendar(){\r
- try{\r
- widget.openApplication(calendarApp, "");\r
- window.close();\r
- }catch(e){\r
- error('starting Calendar App');\r
- return;\r
- }\r
-}\r
-\r
-function init(){\r
- try{\r
- calendarService = device.getServiceObject("Service.Calendar", "IDataSource"); // call calendar service\r
- }catch(e){\r
- error('loading Calendar service');\r
- return;\r
- }\r
- collectLocales();\r
+function showHomescreen()\r
+{\r
+ document.getElementById("homescreenView").style.display = "block";\r
+ document.getElementById("fullscreenView").style.display = "none";\r
+ document.getElementById("aboutView").style.display = "none";\r
+ document.getElementById("settingsView").style.display = "none";\r
+ document.getElementById('body').className = "background";\r
+ document.onclick = null;\r
updateData();\r
- requestNotification();\r
- window.setInterval('updateData()', 1000 * 60 * updateDataInterval); // start update interval every 5 minutes\r
-\r
- updateScreen();\r
- if (useBackgroundImage)\r
- window.setInterval('updateScreen()', 1000 * 3); // check for screen rotation every 3 secs\r
}\r
+\r
</script>\r
+\r
<style type="text/css">\r
-table{ margin:0px; padding:0px; border-spacing:0px; }\r
-td{ padding:0px 5px 0px 0px; white-space:nowrap; overflow:hidden; }\r
-#homescreenView{ width: 315px; height:91px; overflow:hidden; }\r
-#calendarList{ position:absolute; left:10px; top:4px; width:295px; height:75px; overflow:hidden; }\r
+table { margin:0px; padding:0px; border-spacing:0px; }\r
+td { padding:0px 5px 0px 0px; white-space:nowrap; overflow:hidden; }\r
+hr { color:#ffffff; background-color:#ffffff; height:1px; text-align:left; border-style:none; }\r
+.settingsInfo { display:none; font-style:italic; }\r
+.title { font-weight:bold; font-size:14pt; }\r
+.textInput { width:90%; }\r
+#homescreenView { width: 315px; height:91px; overflow:hidden; }\r
+#calendarList { position:absolute; left:10px; top:4px; width:295px; height:75px; overflow:hidden; }\r
+#name { text-align:center; }\r
+#appicon { display: block; margin-left: auto; margin-right: auto; margin-top: 50px; }\r
+#smallappicon { width:22px; height:22px; margin-right:10px; float:left; }\r
</style>\r
+\r
</head>\r
+\r
<body id="body" class="background">\r
<div id="homescreenView">\r
<div id="calendarList"></div>\r
</div>\r
+<div id="fullscreenView" style="display:none;">\r
+ <img src="Icon.png" id="smallappicon">\r
+ <h1 class="title">Coming Next</h1>\r
+ <hr />\r
+ <div id="fullscreenCalendarList">loading...</div>\r
+</div>\r
+<div id="settingsView" style="display:none">\r
+ <img src="Icon.png" id="smallappicon">\r
+ <h1 class="title">Settings</h1>\r
+ <hr />\r
+ <div id="settingsList"></div>\r
+</div>\r
+<div id="aboutView" style="display:none">\r
+ <img src="Icon.png" id="appicon">\r
+ <h1 id="name">Coming Next</h1>\r
+ <hr />\r
+ <p>Created by Dr. Cochambre and Michael Prager.</p>\r
+ <p>This software is open source and licensed under the GPLv3.</p>\r
+ <p>Visit https://sourceforge.net/projects/comingnext/ for free updates.</p>\r
+ <hr />\r
+</div>\r
</body>\r
-</html>
\ No newline at end of file
+\r
+</html>\r