Commit 1de2e00f5dd5c950270559bbda4738072c31f22c
1 parent
fd7f8ec9
this is solution for #7853
Showing
1 changed file
with
21 additions
and
18 deletions
400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html
... | ... | @@ -74,42 +74,46 @@ |
74 | 74 | $('[data-toggle="tooltip"]').tooltip(); |
75 | 75 | }) |
76 | 76 | |
77 | - var appPath = window.location.pathname.split("/")[1]; | |
78 | - if (window.location.pathname == "/" + appPath + "/da-view-list") { | |
77 | + var appPath = window.location.pathname; | |
78 | + | |
79 | + var appPathvalue = appPath.substring(appPath.lastIndexOf('/') + 1); | |
80 | + | |
81 | + | |
82 | + if (appPathvalue == "da-view-list") { | |
79 | 83 | |
80 | 84 | $(".nav-sidebar li a").removeClass('active'); |
81 | 85 | $(".nav-sidebar li:first-child a").addClass('active'); |
82 | 86 | |
83 | 87 | } |
84 | 88 | |
85 | - else if (window.location.pathname == "/" + appPath + "/3dAnatomy") { | |
89 | + else if (appPathvalue == "3dAnatomy") { | |
86 | 90 | |
87 | 91 | $(".nav-sidebar li a").removeClass('active'); |
88 | 92 | $(".nav-sidebar li:nth-child(2) a").addClass('active'); |
89 | 93 | |
90 | 94 | } |
91 | - else if (window.location.pathname == "/" + appPath + "/clinical-illustrations") { | |
95 | + else if (appPathvalue == "clinical-illustrations") { | |
92 | 96 | |
93 | 97 | $(".nav-sidebar li a").removeClass('active'); |
94 | 98 | $(".nav-sidebar li:nth-child(3) a").addClass('active'); |
95 | 99 | |
96 | 100 | |
97 | 101 | } |
98 | - else if (window.location.pathname == "/" + appPath + "/clinical-animations") { | |
102 | + else if (appPathvalue == "clinical-animations") { | |
99 | 103 | |
100 | 104 | $(".nav-sidebar li a").removeClass('active'); |
101 | 105 | $(".nav-sidebar li:nth-child(4) a").addClass('active'); |
102 | 106 | |
103 | 107 | |
104 | 108 | } |
105 | - else if (window.location.pathname == "/" + appPath + "/Link/encyclopedia") { | |
109 | + else if (appPathvalue == "encyclopedia") { | |
106 | 110 | |
107 | 111 | $(".nav-sidebar li a").removeClass('active'); |
108 | 112 | $(".nav-sidebar li:nth-child(5) a").addClass('active'); |
109 | 113 | |
110 | 114 | |
111 | 115 | } |
112 | - else if (window.location.pathname == "/" + appPath + "/curriculum-builder") { | |
116 | + else if (appPathvalue == "curriculum-builder") { | |
113 | 117 | |
114 | 118 | $(".nav-sidebar li a").removeClass('active'); |
115 | 119 | $(".nav-sidebar li:nth-child(6) a").addClass('active'); |
... | ... | @@ -117,7 +121,7 @@ |
117 | 121 | |
118 | 122 | } |
119 | 123 | |
120 | - else if (window.location.pathname == "/" + appPath + "/anatomy-test") { | |
124 | + else if (appPathvalue == "anatomy-test") { | |
121 | 125 | |
122 | 126 | $(".nav-sidebar li a").removeClass('active'); |
123 | 127 | $(".nav-sidebar li:nth-child(7) a").addClass('active'); |
... | ... | @@ -125,63 +129,62 @@ |
125 | 129 | |
126 | 130 | } |
127 | 131 | |
128 | - else if (window.location.pathname == "/" + appPath + "/Link/IP-10") { | |
132 | + else if (appPathvalue == "IP-10") { | |
129 | 133 | |
130 | 134 | $(".nav-sidebar li a").removeClass('active'); |
131 | 135 | $(".nav-sidebar li:nth-child(8) a").addClass('active'); |
132 | 136 | |
133 | 137 | } |
134 | - else if (window.location.pathname == "/" + appPath + "/lab-exercises") { | |
138 | + else if (appPathvalue == "lab-exercises") { | |
135 | 139 | |
136 | 140 | $(".nav-sidebar li a").removeClass('active'); |
137 | 141 | $(".nav-sidebar li:nth-child(9) a").addClass('active'); |
138 | 142 | |
139 | 143 | } |
140 | - else if (window.location.pathname == "/" + appPath + "/Link/indepth-reports") { | |
144 | + else if (appPathvalue == "indepth-reports") { | |
141 | 145 | |
142 | 146 | $(".nav-sidebar li a").removeClass('active'); |
143 | 147 | $(".nav-sidebar li:nth-child(10) a").addClass('active'); |
144 | 148 | |
145 | 149 | } |
146 | - else if (window.location.pathname == "/" + appPath + "/Link/complementary-and-alternate-medicine") { | |
150 | + else if (appPathvalue == "complementary-and-alternate-medicine") { | |
147 | 151 | |
148 | 152 | $(".nav-sidebar li a").removeClass('active'); |
149 | 153 | $(".nav-sidebar li:nth-child(11) a").addClass('active'); |
150 | 154 | |
151 | 155 | } |
152 | - else if (window.location.pathname == "/" + appPath + "/ADAM-Images") { | |
156 | + else if (appPathvalue == "ADAM-Images") { | |
153 | 157 | |
154 | 158 | $(".nav-sidebar li a").removeClass('active'); |
155 | 159 | $(".nav-sidebar li:nth-child(12) a").addClass('active'); |
156 | 160 | |
157 | 161 | } |
158 | 162 | |
159 | - else if (window.location.pathname == "/" + appPath + "/Link/bodyguide") { | |
163 | + else if (appPathvalue == "bodyguide") { | |
160 | 164 | |
161 | 165 | $(".nav-sidebar li a").removeClass('active'); |
162 | 166 | $(".nav-sidebar li:nth-child(13) a").addClass('active'); |
163 | 167 | |
164 | 168 | } |
165 | - else if (window.location.pathname == "/" + appPath + "/Link/symptom-navigator") { | |
169 | + else if (appPathvalue == "symptom-navigator") { | |
166 | 170 | |
167 | 171 | $(".nav-sidebar li a").removeClass('active'); |
168 | 172 | $(".nav-sidebar li:nth-child(14) a").addClass('active'); |
169 | 173 | |
170 | 174 | } |
171 | - else if (window.location.pathname == "/" + appPath + "/Link/wellness-tools") { | |
175 | + else if (appPathvalue == "wellness-tools") { | |
172 | 176 | |
173 | 177 | $(".nav-sidebar li a").removeClass('active'); |
174 | 178 | $(".nav-sidebar li:nth-child(15) a").addClass('active'); |
175 | 179 | |
176 | 180 | } |
177 | - else if (window.location.pathname == "/"+ appPath + "/ADAM-on-demand") { | |
181 | + else if (appPathvalue == "ADAM-on-demand") { | |
178 | 182 | |
179 | 183 | $(".nav-sidebar li a").removeClass('active'); |
180 | 184 | $(".nav-sidebar li:nth-child(16) a").addClass('active'); |
181 | 185 | |
182 | 186 | } |
183 | 187 | |
184 | - | |
185 | 188 | }); |
186 | 189 | </script> |
187 | 190 | <script> | ... | ... |