summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2014-09-20 00:46:18 (GMT)
committerChristian Pointner <equinox@helsinki.at>2014-09-20 00:46:18 (GMT)
commitd5c03ec36c38a3a7a3ffa0487a1e5d9feef3cf59 (patch)
treec8272ef954489177e146d342ff58fc469e7adf47 /index.html
parentbe89d5f1957d159df4289494c7cab9722e8dc9a5 (diff)
parsing showlist return values
Diffstat (limited to 'index.html')
-rw-r--r--index.html36
1 files changed, 35 insertions, 1 deletions
diff --git a/index.html b/index.html
index 5e7fbaf..6110def 100644
--- a/index.html
+++ b/index.html
@@ -42,8 +42,42 @@
$('#alertbox').html('<div class="alert alert-info"><a class="close" data-dismiss="alert" href="#">&times;</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 = [];