}\r
}\r
var result = calendarService.IDataSource.GetList(listFiltering);\r
- if (result.ErrorCode) {\r
- error(result.ErrorMessage);\r
- return;\r
- }\r
+ if (result.ErrorCode)\r
+ throw(result.ErrorMessage);\r
var list = result.ReturnValue;\r
} catch(e) {\r
error(e + ', line ' + e.line);\r
\r
var result = calendarService.IDataSource.Delete(criteria);\r
if (result.ErrorCode)\r
- error(result.ErrorMessage);\r
+ throw(result.ErrorMessage);\r
} catch(e) {\r
error('deleting temp calendar entries:' + e + ', line ' + e.line);\r
return;\r
\r
// summary can be undefined!\r
var Summary = ((entry.Summary == null) ? '' : entry.Summary);\r
- if (entry.Type == 'Meeting' && entry.Location != '' && config['showLocation'].Value)\r
+ if (entry.Location != '' && entry.Location != undefined && config['showLocation'].Value)\r
Summary += ', ' + entry.Location;\r
\r
// fix by yves: determine start and end dates/times\r
function updateHomescreen()\r
{\r
if (config['useBackgroundImage'].Value) {\r
+ // check if we have a completely unknown screen resolution\r
+ var screenHeight = screen.height;\r
+ var screenWidth = screen.width;\r
+ if (screenHeight != 640 && screenHeight != 480 && screenHeight != 360)\r
+ screenHeight = 360; // we can only assume we're in portrait mode, so we set the screen dims as needed for the following code\r
+ if (screenWidth != 640 && screenWidth != 480 && screenWidth != 360)\r
+ screenWidth = 640; // we can only assume we're in portrait mode, so we set the screen dims as needed for the following code\r
+ \r
// check for screen rotation\r
- if (orientation != 'portrait' && screen.width == 360 && screen.height == 640) {\r
+ if (orientation != 'portrait' && ((screenWidth == 360 && screenHeight == 640) || (screenWidth == 640 && screenHeight == 480))) {\r
window.widget.prepareForTransition("fade");\r
orientation = 'portrait';\r
document.getElementById('body').style.backgroundImage = 'url(' + getBackgroundImage() + ')';\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' && ((screenWidth == 640 && screenHeight == 360) || (screenWidth == 480 && screenHeight == 640))) {\r
window.widget.prepareForTransition("fade");\r
orientation = 'landscape';\r
document.getElementById('body').style.backgroundImage = 'url(' + getBackgroundImage() + ')';\r
}\r
}\r
\r
-function log(message) {\r
+function log(message)\r
+{\r
if (config['enableLogging'].Value) {\r
console.info(message);\r
}\r