diff options
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 36 |
1 files changed, 35 insertions, 1 deletions
@@ -42,8 +42,42 @@ $('#alertbox').html('<div class="alert alert-info"><a class="close" data-dismiss="alert" href="#">×</a><h4 class="alert-heading">' + heading + '</h4>' + message + '</div>'); } + var weekday = new Array(7); + weekday[0] = "Sonntag"; + weekday[1] = "Montag"; + weekday[2] = "Dienstag"; + weekday[3] = "Mittwoch"; + weekday[4] = "Donnerstag"; + weekday[5] = "Freitag"; + weekday[6] = "Samstag"; + function updateShowsList(data, status, req) { - alert(data); + shows_list = []; + $('#show-selector').find('option').remove(); + var dblist = $(data).find("dropboxList"); + var dbs = dblist.children(); + dbs.each(function() { + type = $(this).find('type').text(); + if(type == 'show') { + var show = { + id: $(this).find('showid').text(), + title: $(this).find('show-title').text(), + dow: $(this).find('show-dayofweek').text(), + rhythm: $(this).find('show-rhythm').text(), + starttime: $(this).find('show-starttime').text(), + length: $(this).find('show-length').text(), + group: $(this).find('group').text(), + normlevel: $(this).find('normalization-level').text(), + trimlevel: $(this).find('autotrim-level').text(), + } + + var name = show.title + ' (' + show.rhythm + ', ' + weekday[show.dow] + ', ' + show.starttime + ', ' + show.length + ' Min.)'; + $('#show-selector').append($('<option>').attr('value',show.id).text(name)); + + shows_list.push(show); + } + } + ) } var shows_list = []; |