Commit 2bbee0cddefe952124eb4c63bffb2754a542ddd7
Merge branch 'newhighlightmainmenu' into Develop
Showing
1 changed file
with
21 additions
and
18 deletions
400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html
@@ -74,42 +74,46 @@ | @@ -74,42 +74,46 @@ | ||
74 | $('[data-toggle="tooltip"]').tooltip(); | 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 | $(".nav-sidebar li a").removeClass('active'); | 84 | $(".nav-sidebar li a").removeClass('active'); |
81 | $(".nav-sidebar li:first-child a").addClass('active'); | 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 | $(".nav-sidebar li a").removeClass('active'); | 91 | $(".nav-sidebar li a").removeClass('active'); |
88 | $(".nav-sidebar li:nth-child(2) a").addClass('active'); | 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 | $(".nav-sidebar li a").removeClass('active'); | 97 | $(".nav-sidebar li a").removeClass('active'); |
94 | $(".nav-sidebar li:nth-child(3) a").addClass('active'); | 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 | $(".nav-sidebar li a").removeClass('active'); | 104 | $(".nav-sidebar li a").removeClass('active'); |
101 | $(".nav-sidebar li:nth-child(4) a").addClass('active'); | 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 | $(".nav-sidebar li a").removeClass('active'); | 111 | $(".nav-sidebar li a").removeClass('active'); |
108 | $(".nav-sidebar li:nth-child(5) a").addClass('active'); | 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 | $(".nav-sidebar li a").removeClass('active'); | 118 | $(".nav-sidebar li a").removeClass('active'); |
115 | $(".nav-sidebar li:nth-child(6) a").addClass('active'); | 119 | $(".nav-sidebar li:nth-child(6) a").addClass('active'); |
@@ -117,7 +121,7 @@ | @@ -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 | $(".nav-sidebar li a").removeClass('active'); | 126 | $(".nav-sidebar li a").removeClass('active'); |
123 | $(".nav-sidebar li:nth-child(7) a").addClass('active'); | 127 | $(".nav-sidebar li:nth-child(7) a").addClass('active'); |
@@ -125,63 +129,62 @@ | @@ -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 | $(".nav-sidebar li a").removeClass('active'); | 134 | $(".nav-sidebar li a").removeClass('active'); |
131 | $(".nav-sidebar li:nth-child(8) a").addClass('active'); | 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 | $(".nav-sidebar li a").removeClass('active'); | 140 | $(".nav-sidebar li a").removeClass('active'); |
137 | $(".nav-sidebar li:nth-child(9) a").addClass('active'); | 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 | $(".nav-sidebar li a").removeClass('active'); | 146 | $(".nav-sidebar li a").removeClass('active'); |
143 | $(".nav-sidebar li:nth-child(10) a").addClass('active'); | 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 | $(".nav-sidebar li a").removeClass('active'); | 152 | $(".nav-sidebar li a").removeClass('active'); |
149 | $(".nav-sidebar li:nth-child(11) a").addClass('active'); | 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 | $(".nav-sidebar li a").removeClass('active'); | 158 | $(".nav-sidebar li a").removeClass('active'); |
155 | $(".nav-sidebar li:nth-child(12) a").addClass('active'); | 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 | $(".nav-sidebar li a").removeClass('active'); | 165 | $(".nav-sidebar li a").removeClass('active'); |
162 | $(".nav-sidebar li:nth-child(13) a").addClass('active'); | 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 | $(".nav-sidebar li a").removeClass('active'); | 171 | $(".nav-sidebar li a").removeClass('active'); |
168 | $(".nav-sidebar li:nth-child(14) a").addClass('active'); | 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 | $(".nav-sidebar li a").removeClass('active'); | 177 | $(".nav-sidebar li a").removeClass('active'); |
174 | $(".nav-sidebar li:nth-child(15) a").addClass('active'); | 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 | $(".nav-sidebar li a").removeClass('active'); | 183 | $(".nav-sidebar li a").removeClass('active'); |
180 | $(".nav-sidebar li:nth-child(16) a").addClass('active'); | 184 | $(".nav-sidebar li:nth-child(16) a").addClass('active'); |
181 | 185 | ||
182 | } | 186 | } |
183 | 187 | ||
184 | - | ||
185 | }); | 188 | }); |
186 | </script> | 189 | </script> |
187 | <script> | 190 | <script> |