diff --git a/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html b/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html index 5619133..5debb16 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html @@ -74,42 +74,46 @@ $('[data-toggle="tooltip"]').tooltip(); }) - var appPath = window.location.pathname.split("/")[1]; - if (window.location.pathname == "/" + appPath + "/da-view-list") { + var appPath = window.location.pathname; + + var appPathvalue = appPath.substring(appPath.lastIndexOf('/') + 1); + + + if (appPathvalue == "da-view-list") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:first-child a").addClass('active'); } - else if (window.location.pathname == "/" + appPath + "/3dAnatomy") { + else if (appPathvalue == "3dAnatomy") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(2) a").addClass('active'); } - else if (window.location.pathname == "/" + appPath + "/clinical-illustrations") { + else if (appPathvalue == "clinical-illustrations") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(3) a").addClass('active'); } - else if (window.location.pathname == "/" + appPath + "/clinical-animations") { + else if (appPathvalue == "clinical-animations") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(4) a").addClass('active'); } - else if (window.location.pathname == "/" + appPath + "/Link/encyclopedia") { + else if (appPathvalue == "encyclopedia") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(5) a").addClass('active'); } - else if (window.location.pathname == "/" + appPath + "/curriculum-builder") { + else if (appPathvalue == "curriculum-builder") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(6) a").addClass('active'); @@ -117,7 +121,7 @@ } - else if (window.location.pathname == "/" + appPath + "/anatomy-test") { + else if (appPathvalue == "anatomy-test") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(7) a").addClass('active'); @@ -125,63 +129,62 @@ } - else if (window.location.pathname == "/" + appPath + "/Link/IP-10") { + else if (appPathvalue == "IP-10") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(8) a").addClass('active'); } - else if (window.location.pathname == "/" + appPath + "/lab-exercises") { + else if (appPathvalue == "lab-exercises") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(9) a").addClass('active'); } - else if (window.location.pathname == "/" + appPath + "/Link/indepth-reports") { + else if (appPathvalue == "indepth-reports") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(10) a").addClass('active'); } - else if (window.location.pathname == "/" + appPath + "/Link/complementary-and-alternate-medicine") { + else if (appPathvalue == "complementary-and-alternate-medicine") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(11) a").addClass('active'); } - else if (window.location.pathname == "/" + appPath + "/ADAM-Images") { + else if (appPathvalue == "ADAM-Images") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(12) a").addClass('active'); } - else if (window.location.pathname == "/" + appPath + "/Link/bodyguide") { + else if (appPathvalue == "bodyguide") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(13) a").addClass('active'); } - else if (window.location.pathname == "/" + appPath + "/Link/symptom-navigator") { + else if (appPathvalue == "symptom-navigator") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(14) a").addClass('active'); } - else if (window.location.pathname == "/" + appPath + "/Link/wellness-tools") { + else if (appPathvalue == "wellness-tools") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(15) a").addClass('active'); } - else if (window.location.pathname == "/"+ appPath + "/ADAM-on-demand") { + else if (appPathvalue == "ADAM-on-demand") { $(".nav-sidebar li a").removeClass('active'); $(".nav-sidebar li:nth-child(16) a").addClass('active'); } - });