Showing
14 changed files
400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
@@ -6,6 +6,8 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | @@ -6,6 +6,8 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | ||
6 | $scope.threeDAnatomyData; | 6 | $scope.threeDAnatomyData; |
7 | $scope.Id; | 7 | $scope.Id; |
8 | $scope.$on('$viewContentLoaded', function (event) { | 8 | $scope.$on('$viewContentLoaded', function (event) { |
9 | + $('#grid-view').empty(); | ||
10 | + $("<div id='3dASpinner' class='spinner'><img id='img-spinner' src='content/images/common/loading.gif' alt='Loading' /></div>").appendTo('#grid-view'); | ||
9 | $scope.scroll(); | 11 | $scope.scroll(); |
10 | var promise = DataService.getJson('~/../content/data/json/3da/3da_dat_contentlist.json') | 12 | var promise = DataService.getJson('~/../content/data/json/3da/3da_dat_contentlist.json') |
11 | promise.then( | 13 | promise.then( |
@@ -20,7 +22,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | @@ -20,7 +22,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | ||
20 | .select(); | 22 | .select(); |
21 | 23 | ||
22 | // console.log($scope.selectedCIListViewData); | 24 | // console.log($scope.selectedCIListViewData); |
23 | - $('#grid-view').empty(); | 25 | + |
24 | angular.forEach($scope.selectedThreeDAdata, function (value, key) { | 26 | angular.forEach($scope.selectedThreeDAdata, function (value, key) { |
25 | $scope.imagePath = "~/../content/images/3da/thumbnails/" + value._ThumbnailImage; | 27 | $scope.imagePath = "~/../content/images/3da/thumbnails/" + value._ThumbnailImage; |
26 | 28 | ||
@@ -31,14 +33,14 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | @@ -31,14 +33,14 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | ||
31 | 33 | ||
32 | 34 | ||
33 | $compile($el)($scope); | 35 | $compile($el)($scope); |
34 | - | 36 | + |
35 | $(".sidebar").mCustomScrollbar({ | 37 | $(".sidebar").mCustomScrollbar({ |
36 | autoHideScrollbar: true, | 38 | autoHideScrollbar: true, |
37 | //theme:"rounded" | 39 | //theme:"rounded" |
38 | }); | 40 | }); |
39 | 41 | ||
40 | }); | 42 | }); |
41 | - | 43 | + $('#3dASpinner').remove(); |
42 | }, | 44 | }, |
43 | function (error) { | 45 | function (error) { |
44 | // handle errors here | 46 | // handle errors here |
400-SOURCECODE/AIAHTML5.Web/app/controllers/ADAMImgController.js
@@ -12,6 +12,7 @@ function ($scope, $rootScope, pages, log, $location) { | @@ -12,6 +12,7 @@ function ($scope, $rootScope, pages, log, $location) { | ||
12 | //alert("scroll"); | 12 | //alert("scroll"); |
13 | } | 13 | } |
14 | $scope.$on('$viewContentLoaded', function (event) { | 14 | $scope.$on('$viewContentLoaded', function (event) { |
15 | + $("#ADAMIMGSpinner").fadeOut('slow'); | ||
15 | // code that will be executed ... | 16 | // code that will be executed ... |
16 | // every time this view is loaded | 17 | // every time this view is loaded |
17 | 18 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js
@@ -19,6 +19,7 @@ function ($scope, $rootScope, pages, log, $location) { | @@ -19,6 +19,7 @@ function ($scope, $rootScope, pages, log, $location) { | ||
19 | //$rootScope.currentActiveModuleTitle = pages[10].name; | 19 | //$rootScope.currentActiveModuleTitle = pages[10].name; |
20 | 20 | ||
21 | $scope.$on('$viewContentLoaded', function (event) { | 21 | $scope.$on('$viewContentLoaded', function (event) { |
22 | + $('#AODSpinner').fadeOut('slow'); | ||
22 | // code that will be executed ... | 23 | // code that will be executed ... |
23 | // every time this view is loaded | 24 | // every time this view is loaded |
24 | 25 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/AnatTestController.js
@@ -13,6 +13,7 @@ function ($scope, $rootScope, pages, log, $location) { | @@ -13,6 +13,7 @@ function ($scope, $rootScope, pages, log, $location) { | ||
13 | } | 13 | } |
14 | 14 | ||
15 | $scope.$on('$viewContentLoaded', function (event) { | 15 | $scope.$on('$viewContentLoaded', function (event) { |
16 | + $("#AnatTestSpinner").fadeOut('slow'); | ||
16 | // code that will be executed ... | 17 | // code that will be executed ... |
17 | // every time this view is loaded | 18 | // every time this view is loaded |
18 | 19 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
1 | -AIA.controller("CAController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "pages", "BodyRegions", "BodySystems", "MedicalSpecialties", "DataService", | ||
2 | -function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, pages, BodyRegions, BodySystems, MedicalSpecialties, DataService) { | ||
3 | - // $rootScope.currentActiveModuleTitle = pages[4].name; | ||
4 | - $scope.showTabButton = true; | ||
5 | - $scope.AnimationData; | ||
6 | - $scope.CAAllBodyRegion = []; | ||
7 | - $scope.CAAllBodySystem = []; | ||
8 | - $scope.CAAllSpeciality = []; | ||
9 | - $scope.selectedCAListViewData = []; | ||
10 | - $scope.searchCAListViewData = []; | ||
11 | - $scope.SelectedCAthumbImage = []; | ||
12 | - $scope.SelectedCAImage = []; | ||
13 | - $scope.SelectedCASummary = []; | ||
14 | - $scope.filterstring = false; | ||
15 | - $scope.hostedServer = "http://aia5.adam.com/graphics/Multimedia/en/"; | ||
16 | - $scope.hostedFolderId; | ||
17 | - $scope.idSelected; | ||
18 | - $scope.query = { | ||
19 | - selectedbodyregion: '', | ||
20 | - selectedbodysystem: '', | ||
21 | - selectedspecialty: '', | ||
22 | - }; | ||
23 | - | ||
24 | - $scope.setActiveTab = function (tabToSet) { | ||
25 | - $scope.activeTab = tabToSet; | ||
26 | - localStorage.setItem("currentCATabView", $scope.activeTab); | ||
27 | - }; | ||
28 | - | ||
29 | - $scope.$on('$viewContentLoaded', function (event) { | ||
30 | - // code that will be executed ... | ||
31 | - // every time this view is loaded | ||
32 | - | ||
33 | - //get current path | ||
34 | - var currentURL = $location.path(); | ||
35 | - var selectedModuleName = ''; | ||
36 | - //set module title | ||
37 | - angular.forEach($rootScope.userModules, function (value, key) { | ||
38 | - if (value.slug === currentURL.replace('/', '')) { | ||
39 | - selectedModuleName = value.name; | ||
40 | - } | ||
41 | - $rootScope.currentActiveModuleTitle = selectedModuleName; | ||
42 | - }) | ||
43 | - | ||
44 | - | ||
45 | - $scope.LoadCAJsonData(); | ||
46 | - | ||
47 | - $scope.CAAllBodyRegion = BodyRegions; | ||
48 | - $scope.CAAllBodySystem = BodySystems; | ||
49 | - $scope.CAAllSpeciality = MedicalSpecialties; | ||
50 | - $scope.scroll(); | ||
51 | - | ||
52 | - //set the local storage | ||
53 | - | ||
54 | - var curtab = localStorage.getItem("currentCATabView"); | ||
55 | - //if (curtab == 2) { | ||
56 | - // $scope.setActiveTab(2); | ||
57 | - //} | ||
58 | - if (curtab == 2) { | ||
59 | - $scope.setActiveTab(2); | ||
60 | - var curSelectedRowId = localStorage.getItem("CASelectedRowId"); | ||
61 | - if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') { | ||
62 | - $scope.reRunSearchOnLoad(); | ||
63 | - $scope.idSelected = curSelectedRowId; | ||
64 | - $scope.ReloadListViewImageDiv($scope.idSelected); | ||
65 | - } | ||
66 | - else { | ||
67 | - $scope.reRunSearchOnLoad() | ||
68 | - $scope.idSelected = ''; | ||
69 | - } | ||
70 | - } | ||
71 | - else { | ||
72 | - $scope.setActiveTab(1); | ||
73 | - $scope.reRunSearchOnLoad(); | ||
74 | - } | ||
75 | - | ||
76 | - | ||
77 | - | ||
78 | - }); | ||
79 | - | ||
80 | - $scope.reRunSearchOnLoad = function () { | ||
81 | - var curBodyRegion = localStorage.getItem("CACurBodyRegion"); | ||
82 | - if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') { | ||
83 | - $scope.query.selectedbodyregion = curBodyRegion; | ||
84 | - } | ||
85 | - else { | ||
86 | - $scope.query.selectedbodyregion = ""; | ||
87 | - } | ||
88 | - | ||
89 | - var curBodySystem = localStorage.getItem("CACurBodySystem"); | ||
90 | - if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !== '') { | ||
91 | - $scope.query.selectedbodysystem = curBodySystem; | ||
92 | - } | ||
93 | - else { | ||
94 | - $scope.query.selectedbodysystem = ""; | ||
95 | - } | ||
96 | - | ||
97 | - var curSpeciality = localStorage.getItem("CACurSpeciality"); | ||
98 | - if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') { | ||
99 | - $scope.query.selectedspecialty = curSpeciality; | ||
100 | - } | ||
101 | - else { | ||
102 | - $scope.query.selectedspecialty = ""; | ||
103 | - } | ||
104 | - | ||
105 | - | ||
106 | - if ($scope.query.selectedbodyregion == "" && $scope.query.selectedbodysystem == "" && $scope.query.selectedspecialty == "") { | ||
107 | - $scope.loadAllCA(); | ||
108 | - } | ||
109 | - else { | ||
110 | - $scope.ApplySearch($scope.query); | ||
111 | - | ||
112 | - } | ||
113 | - } | ||
114 | - | ||
115 | - $scope.LoadCAJsonData = function () { | ||
116 | - | ||
117 | - var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | ||
118 | - promise.then( | ||
119 | - function (result) { | ||
120 | - $scope.AnimationData = result; | ||
121 | - //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | ||
122 | - | ||
123 | - $scope.selectedCAListViewData = new jinqJs() | ||
124 | - .from($scope.AnimationData.root.CAData) | ||
125 | - .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
126 | - .select(); | ||
127 | - | ||
128 | - //console.log($scope.selectedCAListViewData); | ||
129 | - | ||
130 | - }, | ||
131 | - function (error) { | ||
132 | - // handle errors here | ||
133 | - console.log(' $scope.AnimationData = ' + error.statusText); | ||
134 | - } | ||
135 | - ); | ||
136 | - | ||
137 | - | ||
138 | - }; | ||
139 | - | ||
140 | - $scope.loadAllCA = function () { | ||
141 | - | ||
142 | - var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | ||
143 | - promise.then( | ||
144 | - function (result) { | ||
145 | - $scope.AnimationData = result; | ||
146 | - //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | ||
147 | - | ||
148 | - $scope.selectedCAListViewData = new jinqJs() | ||
149 | - .from($scope.AnimationData.root.CAData) | ||
150 | - .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
151 | - .select(); | ||
152 | - | ||
153 | - //console.log($scope.selectedCAListViewData); | ||
154 | - | ||
155 | - $('#grid-view').empty(); | ||
156 | - | ||
157 | - angular.forEach($scope.selectedCAListViewData, function (value, key) { | ||
158 | - $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; | ||
159 | - | ||
160 | - | ||
161 | - var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | ||
162 | - + '<div class="thumbnail" >' | ||
163 | - + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + $scope.imagePath + '" alt="" title="" >' | ||
164 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | ||
165 | - | ||
166 | - | ||
167 | - $compile($el)($scope); | ||
168 | - | ||
169 | - $(".sidebar").mCustomScrollbar({ | ||
170 | - autoHideScrollbar: true, | ||
171 | - //theme:"rounded" | ||
172 | - }); | ||
173 | - | ||
174 | - }); | ||
175 | - | ||
176 | - }, | ||
177 | - function (error) { | ||
178 | - // handle errors here | ||
179 | - console.log(' $scope.AnimationData = ' + error.statusText); | ||
180 | - } | ||
181 | - ); | ||
182 | - | ||
183 | - | ||
184 | - } | ||
185 | - | ||
186 | - $scope.IsVisible = function () { | ||
187 | - $scope.scroll(); | ||
188 | - | ||
189 | - } | ||
190 | - | ||
191 | - $scope.showItem = function (id) { | ||
192 | - //console.log(id); | ||
193 | - $scope.idSelected = id; | ||
194 | - localStorage.setItem("CASelectedRowId", id); | ||
195 | - | ||
196 | - //Set the vertical scroll value of the table. | ||
197 | - var y = $('#ListViewDiv').scrollTop(); | ||
198 | - localStorage.setItem("CAListViewScroll", y); | ||
199 | - | ||
200 | - $scope.hiderow = true; | ||
201 | - if ($scope.filterstring == false) { | ||
202 | - | ||
203 | - var SelectedCAthumbImage = []; | ||
204 | - SelectedCAthumbImage = new jinqJs() | ||
205 | - .from($scope.selectedCAListViewData) | ||
206 | - .where('_id = ' + id) | ||
207 | - .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | ||
208 | - | ||
209 | - $scope.SelectedCAthumbImage = "~/../content/images/ca/thumbnails/" + SelectedCAthumbImage[0]._ThumbnailImage; | ||
210 | - | ||
211 | - $scope.SelectedCASummary = SelectedCAthumbImage[0]._Summary; | ||
212 | - $scope.SelectedCAId = SelectedCAthumbImage[0]._id; | ||
213 | - $scope.SelectedCATitle = SelectedCAthumbImage[0]._Title; | ||
214 | - | ||
215 | - } | ||
216 | - else { | ||
217 | - if ($scope.searchCAListViewData.length > 0) { | ||
218 | - | ||
219 | - var SelectedCAthumbImage = []; | ||
220 | - SelectedCAthumbImage = new jinqJs() | ||
221 | - .from($scope.searchCAListViewData) | ||
222 | - .where('_id = ' + id) | ||
223 | - .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | ||
224 | - | ||
225 | - $scope.SelectedCAthumbImage = "~/../content/images/ca/thumbnails/" + SelectedCAthumbImage[0]._ThumbnailImage; | ||
226 | - | ||
227 | - $scope.SelectedCASummary = SelectedCAthumbImage[0]._Summary; | ||
228 | - $scope.SelectedCAId = SelectedCAthumbImage[0]._id; | ||
229 | - $scope.SelectedCATitle = SelectedCAthumbImage[0]._Title; | ||
230 | - } | ||
231 | - } | ||
232 | - }; | ||
233 | - | ||
234 | - $scope.Reset = function (query) { | ||
235 | - | ||
236 | - query.selectedbodyregion = ""; | ||
237 | - query.selectedbodysystem = ""; | ||
238 | - query.selectedspecialty = ""; | ||
239 | - | ||
240 | - //set localstorage values | ||
241 | - localStorage.setItem("CACurBodyRegion", ''); | ||
242 | - localStorage.setItem("CACurBodySystem", ''); | ||
243 | - localStorage.setItem("CACurSpeciality", ''); | ||
244 | - localStorage.setItem("CAListViewScroll", ''); | ||
245 | - localStorage.setItem("CASelectedRowId", ""); | ||
246 | - | ||
247 | - $scope.filterstring = false; | ||
248 | - | ||
249 | - if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); } | ||
250 | - | ||
251 | - $('#ListViewDiv').scrollTop(0); | ||
252 | - | ||
253 | - $scope.hideListViewDiv(); | ||
254 | - | ||
255 | - | ||
256 | - while ($scope.searchCAListViewData.length) { | ||
257 | - $scope.searchCAListViewData.pop(); | ||
258 | - } | ||
259 | - | ||
260 | - if (localStorage.getItem("currentCATabView") == 2) { | ||
261 | - localStorage.setItem("CASelectedRowId", ""); | ||
262 | - $scope.hiderow = false; | ||
263 | - } | ||
264 | - | ||
265 | - $scope.loadAllCA(); | ||
266 | - | ||
267 | - } | ||
268 | - | ||
269 | - // for "Intracytoplasmic sperm injection (ICSI)" case, the Body region is not required so we have added "_BodyRegion": "None" which was actually not available in origincal flex file. | ||
270 | - $scope.ApplySearch = function (query) { | ||
271 | - | ||
272 | - $scope.filterstring = true; | ||
273 | - | ||
274 | - while ($scope.searchCAListViewData.length) { | ||
275 | - $scope.searchCAListViewData.pop(); | ||
276 | - } | ||
277 | - | ||
278 | - //$('#grid-view').empty(); | ||
279 | - | ||
280 | - filtercount = 0; | ||
281 | - if (typeof (query.selectedbodyregion) !== "undefined" && query.selectedbodyregion !== null && query.selectedbodyregion !== "") { | ||
282 | - filtercount = filtercount + 1; | ||
283 | - localStorage.setItem("CACurBodyRegion", query.selectedbodyregion); | ||
284 | - } | ||
285 | - else { | ||
286 | - localStorage.setItem("CACurBodyRegion", ''); | ||
287 | - } | ||
288 | - | ||
289 | - if (typeof (query.selectedbodysystem) !== "undefined" && query.selectedbodysystem !== null && query.selectedbodysystem !== "") { | ||
290 | - filtercount = filtercount + 1; | ||
291 | - localStorage.setItem("CACurBodySystem", query.selectedbodysystem); | ||
292 | - } | ||
293 | - else { | ||
294 | - localStorage.setItem("CACurBodySystem", ''); | ||
295 | - } | ||
296 | - | ||
297 | - if (typeof (query.selectedspecialty) !== "undefined" && query.selectedspecialty !== null && query.selectedspecialty !== "") { | ||
298 | - filtercount = filtercount + 1; | ||
299 | - localStorage.setItem("CACurSpeciality", query.selectedspecialty); | ||
300 | - } | ||
301 | - else { | ||
302 | - localStorage.setItem("CACurSpeciality", ''); | ||
303 | - } | ||
304 | - | ||
305 | - var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | ||
306 | - promise.then( | ||
307 | - function (result) { | ||
308 | - $scope.AnimationData = result; | ||
309 | - //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | ||
310 | - | ||
311 | - $scope.selectedCAListViewData = new jinqJs() | ||
312 | - .from($scope.AnimationData.root.CAData) | ||
313 | - .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
314 | - .select(); | ||
315 | - | ||
316 | - //console.log($scope.selectedCAListViewData); | ||
317 | - | ||
318 | - $('#grid-view').empty(); | ||
319 | - | ||
320 | - angular.forEach($scope.selectedCAListViewData, function (value, key) { | ||
321 | - | ||
322 | - var selectimg = true; | ||
323 | - var count = 0; | ||
324 | - | ||
325 | - | ||
326 | - if (typeof (query.selectedbodyregion) !== "undefined" && query.selectedbodyregion !== null && query.selectedbodyregion !== "") { | ||
327 | - var posbodyregion = value._BodyRegion.indexOf((query.selectedbodyregion.trim())); | ||
328 | - if (posbodyregion > -1) { | ||
329 | - selectimg = true; | ||
330 | - count = count + 1; | ||
331 | - | ||
332 | - } | ||
333 | - else { | ||
334 | - selectimg = false; | ||
335 | - count = count - 1; | ||
336 | - } | ||
337 | - | ||
338 | - } | ||
339 | - | ||
340 | - if (typeof (query.selectedbodysystem) !== "undefined" && query.selectedbodysystem !== null && query.selectedbodysystem !== "") { | ||
341 | - var posbodysystem = value._BodySystem.indexOf(query.selectedbodysystem); | ||
342 | - if (posbodysystem > -1) { | ||
343 | - count = count + 1; | ||
344 | - selectimg = true; | ||
345 | - } else { | ||
346 | - selectimg = false; | ||
347 | - count = count - 1; | ||
348 | - } | ||
349 | - } | ||
350 | - | ||
351 | - if (typeof (query.selectedspecialty) !== "undefined" && query.selectedspecialty !== null && query.selectedspecialty !== "") { | ||
352 | - var posspeciality = value._MedicalSpecialty.indexOf(query.selectedspecialty); | ||
353 | - if (posspeciality > -1) { | ||
354 | - count = count + 1; | ||
355 | - selectimg = true; | ||
356 | - } else { | ||
357 | - selectimg = false; | ||
358 | - count = count - 1; | ||
359 | - } | ||
360 | - | ||
361 | - } | ||
362 | - | ||
363 | - if (selectimg === true && count >= filtercount) { | ||
364 | - | ||
365 | - | ||
366 | - $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; | ||
367 | - | ||
368 | - var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | ||
369 | - + '<div class="thumbnail" >' | ||
370 | - + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + $scope.imagePath + '" alt="" title="" >' | ||
371 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | ||
372 | - | ||
373 | - | ||
374 | - $compile($el)($scope); | ||
375 | - | ||
376 | - $(".sidebar").mCustomScrollbar({ | ||
377 | - autoHideScrollbar: true, | ||
378 | - //theme:"rounded" | ||
379 | - }); | ||
380 | - | ||
381 | - | ||
382 | - $scope.searchCAListViewData.push( | ||
383 | - { | ||
384 | - "_id": value._id, | ||
385 | - "_ImageId": value._ImageId, | ||
386 | - "_Title": value._Title, | ||
387 | - "_Video": value._Video, | ||
388 | - "_ThumbnailImage": value._ThumbnailImage, | ||
389 | - "_BodySystem": value._BodySystem, | ||
390 | - "_BodyRegion": value._BodyRegion, | ||
391 | - "_MedicalSpecialty": value._MedicalSpecialty, | ||
392 | - "_Summary": value._Summary, | ||
393 | - "_LowerSummary": value._LowerSummary | ||
394 | - }); | ||
395 | - | ||
396 | - } | ||
397 | - | ||
398 | - | ||
399 | - }); | ||
400 | - | ||
401 | - //Show Error Message in case of gridview if no data is found | ||
402 | - if ($scope.searchCAListViewData.length == 0) { | ||
403 | - | ||
404 | - var $el = $('<div class="col-sm-12" style="padding-left:25px;padding-top:10px;"><strong style="color:white;">No animation found for the selected search criteria!</strong></div>').appendTo('#grid-view'); | ||
405 | - $compile($el)($scope); | ||
406 | - } | ||
407 | - | ||
408 | - }, | ||
409 | - function (error) { | ||
410 | - // handle errors here | ||
411 | - console.log(' $scope.AnimationData = ' + error.statusText); | ||
412 | - } | ||
413 | - ); | ||
414 | - | ||
415 | - } | ||
416 | - | ||
417 | - | ||
418 | - | ||
419 | - | ||
420 | - $scope.scroll = function () { | ||
421 | - $("html,body").scrollTop(0); | ||
422 | - } | ||
423 | - | ||
424 | - | ||
425 | - | ||
426 | - $scope.openView = function ($event) { | ||
427 | - $rootScope.disableAnnotationTBFn(); | ||
428 | - $rootScope.MenuModuleName = "CA"; | ||
429 | - //alert($rootScope.MenuModuleName); | ||
430 | - $rootScope.currentBodyViewId = $event.currentTarget.id; | ||
431 | - if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { | ||
432 | - var CITitle = []; | ||
433 | - CITitle = new jinqJs() | ||
434 | - .from($scope.selectedCAListViewData) | ||
435 | - .where('_id = ' + $event.currentTarget.id) | ||
436 | - .select('_Title'); | ||
437 | - | ||
438 | - //console.log(CITitle); | ||
439 | - //console.log($scope.selectedCAListViewData); | ||
440 | - | ||
441 | - $rootScope.ViewTitle = CITitle[0]._Title; | ||
442 | - } | ||
443 | - else { | ||
444 | - $rootScope.ViewTitle = $event.currentTarget.textContent; | ||
445 | - | ||
446 | - } | ||
447 | - | ||
448 | - | ||
449 | - localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle); | ||
450 | - localStorage.setItem("currentBodyViewId", $event.currentTarget.id); | ||
451 | - | ||
452 | - var u = $location.url(); | ||
453 | - $location.url('/clinical-animations-detail'); | ||
454 | - | ||
455 | - //console.log($location.url('/clinical-animations-detail')); | ||
456 | - | ||
457 | - } | ||
458 | - | ||
459 | - $scope.openBodyView = function () { | ||
460 | - | ||
461 | - if ($rootScope.disableAnnotationTB == true) | ||
462 | - { | ||
463 | - $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled'); | ||
464 | - $('#slider-range-min-2').slider('disable'); | ||
465 | - $("#annotationpaintbrushsize").attr('disabled', 'disabled'); | ||
466 | - //$("#annotationpaintbrushsize").attr("href", "#"); | ||
467 | - } | ||
468 | - $rootScope.isLoading = true; | ||
469 | - $('#spinner').css('visibility', 'visible'); | ||
470 | - $scope.voId = localStorage.getItem("currentBodyViewId"); | ||
471 | - | ||
472 | - // alert($scope.voId); | ||
473 | - | ||
474 | - | ||
475 | - //once you get id in scope push detail in jspanel content | ||
476 | - | ||
477 | - var openViews; | ||
478 | - if ($rootScope.openViews.length > 0) { | ||
479 | - openViews = new jinqJs() | ||
480 | - .from($rootScope.openViews) | ||
481 | - .where("BodyViewId==" + $scope.voId) | ||
482 | - .select(); | ||
483 | - } | ||
484 | - var counter = 1; | ||
485 | - var tittle = localStorage.getItem("currentViewTitleFromJson"); | ||
486 | - | ||
487 | - if (openViews != null && openViews.length > 0) { | ||
488 | - angular.forEach(openViews, function (value, key) { | ||
489 | - | ||
490 | - if (value.body - views == tittle) { | ||
491 | - tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; | ||
492 | - $rootScope.currentActiveViewTitle = tittle; | ||
493 | - localStorage.setItem("currentViewTitle", tittle); | ||
494 | - } | ||
495 | - | ||
496 | - }); | ||
497 | - } | ||
498 | - else { | ||
499 | - localStorage.setItem("currentViewTitle", tittle); | ||
500 | - | ||
501 | - } | ||
502 | - | ||
503 | - //alert(localStorage.getItem("currentViewTitle")); | ||
504 | - | ||
505 | - var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist_mp4link.json') | ||
506 | - promise.then( | ||
507 | - function (result) { | ||
508 | - $scope.AnimationData = result; | ||
509 | - $scope.CAlistViewData = $scope.AnimationData.root.CAData; | ||
510 | - | ||
511 | - var clickedCAVideo = []; | ||
512 | - clickedCAVideo = new jinqJs() | ||
513 | - .from($scope.CAlistViewData) | ||
514 | - .where('_id == ' + $scope.voId) | ||
515 | - .select('_Video', '_LowerSummary', '_HostedFolderId'); | ||
516 | - | ||
517 | - $scope.clickedCAVideo = clickedCAVideo[0]._Video; | ||
518 | - $scope.clickedCASummary = clickedCAVideo[0]._LowerSummary; | ||
519 | - $scope.hostedFolderId = clickedCAVideo[0]._HostedFolderId; | ||
520 | - $scope.poster = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + ".jpg"; | ||
521 | - $scope.ad = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + "_ad.mp4"; | ||
522 | - $scope.HDVid = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + "_HD.mp4"; | ||
523 | - $scope.webm = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + ".webm"; | ||
524 | - $scope.ogv = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + ".ogv"; | ||
525 | - $scope.playerScript = "~/../libs/video_4_12_11/video_4_12_11.js"; | ||
526 | - //$scope.vtt = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + ".vtt" | ||
527 | - $scope.vtt = "~/../content/data/vtt/" + $scope.hostedFolderId + ".vtt"; | ||
528 | - console.log($scope.vtt); | ||
529 | - if ($scope.clickedCAVideo.length > 0 && $scope.clickedCASummary.length > 0) { | ||
530 | - | ||
531 | - $rootScope.isLoading = false; | ||
532 | - $('#spinner').css('visibility', 'hidden'); | ||
533 | - | ||
534 | - $.jsPanel({ | ||
535 | - id: 'caVideoPanel', | ||
536 | - selector: '.caView', | ||
537 | - theme: 'success', | ||
538 | - currentController: 'CAController', | ||
539 | - parentSlug: 'clinical-animations', | ||
540 | - content: '<script src="' + $scope.playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo").pause();$("#btnTxtOnOff").click(function(){$("#sid").toggle();if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");}else{$(this).text("Text Off");}});});</script><div id="pid" class="row"><div id="divplayerinlineVideo" class="col-sm-12" align="center" width="640" height="480"><video width="640" height="360"' + | ||
541 | - 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo"' + | ||
542 | - ' poster="' + $scope.poster + '"' + | ||
543 | - 'controls="true" preload="none" allowfullscreen="true" allowscriptaccess="always" ' + | ||
544 | - ' ad="' + $scope.ad + '"' + | ||
545 | - ' nonad="' + $scope.clickedCAVideo + '"' + | ||
546 | - ' hd="' + $scope.HDVid + '" ' + | ||
547 | - ' nonhd="' + $scope.clickedCAVideo + '">' + | ||
548 | - ' <source type="video/mp4" src="' + $scope.clickedCAVideo + '">' + | ||
549 | - ' <source type="video/webm" src="' + $scope.webm + '">' + | ||
550 | - ' <source type="video/ogv" src="' + $scope.ogv + '">' + | ||
551 | - ' <track src="' + $scope.vtt + '" ' + | ||
552 | - ' kind="captions" srclang="en" label="On"><object width="640" height="360"' + | ||
553 | - ' type="application/x-shockwave-flash" data="//vjs.zencdn.net/3.2/video-js.swf"><param name="allowfullscreen" value="true">' + | ||
554 | - ' <param name="allowscriptaccess" value="always"><param name="movie" value="//vjs.zencdn.net/3.2/video-js.swf">' + | ||
555 | - ' <param name="flashvars" ng-value="controls=true&file=' + $scope.clickedCAVideo + '"><img ng-src="content/images/common/player/frameaccuracy_logo.jpg" style="height:80%;" alt="Here we are" title="No video playback capabilities"></object></video><div class="col-sm-12 well video-subtitle"><div id="sid" align="left" style="height:40px;overflow-y:scroll !important"><p>' + $scope.clickedCASummary + '</p></div><button id="btnTxtOnOff" class="btn btn-primary pull-right">Text Off</button></div></div></div>', | ||
556 | - | ||
557 | - //ajax: { | ||
558 | - // url: 'app/views/ca/ca-view-detail.html' | ||
559 | - //}, | ||
560 | - title: localStorage.getItem("currentViewTitle"), | ||
561 | - position: { | ||
562 | - top: 70, | ||
563 | - left: 1, | ||
564 | - }, | ||
565 | - | ||
566 | - size: { width: $(window).outerWidth() - 10, height: $(window).outerHeight() - 110 }, | ||
567 | - | ||
568 | - }); | ||
569 | - | ||
570 | - | ||
571 | - $rootScope.currentSlug = 'clinical-animations-detail'; | ||
572 | - | ||
573 | - $rootScope.openViews.push( | ||
574 | - { | ||
575 | - "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | ||
576 | - "slug": $rootScope.currentSlug | ||
577 | - }); | ||
578 | - | ||
579 | - | 1 | +AIA.controller("CAController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "pages", "BodyRegions", "BodySystems", "MedicalSpecialties", "DataService", |
2 | +function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, pages, BodyRegions, BodySystems, MedicalSpecialties, DataService) { | ||
3 | + // $rootScope.currentActiveModuleTitle = pages[4].name; | ||
4 | + $scope.showTabButton = true; | ||
5 | + $scope.AnimationData; | ||
6 | + $scope.CAAllBodyRegion = []; | ||
7 | + $scope.CAAllBodySystem = []; | ||
8 | + $scope.CAAllSpeciality = []; | ||
9 | + $scope.selectedCAListViewData = []; | ||
10 | + $scope.searchCAListViewData = []; | ||
11 | + $scope.SelectedCAthumbImage = []; | ||
12 | + $scope.SelectedCAImage = []; | ||
13 | + $scope.SelectedCASummary = []; | ||
14 | + $scope.filterstring = false; | ||
15 | + $scope.hostedServer = "http://aia5.adam.com/graphics/Multimedia/en/"; | ||
16 | + $scope.hostedFolderId; | ||
17 | + $scope.idSelected; | ||
18 | + $scope.query = { | ||
19 | + selectedbodyregion: '', | ||
20 | + selectedbodysystem: '', | ||
21 | + selectedspecialty: '', | ||
22 | + }; | ||
23 | + | ||
24 | + $scope.setActiveTab = function (tabToSet) { | ||
25 | + $scope.activeTab = tabToSet; | ||
26 | + localStorage.setItem("currentCATabView", $scope.activeTab); | ||
27 | + }; | ||
28 | + | ||
29 | + $scope.$on('$viewContentLoaded', function (event) { | ||
30 | + // code that will be executed ... | ||
31 | + // every time this view is loaded | ||
32 | + | ||
33 | + //get current path | ||
34 | + var currentURL = $location.path(); | ||
35 | + var selectedModuleName = ''; | ||
36 | + //set module title | ||
37 | + angular.forEach($rootScope.userModules, function (value, key) { | ||
38 | + if (value.slug === currentURL.replace('/', '')) { | ||
39 | + selectedModuleName = value.name; | ||
40 | + } | ||
41 | + $rootScope.currentActiveModuleTitle = selectedModuleName; | ||
42 | + }) | ||
43 | + | ||
44 | + | ||
45 | + $scope.LoadCAJsonData(); | ||
46 | + | ||
47 | + $scope.CAAllBodyRegion = BodyRegions; | ||
48 | + $scope.CAAllBodySystem = BodySystems; | ||
49 | + $scope.CAAllSpeciality = MedicalSpecialties; | ||
50 | + $scope.scroll(); | ||
51 | + | ||
52 | + //set the local storage | ||
53 | + | ||
54 | + var curtab = localStorage.getItem("currentCATabView"); | ||
55 | + //if (curtab == 2) { | ||
56 | + // $scope.setActiveTab(2); | ||
57 | + //} | ||
58 | + if (curtab == 2) { | ||
59 | + $scope.setActiveTab(2); | ||
60 | + var curSelectedRowId = localStorage.getItem("CASelectedRowId"); | ||
61 | + if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') { | ||
62 | + $scope.reRunSearchOnLoad(); | ||
63 | + $scope.idSelected = curSelectedRowId; | ||
64 | + $scope.ReloadListViewImageDiv($scope.idSelected); | ||
65 | + } | ||
66 | + else { | ||
67 | + $scope.reRunSearchOnLoad() | ||
68 | + $scope.idSelected = ''; | ||
69 | + } | ||
70 | + } | ||
71 | + else { | ||
72 | + $scope.setActiveTab(1); | ||
73 | + $scope.reRunSearchOnLoad(); | ||
74 | + } | ||
75 | + | ||
76 | + | ||
77 | + | ||
78 | + }); | ||
79 | + | ||
80 | + $scope.reRunSearchOnLoad = function () { | ||
81 | + var curBodyRegion = localStorage.getItem("CACurBodyRegion"); | ||
82 | + if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') { | ||
83 | + $scope.query.selectedbodyregion = curBodyRegion; | ||
84 | + } | ||
85 | + else { | ||
86 | + $scope.query.selectedbodyregion = ""; | ||
87 | + } | ||
88 | + | ||
89 | + var curBodySystem = localStorage.getItem("CACurBodySystem"); | ||
90 | + if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !== '') { | ||
91 | + $scope.query.selectedbodysystem = curBodySystem; | ||
92 | + } | ||
93 | + else { | ||
94 | + $scope.query.selectedbodysystem = ""; | ||
95 | + } | ||
96 | + | ||
97 | + var curSpeciality = localStorage.getItem("CACurSpeciality"); | ||
98 | + if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') { | ||
99 | + $scope.query.selectedspecialty = curSpeciality; | ||
100 | + } | ||
101 | + else { | ||
102 | + $scope.query.selectedspecialty = ""; | ||
103 | + } | ||
104 | + | ||
105 | + | ||
106 | + if ($scope.query.selectedbodyregion == "" && $scope.query.selectedbodysystem == "" && $scope.query.selectedspecialty == "") { | ||
107 | + $scope.loadAllCA(); | ||
108 | + } | ||
109 | + else { | ||
110 | + $scope.ApplySearch($scope.query); | ||
111 | + | ||
112 | + } | ||
113 | + } | ||
114 | + | ||
115 | + $scope.LoadCAJsonData = function () { | ||
116 | + | ||
117 | + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | ||
118 | + promise.then( | ||
119 | + function (result) { | ||
120 | + $scope.AnimationData = result; | ||
121 | + //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | ||
122 | + | ||
123 | + $scope.selectedCAListViewData = new jinqJs() | ||
124 | + .from($scope.AnimationData.root.CAData) | ||
125 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
126 | + .select(); | ||
127 | + | ||
128 | + //console.log($scope.selectedCAListViewData); | ||
129 | + | ||
130 | + }, | ||
131 | + function (error) { | ||
132 | + // handle errors here | ||
133 | + console.log(' $scope.AnimationData = ' + error.statusText); | ||
134 | + } | ||
135 | + ); | ||
136 | + | ||
137 | + | ||
138 | + }; | ||
139 | + | ||
140 | + $scope.loadAllCA = function () { | ||
141 | + $('#grid-view').empty(); | ||
142 | + $("<div id='CASpinner' class='spinner'><img id='img-spinner' src='content/images/common/loading.gif' alt='Loading' /></div>").appendTo('#grid-view'); | ||
143 | + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | ||
144 | + promise.then( | ||
145 | + function (result) { | ||
146 | + $scope.AnimationData = result; | ||
147 | + //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | ||
148 | + | ||
149 | + $scope.selectedCAListViewData = new jinqJs() | ||
150 | + .from($scope.AnimationData.root.CAData) | ||
151 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
152 | + .select(); | ||
153 | + | ||
154 | + //console.log($scope.selectedCAListViewData); | ||
155 | + | ||
156 | + | ||
157 | + | ||
158 | + angular.forEach($scope.selectedCAListViewData, function (value, key) { | ||
159 | + $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; | ||
160 | + | ||
161 | + | ||
162 | + var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | ||
163 | + + '<div class="thumbnail" >' | ||
164 | + + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + $scope.imagePath + '" alt="" title="" >' | ||
165 | + + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | ||
166 | + | ||
167 | + | ||
168 | + $compile($el)($scope); | ||
169 | + $('#CASpinner').remove(); | ||
170 | + $(".sidebar").mCustomScrollbar({ | ||
171 | + autoHideScrollbar: true, | ||
172 | + //theme:"rounded" | ||
173 | + }); | ||
174 | + | ||
175 | + }); | ||
176 | + | ||
177 | + }, | ||
178 | + function (error) { | ||
179 | + // handle errors here | ||
180 | + console.log(' $scope.AnimationData = ' + error.statusText); | ||
181 | + } | ||
182 | + ); | ||
183 | + | ||
184 | + | ||
185 | + } | ||
186 | + | ||
187 | + $scope.IsVisible = function () { | ||
188 | + $scope.scroll(); | ||
189 | + | ||
190 | + } | ||
191 | + | ||
192 | + $scope.showItem = function (id) { | ||
193 | + //console.log(id); | ||
194 | + $scope.idSelected = id; | ||
195 | + localStorage.setItem("CASelectedRowId", id); | ||
196 | + | ||
197 | + //Set the vertical scroll value of the table. | ||
198 | + var y = $('#ListViewDiv').scrollTop(); | ||
199 | + localStorage.setItem("CAListViewScroll", y); | ||
200 | + | ||
201 | + $scope.hiderow = true; | ||
202 | + if ($scope.filterstring == false) { | ||
203 | + | ||
204 | + var SelectedCAthumbImage = []; | ||
205 | + SelectedCAthumbImage = new jinqJs() | ||
206 | + .from($scope.selectedCAListViewData) | ||
207 | + .where('_id = ' + id) | ||
208 | + .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | ||
209 | + | ||
210 | + $scope.SelectedCAthumbImage = "~/../content/images/ca/thumbnails/" + SelectedCAthumbImage[0]._ThumbnailImage; | ||
211 | + | ||
212 | + $scope.SelectedCASummary = SelectedCAthumbImage[0]._Summary; | ||
213 | + $scope.SelectedCAId = SelectedCAthumbImage[0]._id; | ||
214 | + $scope.SelectedCATitle = SelectedCAthumbImage[0]._Title; | ||
215 | + | ||
216 | + } | ||
217 | + else { | ||
218 | + if ($scope.searchCAListViewData.length > 0) { | ||
219 | + | ||
220 | + var SelectedCAthumbImage = []; | ||
221 | + SelectedCAthumbImage = new jinqJs() | ||
222 | + .from($scope.searchCAListViewData) | ||
223 | + .where('_id = ' + id) | ||
224 | + .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | ||
225 | + | ||
226 | + $scope.SelectedCAthumbImage = "~/../content/images/ca/thumbnails/" + SelectedCAthumbImage[0]._ThumbnailImage; | ||
227 | + | ||
228 | + $scope.SelectedCASummary = SelectedCAthumbImage[0]._Summary; | ||
229 | + $scope.SelectedCAId = SelectedCAthumbImage[0]._id; | ||
230 | + $scope.SelectedCATitle = SelectedCAthumbImage[0]._Title; | ||
231 | + } | ||
232 | + } | ||
233 | + }; | ||
234 | + | ||
235 | + $scope.Reset = function (query) { | ||
236 | + | ||
237 | + query.selectedbodyregion = ""; | ||
238 | + query.selectedbodysystem = ""; | ||
239 | + query.selectedspecialty = ""; | ||
240 | + | ||
241 | + //set localstorage values | ||
242 | + localStorage.setItem("CACurBodyRegion", ''); | ||
243 | + localStorage.setItem("CACurBodySystem", ''); | ||
244 | + localStorage.setItem("CACurSpeciality", ''); | ||
245 | + localStorage.setItem("CAListViewScroll", ''); | ||
246 | + localStorage.setItem("CASelectedRowId", ""); | ||
247 | + | ||
248 | + $scope.filterstring = false; | ||
249 | + | ||
250 | + if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); } | ||
251 | + | ||
252 | + $('#ListViewDiv').scrollTop(0); | ||
253 | + | ||
254 | + $scope.hideListViewDiv(); | ||
255 | + | ||
256 | + | ||
257 | + while ($scope.searchCAListViewData.length) { | ||
258 | + $scope.searchCAListViewData.pop(); | ||
259 | + } | ||
260 | + | ||
261 | + if (localStorage.getItem("currentCATabView") == 2) { | ||
262 | + localStorage.setItem("CASelectedRowId", ""); | ||
263 | + $scope.hiderow = false; | ||
264 | + } | ||
265 | + | ||
266 | + $scope.loadAllCA(); | ||
267 | + | ||
268 | + } | ||
269 | + | ||
270 | + // for "Intracytoplasmic sperm injection (ICSI)" case, the Body region is not required so we have added "_BodyRegion": "None" which was actually not available in origincal flex file. | ||
271 | + $scope.ApplySearch = function (query) { | ||
272 | + | ||
273 | + $scope.filterstring = true; | ||
274 | + | ||
275 | + while ($scope.searchCAListViewData.length) { | ||
276 | + $scope.searchCAListViewData.pop(); | ||
277 | + } | ||
278 | + | ||
279 | + //$('#grid-view').empty(); | ||
280 | + | ||
281 | + filtercount = 0; | ||
282 | + if (typeof (query.selectedbodyregion) !== "undefined" && query.selectedbodyregion !== null && query.selectedbodyregion !== "") { | ||
283 | + filtercount = filtercount + 1; | ||
284 | + localStorage.setItem("CACurBodyRegion", query.selectedbodyregion); | ||
285 | + } | ||
286 | + else { | ||
287 | + localStorage.setItem("CACurBodyRegion", ''); | ||
288 | + } | ||
289 | + | ||
290 | + if (typeof (query.selectedbodysystem) !== "undefined" && query.selectedbodysystem !== null && query.selectedbodysystem !== "") { | ||
291 | + filtercount = filtercount + 1; | ||
292 | + localStorage.setItem("CACurBodySystem", query.selectedbodysystem); | ||
293 | + } | ||
294 | + else { | ||
295 | + localStorage.setItem("CACurBodySystem", ''); | ||
296 | + } | ||
297 | + | ||
298 | + if (typeof (query.selectedspecialty) !== "undefined" && query.selectedspecialty !== null && query.selectedspecialty !== "") { | ||
299 | + filtercount = filtercount + 1; | ||
300 | + localStorage.setItem("CACurSpeciality", query.selectedspecialty); | ||
301 | + } | ||
302 | + else { | ||
303 | + localStorage.setItem("CACurSpeciality", ''); | ||
304 | + } | ||
305 | + | ||
306 | + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | ||
307 | + promise.then( | ||
308 | + function (result) { | ||
309 | + $scope.AnimationData = result; | ||
310 | + //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | ||
311 | + | ||
312 | + $scope.selectedCAListViewData = new jinqJs() | ||
313 | + .from($scope.AnimationData.root.CAData) | ||
314 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | ||
315 | + .select(); | ||
316 | + | ||
317 | + //console.log($scope.selectedCAListViewData); | ||
318 | + | ||
319 | + $('#grid-view').empty(); | ||
320 | + | ||
321 | + angular.forEach($scope.selectedCAListViewData, function (value, key) { | ||
322 | + | ||
323 | + var selectimg = true; | ||
324 | + var count = 0; | ||
325 | + | ||
326 | + | ||
327 | + if (typeof (query.selectedbodyregion) !== "undefined" && query.selectedbodyregion !== null && query.selectedbodyregion !== "") { | ||
328 | + var posbodyregion = value._BodyRegion.indexOf((query.selectedbodyregion.trim())); | ||
329 | + if (posbodyregion > -1) { | ||
330 | + selectimg = true; | ||
331 | + count = count + 1; | ||
332 | + | ||
333 | + } | ||
334 | + else { | ||
335 | + selectimg = false; | ||
336 | + count = count - 1; | ||
337 | + } | ||
338 | + | ||
339 | + } | ||
340 | + | ||
341 | + if (typeof (query.selectedbodysystem) !== "undefined" && query.selectedbodysystem !== null && query.selectedbodysystem !== "") { | ||
342 | + var posbodysystem = value._BodySystem.indexOf(query.selectedbodysystem); | ||
343 | + if (posbodysystem > -1) { | ||
344 | + count = count + 1; | ||
345 | + selectimg = true; | ||
346 | + } else { | ||
347 | + selectimg = false; | ||
348 | + count = count - 1; | ||
349 | + } | ||
350 | + } | ||
351 | + | ||
352 | + if (typeof (query.selectedspecialty) !== "undefined" && query.selectedspecialty !== null && query.selectedspecialty !== "") { | ||
353 | + var posspeciality = value._MedicalSpecialty.indexOf(query.selectedspecialty); | ||
354 | + if (posspeciality > -1) { | ||
355 | + count = count + 1; | ||
356 | + selectimg = true; | ||
357 | + } else { | ||
358 | + selectimg = false; | ||
359 | + count = count - 1; | ||
360 | + } | ||
361 | + | ||
362 | + } | ||
363 | + | ||
364 | + if (selectimg === true && count >= filtercount) { | ||
365 | + | ||
366 | + | ||
367 | + $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; | ||
368 | + | ||
369 | + var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | ||
370 | + + '<div class="thumbnail" >' | ||
371 | + + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + $scope.imagePath + '" alt="" title="" >' | ||
372 | + + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | ||
373 | + | ||
374 | + | ||
375 | + $compile($el)($scope); | ||
376 | + | ||
377 | + $(".sidebar").mCustomScrollbar({ | ||
378 | + autoHideScrollbar: true, | ||
379 | + //theme:"rounded" | ||
380 | + }); | ||
381 | + | ||
382 | + | ||
383 | + $scope.searchCAListViewData.push( | ||
384 | + { | ||
385 | + "_id": value._id, | ||
386 | + "_ImageId": value._ImageId, | ||
387 | + "_Title": value._Title, | ||
388 | + "_Video": value._Video, | ||
389 | + "_ThumbnailImage": value._ThumbnailImage, | ||
390 | + "_BodySystem": value._BodySystem, | ||
391 | + "_BodyRegion": value._BodyRegion, | ||
392 | + "_MedicalSpecialty": value._MedicalSpecialty, | ||
393 | + "_Summary": value._Summary, | ||
394 | + "_LowerSummary": value._LowerSummary | ||
395 | + }); | ||
396 | + | ||
397 | + } | ||
398 | + | ||
399 | + | ||
400 | + }); | ||
401 | + | ||
402 | + //Show Error Message in case of gridview if no data is found | ||
403 | + if ($scope.searchCAListViewData.length == 0) { | ||
404 | + | ||
405 | + var $el = $('<div class="col-sm-12" style="padding-left:25px;padding-top:10px;"><strong style="color:white;">No animation found for the selected search criteria!</strong></div>').appendTo('#grid-view'); | ||
406 | + $compile($el)($scope); | ||
407 | + } | ||
408 | + | ||
409 | + }, | ||
410 | + function (error) { | ||
411 | + // handle errors here | ||
412 | + console.log(' $scope.AnimationData = ' + error.statusText); | ||
413 | + } | ||
414 | + ); | ||
415 | + | ||
416 | + } | ||
417 | + | ||
418 | + | ||
419 | + | ||
420 | + | ||
421 | + $scope.scroll = function () { | ||
422 | + $("html,body").scrollTop(0); | ||
423 | + } | ||
424 | + | ||
425 | + | ||
426 | + | ||
427 | + $scope.openView = function ($event) { | ||
428 | + $rootScope.disableAnnotationTBFn(); | ||
429 | + $rootScope.MenuModuleName = "CA"; | ||
430 | + //alert($rootScope.MenuModuleName); | ||
431 | + $rootScope.currentBodyViewId = $event.currentTarget.id; | ||
432 | + if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { | ||
433 | + var CITitle = []; | ||
434 | + CITitle = new jinqJs() | ||
435 | + .from($scope.selectedCAListViewData) | ||
436 | + .where('_id = ' + $event.currentTarget.id) | ||
437 | + .select('_Title'); | ||
438 | + | ||
439 | + //console.log(CITitle); | ||
440 | + //console.log($scope.selectedCAListViewData); | ||
441 | + | ||
442 | + $rootScope.ViewTitle = CITitle[0]._Title; | ||
443 | + } | ||
444 | + else { | ||
445 | + $rootScope.ViewTitle = $event.currentTarget.textContent; | ||
446 | + | ||
447 | + } | ||
448 | + | ||
449 | + | ||
450 | + localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle); | ||
451 | + localStorage.setItem("currentBodyViewId", $event.currentTarget.id); | ||
452 | + | ||
453 | + var u = $location.url(); | ||
454 | + $location.url('/clinical-animations-detail'); | ||
455 | + | ||
456 | + //console.log($location.url('/clinical-animations-detail')); | ||
457 | + | ||
458 | + } | ||
459 | + | ||
460 | + $scope.openBodyView = function () { | ||
461 | + | ||
462 | + if ($rootScope.disableAnnotationTB == true) | ||
463 | + { | ||
464 | + $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled'); | ||
465 | + $('#slider-range-min-2').slider('disable'); | ||
466 | + $("#annotationpaintbrushsize").attr('disabled', 'disabled'); | ||
467 | + //$("#annotationpaintbrushsize").attr("href", "#"); | ||
468 | + } | ||
469 | + $rootScope.isLoading = true; | ||
470 | + $('#spinner').css('visibility', 'visible'); | ||
471 | + $scope.voId = localStorage.getItem("currentBodyViewId"); | ||
472 | + | ||
473 | + // alert($scope.voId); | ||
474 | + | ||
475 | + | ||
476 | + //once you get id in scope push detail in jspanel content | ||
477 | + | ||
478 | + var openViews; | ||
479 | + if ($rootScope.openViews.length > 0) { | ||
480 | + openViews = new jinqJs() | ||
481 | + .from($rootScope.openViews) | ||
482 | + .where("BodyViewId==" + $scope.voId) | ||
483 | + .select(); | ||
484 | + } | ||
485 | + var counter = 1; | ||
486 | + var tittle = localStorage.getItem("currentViewTitleFromJson"); | ||
487 | + | ||
488 | + if (openViews != null && openViews.length > 0) { | ||
489 | + angular.forEach(openViews, function (value, key) { | ||
490 | + | ||
491 | + if (value.body - views == tittle) { | ||
492 | + tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; | ||
493 | + $rootScope.currentActiveViewTitle = tittle; | ||
494 | + localStorage.setItem("currentViewTitle", tittle); | ||
495 | + } | ||
496 | + | ||
497 | + }); | ||
498 | + } | ||
499 | + else { | ||
500 | + localStorage.setItem("currentViewTitle", tittle); | ||
501 | + | ||
502 | + } | ||
503 | + | ||
504 | + //alert(localStorage.getItem("currentViewTitle")); | ||
505 | + | ||
506 | + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist_mp4link.json') | ||
507 | + promise.then( | ||
508 | + function (result) { | ||
509 | + $scope.AnimationData = result; | ||
510 | + $scope.CAlistViewData = $scope.AnimationData.root.CAData; | ||
511 | + | ||
512 | + var clickedCAVideo = []; | ||
513 | + clickedCAVideo = new jinqJs() | ||
514 | + .from($scope.CAlistViewData) | ||
515 | + .where('_id == ' + $scope.voId) | ||
516 | + .select('_Video', '_LowerSummary', '_HostedFolderId'); | ||
517 | + | ||
518 | + $scope.clickedCAVideo = clickedCAVideo[0]._Video; | ||
519 | + $scope.clickedCASummary = clickedCAVideo[0]._LowerSummary; | ||
520 | + $scope.hostedFolderId = clickedCAVideo[0]._HostedFolderId; | ||
521 | + $scope.poster = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + ".jpg"; | ||
522 | + $scope.ad = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + "_ad.mp4"; | ||
523 | + $scope.HDVid = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + "_HD.mp4"; | ||
524 | + $scope.webm = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + ".webm"; | ||
525 | + $scope.ogv = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + ".ogv"; | ||
526 | + $scope.playerScript = "~/../libs/video_4_12_11/video_4_12_11.js"; | ||
527 | + //$scope.vtt = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + ".vtt" | ||
528 | + $scope.vtt = "~/../content/data/vtt/" + $scope.hostedFolderId + ".vtt"; | ||
529 | + console.log($scope.vtt); | ||
530 | + if ($scope.clickedCAVideo.length > 0 && $scope.clickedCASummary.length > 0) { | ||
531 | + | ||
532 | + $rootScope.isLoading = false; | ||
533 | + $('#spinner').css('visibility', 'hidden'); | ||
534 | + | ||
535 | + $.jsPanel({ | ||
536 | + id: 'caVideoPanel', | ||
537 | + selector: '.caView', | ||
538 | + theme: 'success', | ||
539 | + currentController: 'CAController', | ||
540 | + parentSlug: 'clinical-animations', | ||
541 | + content: '<script src="' + $scope.playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo").pause();$("#btnTxtOnOff").click(function(){$("#sid").toggle();if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");}else{$(this).text("Text Off");}});});</script><div id="pid" class="row"><div id="divplayerinlineVideo" class="col-sm-12" align="center" width="640" height="480"><video width="640" height="360"' + | ||
542 | + 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo"' + | ||
543 | + ' poster="' + $scope.poster + '"' + | ||
544 | + 'controls="true" preload="none" allowfullscreen="true" allowscriptaccess="always" ' + | ||
545 | + ' ad="' + $scope.ad + '"' + | ||
546 | + ' nonad="' + $scope.clickedCAVideo + '"' + | ||
547 | + ' hd="' + $scope.HDVid + '" ' + | ||
548 | + ' nonhd="' + $scope.clickedCAVideo + '">' + | ||
549 | + ' <source type="video/mp4" src="' + $scope.clickedCAVideo + '">' + | ||
550 | + ' <source type="video/webm" src="' + $scope.webm + '">' + | ||
551 | + ' <source type="video/ogv" src="' + $scope.ogv + '">' + | ||
552 | + ' <track src="' + $scope.vtt + '" ' + | ||
553 | + ' kind="captions" srclang="en" label="On"><object width="640" height="360"' + | ||
554 | + ' type="application/x-shockwave-flash" data="//vjs.zencdn.net/3.2/video-js.swf"><param name="allowfullscreen" value="true">' + | ||
555 | + ' <param name="allowscriptaccess" value="always"><param name="movie" value="//vjs.zencdn.net/3.2/video-js.swf">' + | ||
556 | + ' <param name="flashvars" ng-value="controls=true&file=' + $scope.clickedCAVideo + '"><img ng-src="content/images/common/player/frameaccuracy_logo.jpg" style="height:80%;" alt="Here we are" title="No video playback capabilities"></object></video><div class="col-sm-12 well video-subtitle"><div id="sid" align="left" style="height:40px;overflow-y:scroll !important"><p>' + $scope.clickedCASummary + '</p></div><button id="btnTxtOnOff" class="btn btn-primary pull-right">Text Off</button></div></div></div>', | ||
557 | + | ||
558 | + //ajax: { | ||
559 | + // url: 'app/views/ca/ca-view-detail.html' | ||
560 | + //}, | ||
561 | + title: localStorage.getItem("currentViewTitle"), | ||
562 | + position: { | ||
563 | + top: 70, | ||
564 | + left: 1, | ||
565 | + }, | ||
566 | + | ||
567 | + size: { width: $(window).outerWidth() - 10, height: $(window).outerHeight() - 110 }, | ||
568 | + | ||
569 | + }); | ||
570 | + | ||
571 | + | ||
572 | + $rootScope.currentSlug = 'clinical-animations-detail'; | ||
573 | + | ||
574 | + $rootScope.openViews.push( | ||
575 | + { | ||
576 | + "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | ||
577 | + "slug": $rootScope.currentSlug | ||
578 | + }); | ||
579 | + | ||
580 | + | ||
580 | var jspContentHeight = $('.jsPanel-content').height(); | 581 | var jspContentHeight = $('.jsPanel-content').height(); |
581 | var videoHeight = $('#divplayerinlineVideo div').height(); | 582 | var videoHeight = $('#divplayerinlineVideo div').height(); |
582 | if (videoHeight <= 0) | 583 | if (videoHeight <= 0) |
@@ -584,94 +585,94 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -584,94 +585,94 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
584 | var textH = $('.video-subtitle').height(); | 585 | var textH = $('.video-subtitle').height(); |
585 | textH = textH + 40; | 586 | textH = textH + 40; |
586 | var blackBorderHeight = jspContentHeight - (videoHeight + textH); | 587 | var blackBorderHeight = jspContentHeight - (videoHeight + textH); |
587 | - | 588 | + |
588 | if ($('.jsPanel-content').length > 0) { | 589 | if ($('.jsPanel-content').length > 0) { |
589 | - $('.video-subtitle').css('margin-bottom', blackBorderHeight); | 590 | + $('.video-subtitle').css('margin-bottom', blackBorderHeight); |
590 | $('#divplayerinlineVideo').css('background', '#fff'); | 591 | $('#divplayerinlineVideo').css('background', '#fff'); |
591 | - } | ||
592 | - | ||
593 | - } | ||
594 | - | ||
595 | - | ||
596 | - }, | ||
597 | - function (error) { | ||
598 | - // handle errors here | ||
599 | - console.log(' $scope.AnimationData = ' + error.statusText); | ||
600 | - } | ||
601 | - | ||
602 | - ); | ||
603 | - | ||
604 | - //console.log($rootScope.openViews); | ||
605 | - $('#CAView').css("height", $(window).outerHeight()); | ||
606 | - | ||
607 | - $('#CAView').css("width", $(window).outerWidth()); | ||
608 | - | ||
609 | - } | ||
610 | - | ||
611 | - $scope.loadCAPlayer = function (summary, link, vidNumber) { | ||
612 | - $scope.clickedCASummary = summary; | ||
613 | - $scope.clickedCAVideo = link; | ||
614 | - $scope.videoNumber = vidNumber; | ||
615 | - }; | ||
616 | - | ||
617 | - $scope.ReloadListViewImageDiv = function (id) { | ||
618 | - //console.log(id); | ||
619 | - $scope.idSelected = id; | ||
620 | - $scope.hiderow = true; | ||
621 | - | ||
622 | - var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | ||
623 | - promise.then( | ||
624 | - function (result) { | ||
625 | - $scope.AnimationData = result; | ||
626 | - //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | ||
627 | - | ||
628 | - var SelectedCAthumbImage = []; | ||
629 | - SelectedCAthumbImage = new jinqJs() | ||
630 | - .from($scope.AnimationData.root.CAData) | ||
631 | - .where('_id = ' + id) | ||
632 | - .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | ||
633 | - | ||
634 | - //console.log($scope.selectedCAListViewData); | ||
635 | - | ||
636 | - $scope.SelectedCAthumbImage = "~/../content/images/ca/thumbnails/" + SelectedCAthumbImage[0]._ThumbnailImage; | ||
637 | - | ||
638 | - $scope.SelectedCASummary = SelectedCAthumbImage[0]._Summary; | ||
639 | - $scope.SelectedCAId = SelectedCAthumbImage[0]._id; | ||
640 | - $scope.SelectedCATitle = SelectedCAthumbImage[0]._Title; | ||
641 | - | ||
642 | - //Set the scroll position of the tablebody to show selected row. | ||
643 | - | ||
644 | - var curCAListViewScroll = localStorage.getItem("CAListViewScroll"); | ||
645 | - if (typeof (curCAListViewScroll) !== "undefined" && curCAListViewScroll !== null && curCAListViewScroll !== '') { | ||
646 | - | ||
647 | - $('#ListViewDiv').scrollTop(localStorage.getItem("CAListViewScroll")); | ||
648 | - } | ||
649 | - //else { | ||
650 | - // $('#ListViewDiv').scrollTop(0); | ||
651 | - //} | ||
652 | - | ||
653 | - }, | ||
654 | - function (error) { | ||
655 | - // handle errors here | ||
656 | - console.log(' $scope.AnimationData = ' + error.statusText); | ||
657 | - } | ||
658 | - ); | ||
659 | - }; | ||
660 | - | ||
661 | - $scope.hideListViewDiv = function () { | ||
662 | - if (localStorage.getItem("currentCATabView") == 2) { | ||
663 | - localStorage.setItem("CASelectedRowId", ""); | ||
664 | - if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); } | ||
665 | - $scope.hiderow = false; | ||
666 | - } | ||
667 | - } | ||
668 | - | ||
669 | - | ||
670 | -}] | ||
671 | - | ||
672 | - | ||
673 | -); | ||
674 | - | ||
675 | - | ||
676 | - | ||
677 | - | 592 | + } |
593 | + | ||
594 | + } | ||
595 | + | ||
596 | + | ||
597 | + }, | ||
598 | + function (error) { | ||
599 | + // handle errors here | ||
600 | + console.log(' $scope.AnimationData = ' + error.statusText); | ||
601 | + } | ||
602 | + | ||
603 | + ); | ||
604 | + | ||
605 | + //console.log($rootScope.openViews); | ||
606 | + $('#CAView').css("height", $(window).outerHeight()); | ||
607 | + | ||
608 | + $('#CAView').css("width", $(window).outerWidth()); | ||
609 | + | ||
610 | + } | ||
611 | + | ||
612 | + $scope.loadCAPlayer = function (summary, link, vidNumber) { | ||
613 | + $scope.clickedCASummary = summary; | ||
614 | + $scope.clickedCAVideo = link; | ||
615 | + $scope.videoNumber = vidNumber; | ||
616 | + }; | ||
617 | + | ||
618 | + $scope.ReloadListViewImageDiv = function (id) { | ||
619 | + //console.log(id); | ||
620 | + $scope.idSelected = id; | ||
621 | + $scope.hiderow = true; | ||
622 | + | ||
623 | + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | ||
624 | + promise.then( | ||
625 | + function (result) { | ||
626 | + $scope.AnimationData = result; | ||
627 | + //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | ||
628 | + | ||
629 | + var SelectedCAthumbImage = []; | ||
630 | + SelectedCAthumbImage = new jinqJs() | ||
631 | + .from($scope.AnimationData.root.CAData) | ||
632 | + .where('_id = ' + id) | ||
633 | + .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | ||
634 | + | ||
635 | + //console.log($scope.selectedCAListViewData); | ||
636 | + | ||
637 | + $scope.SelectedCAthumbImage = "~/../content/images/ca/thumbnails/" + SelectedCAthumbImage[0]._ThumbnailImage; | ||
638 | + | ||
639 | + $scope.SelectedCASummary = SelectedCAthumbImage[0]._Summary; | ||
640 | + $scope.SelectedCAId = SelectedCAthumbImage[0]._id; | ||
641 | + $scope.SelectedCATitle = SelectedCAthumbImage[0]._Title; | ||
642 | + | ||
643 | + //Set the scroll position of the tablebody to show selected row. | ||
644 | + | ||
645 | + var curCAListViewScroll = localStorage.getItem("CAListViewScroll"); | ||
646 | + if (typeof (curCAListViewScroll) !== "undefined" && curCAListViewScroll !== null && curCAListViewScroll !== '') { | ||
647 | + | ||
648 | + $('#ListViewDiv').scrollTop(localStorage.getItem("CAListViewScroll")); | ||
649 | + } | ||
650 | + //else { | ||
651 | + // $('#ListViewDiv').scrollTop(0); | ||
652 | + //} | ||
653 | + | ||
654 | + }, | ||
655 | + function (error) { | ||
656 | + // handle errors here | ||
657 | + console.log(' $scope.AnimationData = ' + error.statusText); | ||
658 | + } | ||
659 | + ); | ||
660 | + }; | ||
661 | + | ||
662 | + $scope.hideListViewDiv = function () { | ||
663 | + if (localStorage.getItem("currentCATabView") == 2) { | ||
664 | + localStorage.setItem("CASelectedRowId", ""); | ||
665 | + if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); } | ||
666 | + $scope.hiderow = false; | ||
667 | + } | ||
668 | + } | ||
669 | + | ||
670 | + | ||
671 | +}] | ||
672 | + | ||
673 | + | ||
674 | +); | ||
675 | + | ||
676 | + | ||
677 | + | ||
678 | + |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
@@ -158,6 +158,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -158,6 +158,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
158 | }; | 158 | }; |
159 | 159 | ||
160 | $scope.loadAllCI = function () { | 160 | $scope.loadAllCI = function () { |
161 | + $('#grid-view').empty(); | ||
162 | + $("<div id='CISpinner' class='spinner'><img id='img-spinner' src='content/images/common/loading.gif' alt='Loading' /></div>").appendTo('#grid-view'); | ||
161 | $('#ciSpinner').css('visibility', 'visible'); | 163 | $('#ciSpinner').css('visibility', 'visible'); |
162 | $('#ciSpinner').css('zIndex', '20000'); | 164 | $('#ciSpinner').css('zIndex', '20000'); |
163 | var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | 165 | var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') |
@@ -174,7 +176,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -174,7 +176,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
174 | 176 | ||
175 | 177 | ||
176 | 178 | ||
177 | - $('#grid-view').empty(); | 179 | + |
180 | + | ||
178 | var $e1 = $('<ul><li ng-repeat="value in selectedCIListViewData" ><div id="{{value._id}}" class="col-sm-3 col-md-2" title = "{{value._Title}}" data-ng-click="openView($event)">' | 181 | var $e1 = $('<ul><li ng-repeat="value in selectedCIListViewData" ><div id="{{value._id}}" class="col-sm-3 col-md-2" title = "{{value._Title}}" data-ng-click="openView($event)">' |
179 | + '<div class="thumbnail" >' | 182 | + '<div class="thumbnail" >' |
180 | + '<img id="{{value._Title}}" ng-src="~/../content/images/ci/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >' | 183 | + '<img id="{{value._Title}}" ng-src="~/../content/images/ci/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >' |
@@ -198,7 +201,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -198,7 +201,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
198 | 201 | ||
199 | //}); | 202 | //}); |
200 | 203 | ||
201 | - $timeout(function () { $('#ciSpinner').css('visibility', 'hidden'); }, 300); | 204 | + // $timeout(function () { $('#ciSpinner').css('visibility', 'hidden'); }, 300); |
205 | + $('#CISpinner').remove(); | ||
202 | }, | 206 | }, |
203 | function (error) { | 207 | function (error) { |
204 | // handle errors here | 208 | // handle errors here |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -175,12 +175,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -175,12 +175,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
175 | //get the DA body view list based on selected gender | 175 | //get the DA body view list based on selected gender |
176 | $scope.getDAViewList = function ($event) { | 176 | $scope.getDAViewList = function ($event) { |
177 | 177 | ||
178 | - | 178 | + |
179 | if ($('#MainImage') != null) { | 179 | if ($('#MainImage') != null) { |
180 | $('#MainImage').remove(); | 180 | $('#MainImage').remove(); |
181 | } | 181 | } |
182 | // $rootScope.currentActiveModuleTitle = Modules[0].Name; | 182 | // $rootScope.currentActiveModuleTitle = Modules[0].Name; |
183 | $("#bodyViewList").empty(); | 183 | $("#bodyViewList").empty(); |
184 | + $("<div id='DASpinner' class='spinner'><img id='img-spinner' src='content/images/common/loading.gif' alt='Loading' /></div>").appendTo('#bodyViewList'); | ||
184 | //for default load | 185 | //for default load |
185 | if ($event == null || $event == undefined) { | 186 | if ($event == null || $event == undefined) { |
186 | //if ((localStorage.getItem("genderId") != "")||(localStorage.getItem("genderId")!="null")) { | 187 | //if ((localStorage.getItem("genderId") != "")||(localStorage.getItem("genderId")!="null")) { |
@@ -262,6 +263,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -262,6 +263,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
262 | 263 | ||
263 | 264 | ||
264 | $compile($el)($scope); | 265 | $compile($el)($scope); |
266 | + | ||
267 | + $("#DASpinner").remove(); | ||
268 | + | ||
265 | $(".sidebar").mCustomScrollbar({ | 269 | $(".sidebar").mCustomScrollbar({ |
266 | autoHideScrollbar: true, | 270 | autoHideScrollbar: true, |
267 | //theme:"rounded" | 271 | //theme:"rounded" |
400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
@@ -13,7 +13,9 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | @@ -13,7 +13,9 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | ||
13 | $scope.dragableId = ""; | 13 | $scope.dragableId = ""; |
14 | $scope.blReviewAttempt = false; | 14 | $scope.blReviewAttempt = false; |
15 | $scope.$on('$viewContentLoaded', function (event) { | 15 | $scope.$on('$viewContentLoaded', function (event) { |
16 | - // code that will be executed ... | 16 | + |
17 | + $("#LabExSpinner").fadeOut('slow'); | ||
18 | + //code that will be executed ... | ||
17 | // every time this view is loaded | 19 | // every time this view is loaded |
18 | 20 | ||
19 | //get current path | 21 | //get current path |
@@ -25,7 +27,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | @@ -25,7 +27,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | ||
25 | selectedModuleName = value.name; | 27 | selectedModuleName = value.name; |
26 | } | 28 | } |
27 | $rootScope.currentActiveModuleTitle = selectedModuleName; | 29 | $rootScope.currentActiveModuleTitle = selectedModuleName; |
28 | - }) | 30 | + }); |
29 | 31 | ||
30 | $scope.showTabButton = false; | 32 | $scope.showTabButton = false; |
31 | $rootScope.currentActiveModuleTitle = pages[8].name; | 33 | $rootScope.currentActiveModuleTitle = pages[8].name; |
400-SOURCECODE/AIAHTML5.Web/app/controllers/LinkController.js
@@ -19,8 +19,7 @@ function ($scope, $rootScope, log, pages, $routeParams) { | @@ -19,8 +19,7 @@ function ($scope, $rootScope, log, pages, $routeParams) { | ||
19 | $scope.$on('$viewContentLoaded', function (event) { | 19 | $scope.$on('$viewContentLoaded', function (event) { |
20 | // code that will be executed ... | 20 | // code that will be executed ... |
21 | // every time this view is loaded | 21 | // every time this view is loaded |
22 | - | ||
23 | - | 22 | + |
24 | for (var i = 0; i < $scope.links.length; i++) { | 23 | for (var i = 0; i < $scope.links.length; i++) { |
25 | if ($scope.links[i].modname == $routeParams.modname) { | 24 | if ($scope.links[i].modname == $routeParams.modname) { |
26 | $rootScope.currentActiveModuleTitle = $scope.links[i].title; | 25 | $rootScope.currentActiveModuleTitle = $scope.links[i].title; |
@@ -31,8 +30,17 @@ function ($scope, $rootScope, log, pages, $routeParams) { | @@ -31,8 +30,17 @@ function ($scope, $rootScope, log, pages, $routeParams) { | ||
31 | } | 30 | } |
32 | $scope.objdata = $scope.links[i].objurl; | 31 | $scope.objdata = $scope.links[i].objurl; |
33 | $scope.myObj = $scope.links[i].objstyle; | 32 | $scope.myObj = $scope.links[i].objstyle; |
34 | - } | ||
35 | - } | 33 | + } |
34 | + | ||
35 | + | ||
36 | + } | ||
37 | + | ||
38 | + | ||
39 | + $("#siteloaderSpinner").fadeOut(5000); | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | + | ||
36 | }); | 44 | }); |
37 | 45 | ||
38 | $scope.showTabButton = false; | 46 | $scope.showTabButton = false; |
@@ -46,6 +54,7 @@ function ($scope, $rootScope, log, pages, $routeParams) { | @@ -46,6 +54,7 @@ function ($scope, $rootScope, log, pages, $routeParams) { | ||
46 | $("html,body").scrollTop(0); | 54 | $("html,body").scrollTop(0); |
47 | //alert("scroll"); | 55 | //alert("scroll"); |
48 | } | 56 | } |
57 | + | ||
49 | }] | 58 | }] |
50 | 59 | ||
51 | 60 |
400-SOURCECODE/AIAHTML5.Web/app/views/ADAMImg/ADAMImg-view.html
@@ -52,6 +52,7 @@ | @@ -52,6 +52,7 @@ | ||
52 | </div> | 52 | </div> |
53 | <div class="row tab-content" style="padding-left:25px; width:99%"> | 53 | <div class="row tab-content" style="padding-left:25px; width:99%"> |
54 | <div role="tabpanel" class="tab-pane active" id="grid-view"> | 54 | <div role="tabpanel" class="tab-pane active" id="grid-view"> |
55 | + <div id='ADAMIMGSpinner' class='spinner'><img id='img-spinner' src='content/images/common/loading.gif' alt='Loading' /></div> | ||
55 | <div class="col-sm-3 col-lg-2"> | 56 | <div class="col-sm-3 col-lg-2"> |
56 | <div class="thumbnail"> | 57 | <div class="thumbnail"> |
57 | <a href="clinical-animations-details.html"> | 58 | <a href="clinical-animations-details.html"> |
400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view.html
1 | <div class="bodyWrap row "> | 1 | <div class="bodyWrap row "> |
2 | <div ng-include="'app/widget/MainMenu.html'" /> | 2 | <div ng-include="'app/widget/MainMenu.html'" /> |
3 | <div class="main"> | 3 | <div class="main"> |
4 | - | 4 | + <div id='AODSpinner' class='spinner'><img id='img-spinner' src='content/images/common/loading.gif' alt='Loading' /></div> |
5 | 5 | ||
6 | <div class="row tab-content" style="padding-left:25px; width:99%"> | 6 | <div class="row tab-content" style="padding-left:25px; width:99%"> |
7 | <div role="tabpanel" ng-class="{'tab-pane active' : activeTab === 1,'tab-pane' : activeTab !==1 }" id="grid-view"> | 7 | <div role="tabpanel" ng-class="{'tab-pane active' : activeTab === 1,'tab-pane' : activeTab !==1 }" id="grid-view"> |
400-SOURCECODE/AIAHTML5.Web/app/views/AnatTest/AnatTest-view.html
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <div ng-include="'app/widget/MainMenu.html'" /> | 2 | <div ng-include="'app/widget/MainMenu.html'" /> |
3 | <div class="main mCustomScrollbar _mCS_1 mCS-autoHide"> | 3 | <div class="main mCustomScrollbar _mCS_1 mCS-autoHide"> |
4 | 4 | ||
5 | - | 5 | + <div id='AnatTestSpinner' class='spinner'><img id='img-spinner' src='content/images/common/loading.gif' alt='Loading' /></div> |
6 | <div class="col-sm-12"> | 6 | <div class="col-sm-12"> |
7 | <div class="col-sm-3 col-lg-2"> | 7 | <div class="col-sm-3 col-lg-2"> |
8 | <div class="thumbnail"> | 8 | <div class="thumbnail"> |
400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/LabExerc-view.html
1 | <div class="bodyWrap row " ng-controller="LabExercController"> | 1 | <div class="bodyWrap row " ng-controller="LabExercController"> |
2 | <div ng-include="'app/widget/MainMenu.html'" /> | 2 | <div ng-include="'app/widget/MainMenu.html'" /> |
3 | <div class="main"> | 3 | <div class="main"> |
4 | - | 4 | + <div id='LabExSpinner' class='spinner'><img id='img-spinner' src='content/images/common/loading.gif' alt='Loading' /></div> |
5 | + | ||
5 | 6 | ||
6 | <div class="col-sm-12"> | 7 | <div class="col-sm-12"> |
7 | <div class="col-sm-3 col-lg-2" ng-repeat="labExerciseTitle in LabExerciseModules1.LabExercise"> | 8 | <div class="col-sm-3 col-lg-2" ng-repeat="labExerciseTitle in LabExerciseModules1.LabExercise"> |
400-SOURCECODE/AIAHTML5.Web/app/views/Link/Link-view.html
1 | <div class="bodyWrap row "> | 1 | <div class="bodyWrap row "> |
2 | <div ng-include="'app/widget/MainMenu.html'" /> | 2 | <div ng-include="'app/widget/MainMenu.html'" /> |
3 | <div class="main" style="min-height:750px;"> | 3 | <div class="main" style="min-height:750px;"> |
4 | + | ||
4 | <div id="siteloader" class="col-sm-12"> | 5 | <div id="siteloader" class="col-sm-12"> |
6 | + <div id='siteloaderSpinner' class='spinner'><img id='img-spinner' src='content/images/common/loading.gif' alt='Loading' /></div> | ||
5 | <!--<object style="width:100%; height:100%" type="text/html" data={{objdata}}></object>--> | 7 | <!--<object style="width:100%; height:100%" type="text/html" data={{objdata}}></object>--> |
6 | <object id="externalLink" ng-style="myObj" type="text/html" data={{objdata}}></object> | 8 | <object id="externalLink" ng-style="myObj" type="text/html" data={{objdata}}></object> |
7 | </div> | 9 | </div> |
@@ -10,6 +12,7 @@ | @@ -10,6 +12,7 @@ | ||
10 | 12 | ||
11 | <script> | 13 | <script> |
12 | $(document).ready(function () { | 14 | $(document).ready(function () { |
15 | + | ||
13 | var myEventMethod = null; | 16 | var myEventMethod = null; |
14 | var myEventListener = null; | 17 | var myEventListener = null; |
15 | var myEventMessage = null; | 18 | var myEventMessage = null; |