X-Git-Url: https://code.delx.au/comingnext/blobdiff_plain/60a59c8c448067d8271ccecd53516c3b2c65d93b..d3c853b665996c7543a61ff1de1120a7267cff4f:/comingNextB/index.html
diff --git a/comingNextB/index.html b/comingNextB/index.html
index ff19473..f5551af 100644
--- a/comingNextB/index.html
+++ b/comingNextB/index.html
@@ -27,6 +27,7 @@ var config = {
monthRange: { Type: 'Int', Default: 2, Value: 2,},
includeTodos: { Type: 'Bool', Default: true, Value: true,},
useBackgroundImage: { Type: 'Bool', Default: true, Value: true,},
+ backgroundImageLocation: { Type: 'Enum', Default: 'internal', Value: 'internal', ValidValues: ['internal', 'external']},
showCombinedDateTime: { Type: 'Bool', Default: false, Value: false,},
showLocation: { Type: 'Bool', Default: true, Value: true,},
showTodayAsText: { Type: 'Bool', Default: true, Value: true,},
@@ -763,7 +764,7 @@ function showSettings()
else if (config[key].Type == 'Enum') {
settingsHtml += '
' + getLocalizedText('settings.name.' + key) + '
| ' + printHintBox(getLocalizedText('settings.info.' + key)) + '
';
}
}
@@ -882,6 +883,16 @@ function showFullscreen()
updateData();
}
+function getBackgroundImage()
+{
+ var bgImage;
+ if (config['backgroundImageLocation'].Value == config['backgroundImageLocation'].ValidValues[0]) // internal
+ bgImage = 'background_' + orientation + '.png';
+ else
+ bgImage = 'C:/Data/background_' + panelNum + '_' + orientation + '.png';
+ return bgImage;
+}
+
function updateHomescreen()
{
if (config['useBackgroundImage'].Value) {
@@ -889,19 +900,19 @@ function updateHomescreen()
if (orientation != 'portrait' && screen.width == 360 && screen.height == 640) {
window.widget.prepareForTransition("fade");
orientation = 'portrait';
- document.getElementById('body').style.backgroundImage = 'url(background_' + orientation + '.png)';
+ document.getElementById('body').style.backgroundImage = 'url(' + getBackgroundImage() + ')';
document.getElementById('body').style.backgroundColor = 'none';
window.widget.performTransition();
} else if (orientation != 'landscape' && screen.width == 640 && screen.height == 360) {
window.widget.prepareForTransition("fade");
orientation = 'landscape';
- document.getElementById('body').style.backgroundImage = 'url(background_' + orientation + '.png)';
+ document.getElementById('body').style.backgroundImage = 'url(' + getBackgroundImage() + ')';
document.getElementById('body').style.backgroundColor = 'none';
window.widget.performTransition();
}
else if (document.getElementById('body').style.backgroundImage == "")
{
- document.getElementById('body').style.backgroundImage = 'url(background_' + orientation + '.png)';
+ document.getElementById('body').style.backgroundImage = 'url(' + getBackgroundImage() + ')';
}
}
}
@@ -958,7 +969,6 @@ function checkForUpdateCallback()
{
if (reqV.readyState == 4) {
if (reqV.status == 200) {
- // little overhead here, one could use also string for version info
var resultXml = reqV.responseText;
if (resultXml) {
var div = document.getElementById("tmp");