diff options
-rw-r--r-- | index.html | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -51,6 +51,17 @@ weekday[5] = "Freitag"; weekday[6] = "Samstag"; + + function showSelectedShow() { + var id = $('#show-selector option:selected').attr('value'); + var show = $.grep(shows_list, function(elem) { return elem.id == id; })[0]; + $('#show-title').text(show.title); + $('#show-dow').text(weekday[show.dow]); + $('#show-rhythm').text(show.rhythm); + $('#show-starttime').text(show.starttime); + $('#show-length').text(show.length + ' Min.'); + } + function updateShowsList(data, status, req) { shows_list = []; $('#show-selector').find('option').remove(); @@ -78,6 +89,7 @@ } } ) + showSelectedShow() } var shows_list = []; @@ -87,6 +99,9 @@ $.post("/listshows.cgi", data, updateShowsList, "xml") } + + + function selectApp(app) { switch(app) { case "musicpools": @@ -224,7 +239,7 @@ <div class="span10"> <form class="well form-inline"> <label class="control-label" for="select-dropbox"><h3>Sendung auswählen</h3></label> - <select id="show-selector"> + <select id="show-selector" onchange="showSelectedShow()"> </select> </form> </div> |