diff options
author | Christian Pointner <equinox@helsinki.at> | 2014-09-20 01:07:11 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2014-09-20 01:07:11 (GMT) |
commit | 95ae5cd3a1b3572d48c8eaae8708866de8c235e5 (patch) | |
tree | fd0da366de7629340b4dcd859d903c16cff6a994 | |
parent | d5c03ec36c38a3a7a3ffa0487a1e5d9feef3cf59 (diff) |
show selection works now
-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> |