From bb60117dcf0096d88398e3b7500b6e796342b6ec Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Wed, 27 Nov 2013 18:37:38 +0100 Subject: [PATCH] erster schritt, layout-dropdown dynamisch zu laden --- index.html | 6 +++--- uhr.js | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 9769de9..b4cb091 100644 --- a/index.html +++ b/index.html @@ -38,6 +38,9 @@ along with this program. If not, see .

Created by fritteli, inspired by QLOCKTWO. + + + - - - diff --git a/uhr.js b/uhr.js index 23203a8..d82871e 100644 --- a/uhr.js +++ b/uhr.js @@ -21,6 +21,7 @@ function Uhr(clockarea, themeElement) { this.id = Uhr.id++; this.clockarea = this.initClockarea(clockarea); this.toggleSwitch = this.initToggleSwitch(); + this.layoutSwitch = this.initLayoutSwitch(); this.letterarea = clockarea.find('.letterarea'); this.themeElement = themeElement; this.timer = null; @@ -165,6 +166,19 @@ Uhr.prototype.initToggleSwitch = function() { this.clockarea.after(toggleSwitch); return toggleSwitch; } +Uhr.prototype.initLayoutSwitch = function() { + var layoutSwitch = $('') + for (var code in Uhr.layouts) { + if (Uhr.layouts.hasOwnProperty(code)) { + console.log(code); + var layout = Uhr.layouts[code]; + console.log(layout); + console.log(layout.language); + // TODO fill select with options + } + } + return layoutSwitch; +} Uhr.register('undefined', { language: 'Undefined',