diff --git a/src/web/js/maestro_main.js b/src/web/js/maestro_main.js index ef4c84a..440618f 100644 --- a/src/web/js/maestro_main.js +++ b/src/web/js/maestro_main.js @@ -160,6 +160,7 @@ function updatePlayerListPage(playerList) { function tabClicked(tabNo) { + // hide and show tab for(let i = 0; i < 4; i++) { $("#page-tabs li").filter(":eq(" + i + ")").removeClass("activated"); } @@ -167,30 +168,31 @@ function tabClicked(tabNo) { let tabIndex = tabNo - 1; $("#page-tabs li").filter(":eq(" + tabIndex + ")").addClass("activated"); + // hide and show content switch(tabNo) { case 1: - $(".player_list").removeClass("hide"); - $(".search").addClass("hide"); - $(".mouse_app_list").addClass("hide"); - $(".typing_app_list").addClass("hide"); + $("#section_add_player").removeClass("hide"); + $("#search").addClass("hide"); + $("#mouse_app_list").addClass("hide"); + $("#typing_app_list").addClass("hide"); break; case 2: - $(".player_list").addClass("hide"); - $(".search").removeClass("hide"); - $(".mouse_app_list").addClass("hide"); - $(".typing_app_list").addClass("hide"); + $("#section_add_player").addClass("hide"); + $("#search").removeClass("hide"); + $("#mouse_app_list").addClass("hide"); + $("#typing_app_list").addClass("hide"); break; case 3: - $(".player_list").addClass("hide"); - $(".search").addClass("hide"); - $(".mouse_app_list").removeClass("hide"); - $(".typing_app_list").addClass("hide"); + $("#section_add_player").addClass("hide"); + $("#search").addClass("hide"); + $("#mouse_app_list").removeClass("hide"); + $("#typing_app_list").addClass("hide"); break; case 4: - $(".player_list").addClass("hide"); - $(".search").addClass("hide"); - $(".mouse_app_list").addClass("hide"); - $(".typing_app_list").removeClass("hide"); + $("#section_add_player").addClass("hide"); + $("#search").addClass("hide"); + $("#mouse_app_list").addClass("hide"); + $("#typing_app_list").removeClass("hide"); break; } } diff --git a/src/web/module/maestro_section_main.html b/src/web/module/maestro_section_main.html index 0e72ba8..e3bb500 100644 --- a/src/web/module/maestro_section_main.html +++ b/src/web/module/maestro_section_main.html @@ -24,7 +24,7 @@ $(document).ready(function() {
-