layoutswitch robustisiert

This commit is contained in:
Manuel Friedli 2013-11-25 13:42:03 +01:00
parent 54de8cc4be
commit e398011737
2 changed files with 4 additions and 3 deletions

View file

@ -47,9 +47,7 @@
$('#layoutswitcher').on('change', function() { $('#layoutswitcher').on('change', function() {
switchLayout(this.value); switchLayout(this.value);
}); });
currentLayout = layout['de_CH']; switchLayout('de_CH');
renderLayout();
startClock();
}); });
</script> </script>
</body> </body>

3
uhr.js
View file

@ -97,6 +97,9 @@ function switchTheme(theme) {
function switchLayout(locale) { function switchLayout(locale) {
stopClock(); stopClock();
currentLayout = layout[locale]; currentLayout = layout[locale];
if (currentLayout == undefined) {
currentLayout = layout['default'];
}
renderLayout(); renderLayout();
if (isOn()) { if (isOn()) {
startClock(); startClock();