diff options
author | Peter Grassberger <petertheone@gmail.com> | 2015-07-31 20:54:42 (GMT) |
---|---|---|
committer | Peter Grassberger <petertheone@gmail.com> | 2015-07-31 20:54:42 (GMT) |
commit | e2034bcc39fd1d859626b3ea7512414dfccee499 (patch) | |
tree | 2b003fa6614a8f5584342ea14e048db3d717cb2d /www/js/utils.js | |
parent | 032b6bcaf2b6811144325e504d6d7edfa248c508 (diff) |
move main css to file, move clock to utils.js, load jingle groups
Diffstat (limited to 'www/js/utils.js')
-rw-r--r-- | www/js/utils.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/www/js/utils.js b/www/js/utils.js index af0b479..e2c494b 100644 --- a/www/js/utils.js +++ b/www/js/utils.js @@ -195,3 +195,25 @@ function locationHashValue() { var hash = window.location.hash.match(/#([a-z]+)\/?.*/); return hash ? hash[1] : ''; } + +function drawClock(date, time, week) { + $('#clock span.clock-date').text(date); + $('#clock span.clock-time').text(time); + var weekspan = $('#clock span.current-week').removeClass().addClass('current-week').addClass('label'); + switch(week) { + case 1: + weekspan.addClass('label-info').text('Woche 1'); + break; + case 2: + weekspan.addClass('label-warning').text('Woche 2'); + break; + case 3: + weekspan.addClass('label-success').text('Woche 3'); + break; + case 4: + weekspan.addClass('label-important').text('Woche 4'); + break; + default: + weekspan.addClass('label-inverse').text('Fehler'); + } +} |