diff options
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -53,6 +53,7 @@ + var shows_currentid; var shows_list = []; var current_show; var group_carts = []; @@ -102,8 +103,9 @@ } function showSelectedShow() { - var id = $('#show-selector option:selected').attr('value'); - current_show = $.grep(shows_list, function(elem) { return elem.id == id; })[0]; + shows_currentid = $('#show-selector option:selected').attr('value'); + sessionStorage.setItem("shows_currentid", shows_currentid); + current_show = $.grep(shows_list, function(elem) { return elem.id == shows_currentid; })[0]; $('#show-title').text(current_show.title); $('#show-dow').text(weekday[current_show.dow]); $('#show-rhythm').text(current_show.rhythm); @@ -160,15 +162,21 @@ } } ); + $('#show-selector').val(shows_currentid); showSelectedShow(); } - function app_shows_init() { + function shows_init() { + shows_currentid = sessionStorage.getItem("shows_currentid"); shows_list = []; data = { LOGIN_NAME: username, PASSWORD: token }; $.post("/listdropboxes.cgi", data, updateShowsList, "xml") } + function shows_cleanup() { + sessionStorage.removeItem("shows_currentid"); + delete shows_currentid; + } @@ -186,7 +194,7 @@ $('#app-musicpools').hide(); $('#nav-btn-musicpools').removeClass('active'); app = 'shows'; - app_shows_init(); + shows_init(); } sessionStorage.setItem("app", app); } @@ -249,6 +257,8 @@ delete token; sessionStorage.removeItem("app"); delete app; + + shows_cleanup(); $(".alert").alert('close'); $("#username").val(''); |