Commit 894c2d1901331222f77125d0316ea87aef7d2f22
1 parent
8e1e83a4
CA partailly updated
Showing
3 changed files
with
806 additions
and
577 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... | ... | @@ -7,7 +7,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
7 | 7 | $scope.CAAllBodySystem = []; |
8 | 8 | $scope.CAAllSpeciality = []; |
9 | 9 | $scope.selectedCAListViewData = []; |
10 | - $scope.searchCAListViewData = []; | |
10 | + // $scope.searchCAListViewData = []; | |
11 | 11 | $scope.SelectedCAthumbImage = []; |
12 | 12 | $scope.SelectedCAImage = []; |
13 | 13 | $scope.SelectedCASummary = []; |
... | ... | @@ -41,13 +41,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
41 | 41 | 'AnimationData': [], |
42 | 42 | 'searchCAListViewData': [], |
43 | 43 | 'CAImagePath': '', |
44 | - 'ImageSummary': '', | |
44 | + // 'LowerSummary': '', | |
45 | 45 | 'moduleName': '', |
46 | 46 | 'currentViewTitle': '', |
47 | 47 | 'parentSlugName': '', |
48 | 48 | 'currentSlug': '', |
49 | 49 | 'imageId': '', |
50 | 50 | 'imageName': '', |
51 | + 'clickedCAVideo': '', | |
52 | + 'clickedCASummary': '', | |
53 | + 'hostedFolderId': '', | |
51 | 54 | 'isShowBodyWithCBData': false |
52 | 55 | }); |
53 | 56 | |
... | ... | @@ -68,13 +71,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
68 | 71 | 'AnimationData': [], |
69 | 72 | 'searchCAListViewData': [], |
70 | 73 | 'CAImagePath': '', |
71 | - 'ImageSummary': '', | |
74 | + // 'LowerSummary': '', | |
72 | 75 | 'moduleName': '', |
73 | 76 | 'currentViewTitle': '', |
74 | 77 | 'parentSlugName': '', |
75 | 78 | 'currentSlug': '', |
76 | 79 | 'imageId': '', |
77 | 80 | 'imageName': '', |
81 | + 'clickedCAVideo': '', | |
82 | + 'clickedCASummary': '', | |
83 | + 'hostedFolderId': '', | |
78 | 84 | 'isShowBodyWithCBData': false |
79 | 85 | }); |
80 | 86 | |
... | ... | @@ -256,7 +262,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
256 | 262 | |
257 | 263 | $scope.SetCAwindowStoreData(windowviewid, 'AnimationData', AnimationData); |
258 | 264 | |
259 | - $scope.selectedCAListViewData = IllustrationData; | |
265 | + $scope.selectedCAListViewData = AnimationData; | |
260 | 266 | |
261 | 267 | |
262 | 268 | }, |
... | ... | @@ -272,7 +278,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
272 | 278 | |
273 | 279 | $scope.loadAllCA = function (windowviewid) { |
274 | 280 | |
275 | - $scope.selectedCAListViewData = $scope.GetCIwindowStoreData(windowviewid, 'AnimationData'); | |
281 | + $scope.selectedCAListViewData = $scope.GetCAwindowStoreData(windowviewid, 'AnimationData'); | |
276 | 282 | |
277 | 283 | $('#grid-view').empty(); |
278 | 284 | |
... | ... | @@ -312,8 +318,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
312 | 318 | |
313 | 319 | } |
314 | 320 | |
315 | - $scope.showItem = function (id) { | |
316 | - //console.log(id); | |
321 | + $scope.showItem = function (id, windowviewid) { | |
322 | + if (windowviewid == undefined) | |
323 | + windowviewid = $rootScope.MULTI_VIEW_ID; | |
324 | + | |
317 | 325 | $scope.idSelected = id; |
318 | 326 | localStorage.setItem("CASelectedRowId", id); |
319 | 327 | |
... | ... | @@ -338,24 +346,71 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
338 | 346 | |
339 | 347 | } |
340 | 348 | else { |
341 | - if ($scope.searchCAListViewData.length > 0) { | |
349 | + | |
350 | + var searchCAListViewData = $scope.GetCAwindowStoreData(windowviewid, 'searchCAListViewData'); | |
351 | + | |
352 | + if (searchCAListViewData.length > 0) { | |
342 | 353 | |
343 | 354 | var SelectedCAthumbImage = []; |
344 | 355 | SelectedCAthumbImage = new jinqJs() |
345 | - .from($scope.searchCAListViewData) | |
356 | + .from(searchCAListViewData) | |
346 | 357 | .where('_id = ' + id) |
347 | 358 | .select('_ThumbnailImage', '_Summary', '_id', '_Title'); |
348 | 359 | |
349 | 360 | $scope.SelectedCAthumbImage = "~/../content/images/ca/thumbnails/" + SelectedCAthumbImage[0]._ThumbnailImage; |
350 | - | |
351 | 361 | $scope.SelectedCASummary = SelectedCAthumbImage[0]._Summary; |
352 | 362 | $scope.SelectedCAId = SelectedCAthumbImage[0]._id; |
353 | 363 | $scope.SelectedCATitle = SelectedCAthumbImage[0]._Title; |
364 | + | |
365 | + } | |
366 | + | |
367 | + } | |
368 | + | |
369 | + | |
370 | + | |
371 | + | |
372 | + $scope.hiderow = true; | |
373 | + if ($scope.filterstring == false) { | |
374 | + | |
375 | + var SelectedCIthumbImage = []; | |
376 | + SelectedCIthumbImage = new jinqJs() | |
377 | + .from($scope.selectedCIListViewData) | |
378 | + .where('_id = ' + id) | |
379 | + .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | |
380 | + | |
381 | + $scope.SelectedCIthumbImage = "~/../content/images/ci/thumbnails/" + SelectedCIthumbImage[0]._ThumbnailImage; | |
382 | + $scope.SelectedCISummary = SelectedCIthumbImage[0]._Summary; | |
383 | + $scope.SelectedCIId = SelectedCIthumbImage[0]._id; | |
384 | + $scope.SelectedCITitle = SelectedCIthumbImage[0]._Title; | |
385 | + | |
386 | + } | |
387 | + else { | |
388 | + var searchCIListViewData = $scope.GetCAwindowStoreData(windowviewid, 'searchCIListViewData'); | |
389 | + | |
390 | + if (searchCIListViewData.length > 0) { | |
391 | + | |
392 | + var SelectedCIthumbImage = []; | |
393 | + SelectedCIthumbImage = new jinqJs() | |
394 | + .from(searchCIListViewData) | |
395 | + .where('_id = ' + id) | |
396 | + .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | |
397 | + | |
398 | + $scope.SelectedCIthumbImage = "~/../content/images/ci/thumbnails/" + SelectedCIthumbImage[0]._ThumbnailImage; | |
399 | + $scope.SelectedCISummary = SelectedCIthumbImage[0]._Summary; | |
400 | + $scope.SelectedCIId = SelectedCIthumbImage[0]._id; | |
401 | + $scope.SelectedCITitle = SelectedCIthumbImage[0]._Title; | |
402 | + | |
354 | 403 | } |
355 | 404 | } |
405 | + | |
356 | 406 | }; |
357 | 407 | |
358 | - $scope.Reset = function (query) { | |
408 | + $scope.Reset = function (query, windowviewid) { | |
409 | + | |
410 | + if (windowviewid == undefined) // call from also home controller list manager | |
411 | + windowviewid = $rootScope.MULTI_VIEW_ID; | |
412 | + | |
413 | + $scope.DisableUI(); | |
359 | 414 | |
360 | 415 | query.selectedbodyregion = ""; |
361 | 416 | query.selectedbodysystem = ""; |
... | ... | @@ -376,30 +431,37 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
376 | 431 | |
377 | 432 | $scope.hideListViewDiv(); |
378 | 433 | |
434 | + $scope.SetCAwindowStoreData(windowviewid, 'searchCAListViewData', []); | |
379 | 435 | |
380 | - while ($scope.searchCAListViewData.length) { | |
381 | - $scope.searchCAListViewData.pop(); | |
382 | - } | |
436 | + //while ($scope.searchCAListViewData.length) { | |
437 | + // $scope.searchCAListViewData.pop(); | |
438 | + //} | |
383 | 439 | |
384 | 440 | if ($rootScope.getLocalStorageValue("currentCATabView") == 2) { |
385 | 441 | localStorage.setItem("CASelectedRowId", ""); |
386 | 442 | $scope.hiderow = false; |
387 | 443 | } |
388 | 444 | |
389 | - $scope.loadAllCA(); | |
445 | + $scope.loadAllCA(windowviewid); | |
390 | 446 | |
391 | 447 | } |
392 | 448 | |
393 | 449 | // 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. |
394 | - $scope.ApplySearch = function (query) { | |
450 | + $scope.ApplySearch = function (query, windowviewid) { | |
451 | + | |
452 | + if (windowviewid == undefined) { | |
453 | + windowviewid = $rootScope.MULTI_VIEW_ID; | |
454 | + } | |
455 | + | |
456 | + $scope.DisableUI(); | |
395 | 457 | |
396 | 458 | $scope.filterstring = true; |
397 | 459 | |
398 | - while ($scope.searchCAListViewData.length) { | |
399 | - $scope.searchCAListViewData.pop(); | |
400 | - } | |
460 | + //while ($scope.searchCAListViewData.length) { | |
461 | + // $scope.searchCAListViewData.pop(); | |
462 | + //} | |
401 | 463 | |
402 | - //$('#grid-view').empty(); | |
464 | + $scope.SetCAwindowStoreData(windowviewid, 'searchCAListViewData', []); | |
403 | 465 | |
404 | 466 | filtercount = 0; |
405 | 467 | if (typeof (query.selectedbodyregion) !== "undefined" && query.selectedbodyregion !== null && query.selectedbodyregion !== "") { |
... | ... | @@ -426,121 +488,108 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
426 | 488 | localStorage.setItem("CACurSpeciality", ''); |
427 | 489 | } |
428 | 490 | |
429 | - var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | |
430 | - promise.then( | |
431 | - function (result) { | |
432 | - $scope.AnimationData = result; | |
433 | - //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | |
434 | - | |
435 | - $scope.selectedCAListViewData = new jinqJs() | |
436 | - .from($scope.AnimationData.root.CAData) | |
437 | - .orderBy([{ field: '_Title', sort: 'asc' }]) | |
438 | - .select(); | |
439 | 491 | |
440 | - //console.log($scope.selectedCAListViewData); | |
441 | 492 | |
442 | - $('#grid-view').empty(); | |
493 | + $scope.selectedCAListViewData = $scope.GetCAwindowStoreData(windowviewid, 'AnimationData'); | |
443 | 494 | |
444 | - angular.forEach($scope.selectedCAListViewData, function (value, key) { | |
495 | + $('#grid-view').empty(); | |
496 | + var calistviewdata = []; | |
445 | 497 | |
446 | - var selectimg = true; | |
447 | - var count = 0; | |
498 | + angular.forEach($scope.selectedCAListViewData, function (value, key) { | |
448 | 499 | |
500 | + var selectimg = true; | |
501 | + var count = 0; | |
449 | 502 | |
450 | - if (typeof (query.selectedbodyregion) !== "undefined" && query.selectedbodyregion !== null && query.selectedbodyregion !== "") { | |
451 | - var posbodyregion = value._BodyRegion.indexOf((query.selectedbodyregion.trim())); | |
452 | - if (posbodyregion > -1) { | |
453 | - selectimg = true; | |
454 | - count = count + 1; | |
455 | 503 | |
456 | - } | |
457 | - else { | |
458 | - selectimg = false; | |
459 | - count = count - 1; | |
460 | - } | |
504 | + if (typeof (query.selectedbodyregion) !== "undefined" && query.selectedbodyregion !== null && query.selectedbodyregion !== "") { | |
505 | + var posbodyregion = value._BodyRegion.indexOf((query.selectedbodyregion.trim())); | |
506 | + if (posbodyregion > -1) { | |
507 | + selectimg = true; | |
508 | + count = count + 1; | |
461 | 509 | |
462 | - } | |
510 | + } | |
511 | + else { | |
512 | + selectimg = false; | |
513 | + count = count - 1; | |
514 | + } | |
463 | 515 | |
464 | - if (typeof (query.selectedbodysystem) !== "undefined" && query.selectedbodysystem !== null && query.selectedbodysystem !== "") { | |
465 | - var posbodysystem = value._BodySystem.indexOf(query.selectedbodysystem); | |
466 | - if (posbodysystem > -1) { | |
467 | - count = count + 1; | |
468 | - selectimg = true; | |
469 | - } else { | |
470 | - selectimg = false; | |
471 | - count = count - 1; | |
472 | - } | |
473 | - } | |
474 | - | |
475 | - if (typeof (query.selectedspecialty) !== "undefined" && query.selectedspecialty !== null && query.selectedspecialty !== "") { | |
476 | - var posspeciality = value._MedicalSpecialty.indexOf(query.selectedspecialty); | |
477 | - if (posspeciality > -1) { | |
478 | - count = count + 1; | |
479 | - selectimg = true; | |
480 | - } else { | |
481 | - selectimg = false; | |
482 | - count = count - 1; | |
483 | - } | |
516 | + } | |
484 | 517 | |
485 | - } | |
518 | + if (typeof (query.selectedbodysystem) !== "undefined" && query.selectedbodysystem !== null && query.selectedbodysystem !== "") { | |
519 | + var posbodysystem = value._BodySystem.indexOf(query.selectedbodysystem); | |
520 | + if (posbodysystem > -1) { | |
521 | + count = count + 1; | |
522 | + selectimg = true; | |
523 | + } else { | |
524 | + selectimg = false; | |
525 | + count = count - 1; | |
526 | + } | |
527 | + } | |
486 | 528 | |
487 | - if (selectimg === true && count >= filtercount) { | |
529 | + if (typeof (query.selectedspecialty) !== "undefined" && query.selectedspecialty !== null && query.selectedspecialty !== "") { | |
530 | + var posspeciality = value._MedicalSpecialty.indexOf(query.selectedspecialty); | |
531 | + if (posspeciality > -1) { | |
532 | + count = count + 1; | |
533 | + selectimg = true; | |
534 | + } else { | |
535 | + selectimg = false; | |
536 | + count = count - 1; | |
537 | + } | |
488 | 538 | |
539 | + } | |
489 | 540 | |
490 | - $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; | |
541 | + if (selectimg === true && count >= filtercount) { | |
491 | 542 | |
492 | - var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | |
493 | - + '<div class="thumbnail" >' | |
494 | - + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
495 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
496 | 543 | |
544 | + $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; | |
497 | 545 | |
498 | - $compile($el)($scope); | |
546 | + var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | |
547 | + + '<div class="thumbnail" >' | |
548 | + + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
549 | + + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
499 | 550 | |
500 | - $(".sidebar").mCustomScrollbar({ | |
501 | - autoHideScrollbar: true, | |
502 | - //theme:"rounded" | |
503 | - }); | |
504 | 551 | |
552 | + $compile($el)($scope); | |
505 | 553 | |
506 | - $scope.searchCAListViewData.push( | |
507 | - { | |
508 | - "_id": value._id, | |
509 | - "_ImageId": value._ImageId, | |
510 | - "_Title": value._Title, | |
511 | - "_Video": value._Video, | |
512 | - "_ThumbnailImage": value._ThumbnailImage, | |
513 | - "_BodySystem": value._BodySystem, | |
514 | - "_BodyRegion": value._BodyRegion, | |
515 | - "_MedicalSpecialty": value._MedicalSpecialty, | |
516 | - "_Summary": value._Summary, | |
517 | - "_LowerSummary": value._LowerSummary | |
518 | - }); | |
554 | + $(".sidebar").mCustomScrollbar({ | |
555 | + autoHideScrollbar: true, | |
556 | + //theme:"rounded" | |
557 | + }); | |
519 | 558 | |
520 | - } | |
521 | 559 | |
560 | + $scope.searchCAListViewData.push( | |
561 | + { | |
562 | + "_id": value._id, | |
563 | + "_ImageId": value._ImageId, | |
564 | + "_Title": value._Title, | |
565 | + "_Video": value._Video, | |
566 | + "_ThumbnailImage": value._ThumbnailImage, | |
567 | + "_BodySystem": value._BodySystem, | |
568 | + "_BodyRegion": value._BodyRegion, | |
569 | + "_MedicalSpecialty": value._MedicalSpecialty, | |
570 | + "_Summary": value._Summary, | |
571 | + "_LowerSummary": value._LowerSummary | |
572 | + }); | |
522 | 573 | |
523 | - }); | |
524 | - $('table > #ListViewDiv > #searchAnimation').remove(); | |
525 | - //Show Error Message in case of gridview if no data is found | |
526 | - if ($scope.searchCAListViewData.length == 0) { | |
527 | - 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'); | |
528 | - $compile($el)($scope); | |
529 | - $('table > #ListViewDiv > #searchAnimation').remove(); | |
530 | - $('#ListViewDiv').append('<tr id="searchAnimation"><td colspan="3"><strong style="color:black;">No animation found for the selected search criteria!</strong></td></tr>'); | |
531 | - } | |
574 | + } | |
532 | 575 | |
533 | - }, | |
534 | - function (error) { | |
535 | - // handle errors here | |
536 | - console.log(' $scope.AnimationData = ' + error.statusText); | |
537 | - } | |
538 | - ); | |
539 | 576 | |
540 | - } | |
577 | + }); | |
541 | 578 | |
579 | + $('table > #ListViewDiv > #searchAnimation').remove(); | |
580 | + $scope.SetCAwindowStoreData(windowviewid, 'searchCAListViewData', calistviewdata); | |
542 | 581 | |
582 | + $scope.searchCAListViewData = calistviewdata; | |
583 | + //Show Error Message in case of gridview if no data is found | |
584 | + if ($scope.searchCAListViewData.length == 0) { | |
585 | + 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'); | |
586 | + $compile($el)($scope); | |
587 | + $('table > #ListViewDiv > #searchAnimation').remove(); | |
588 | + $('#ListViewDiv').append('<tr id="searchAnimation"><td colspan="3"><strong style="color:black;">No animation found for the selected search criteria!</strong></td></tr>'); | |
589 | + } | |
543 | 590 | |
591 | + $timeout(function () { $scope.EnableUI(); }, 500); | |
592 | + } | |
544 | 593 | |
545 | 594 | $scope.scroll = function () { |
546 | 595 | $("html,body").scrollTop(0); |
... | ... | @@ -549,40 +598,206 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
549 | 598 | |
550 | 599 | |
551 | 600 | $scope.openView = function ($event) { |
601 | + var windowviewid = $rootScope.MULTI_VIEW_ID; | |
602 | + | |
552 | 603 | $rootScope.disableAnnotationTBFn(); |
553 | 604 | $rootScope.MenuModuleName = "CA"; |
554 | 605 | //alert($rootScope.MenuModuleName); |
555 | 606 | $rootScope.currentBodyViewId = $event.currentTarget.id; |
556 | 607 | if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { |
557 | - var CITitle = []; | |
558 | - CITitle = new jinqJs() | |
608 | + var selectedTileData = []; | |
609 | + selectedTileData = new jinqJs() | |
559 | 610 | .from($scope.selectedCAListViewData) |
560 | 611 | .where('_id = ' + $event.currentTarget.id) |
561 | - .select('_Title'); | |
612 | + .select(); | |
562 | 613 | |
563 | - //console.log(CITitle); | |
564 | - //console.log($scope.selectedCAListViewData); | |
565 | - | |
566 | - $rootScope.ViewTitle = CITitle[0]._Title; | |
614 | + $rootScope.ViewTitle = selectedTileData[0]._Title; | |
567 | 615 | } |
568 | 616 | else { |
569 | 617 | $rootScope.ViewTitle = $event.currentTarget.textContent; |
570 | 618 | |
571 | 619 | } |
572 | 620 | |
573 | - | |
574 | - localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle); | |
621 | + localStorage.setItem("currentViewTitle", $rootScope.ViewTitle); | |
575 | 622 | localStorage.setItem("currentBodyViewId", $event.currentTarget.id); |
576 | - var CAGridViewScrollPosition = $($window).scrollTop(); | |
577 | - localStorage.setItem('CAGridViewScroll', CAGridViewScrollPosition); | |
578 | - var u = $location.url(); | |
579 | - $location.url('/clinical-animations-detail'); | |
580 | 623 | |
581 | - //console.log($location.url('/clinical-animations-detail')); | |
624 | + $scope.SetCAwindowStoreData(windowviewid, 'currentViewTitle', $rootScope.ViewTitle); | |
625 | + $scope.SetCAwindowStoreData(windowviewid, 'imageId', $event.currentTarget.id); | |
626 | + | |
627 | + /// var imageName = selectedTileData[0]._ThumbnailImage; | |
628 | + | |
629 | + // $scope.SetCAwindowStoreData(windowviewid, 'imageName', imageName); | |
630 | + | |
631 | + // var imagePath = "~/../content/images/ca/thumbnails/" + imageName; | |
632 | + | |
633 | + // $scope.SetCAwindowStoreData(windowviewid, 'CAImagePath', imagePath); | |
634 | + | |
635 | + // var selectedImageCALowerSummary = selectedTileData[0]._LowerSummary | |
636 | + | |
637 | + // $scope.SetCAwindowStoreData(windowviewid, 'LowerSummary', selectedImageCALowerSummary); | |
638 | + | |
639 | + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist_mp4link.json') | |
640 | + promise.then( | |
641 | + function (result) { | |
642 | + // $scope.AnimationData = result; | |
643 | + $scope.CAlistViewData = result.root.CAData; | |
644 | + var id = $scope.GetCAwindowStoreData(windowviewid, 'imageId'); | |
645 | + var clickedCAVideoData = []; | |
646 | + clickedCAVideoData = new jinqJs() | |
647 | + .from($scope.CAlistViewData) | |
648 | + .where('_id == ' + id) | |
649 | + .select('_Video', '_LowerSummary', '_HostedFolderId'); | |
650 | + | |
651 | + var clickedCAVideo = clickedCAVideoData[0]._Video; | |
652 | + var clickedCASummary = clickedCAVideoData[0]._LowerSummary; | |
653 | + var hostedFolderId = clickedCAVideoData[0]._HostedFolderId; | |
654 | + | |
655 | + $scope.SetCAwindowStoreData(windowviewid, 'clickedCAVideo', clickedCAVideo); | |
656 | + $scope.SetCAwindowStoreData(windowviewid, 'clickedCASummary', clickedCASummary); | |
657 | + $scope.SetCAwindowStoreData(windowviewid, 'hostedFolderId', hostedFolderId); | |
658 | + | |
659 | + var CAGridViewScrollPosition = $($window).scrollTop(); | |
660 | + localStorage.setItem('CAGridViewScroll', CAGridViewScrollPosition); | |
661 | + var u = $location.url(); | |
662 | + $location.url('/clinical-animations-detail'); | |
663 | + | |
664 | + }, | |
665 | + function (error) { | |
666 | + // handle errors here | |
667 | + console.log(' $scope.AnimationData = ' + error.statusText); | |
668 | + } | |
669 | + | |
670 | + ); | |
671 | + | |
672 | + | |
673 | + | |
674 | + } | |
675 | + | |
676 | + $scope.openBodyViewMain = function () { | |
677 | + | |
678 | + if ($rootScope.isCallFromOtherModule) { | |
679 | + $scope.CAModuleData = ModuleService.getModuleData("CLINICAL_ANIMATIONS"); | |
680 | + $scope.readyToLoad = true; | |
681 | + $rootScope.CAWindowLoadComplete = false; | |
682 | + $scope.wincount = 1; | |
683 | + var winlen = $scope.CAModuleData.length; | |
684 | + var timeint = null; | |
685 | + var slideId = ""; | |
686 | + timeint = $interval(function () { | |
687 | + | |
688 | + if ($scope.readyToLoad == true) { | |
689 | + var windata = $scope.CAModuleData[$scope.wincount - 1]; | |
690 | + slideId = windata.slideId; | |
691 | + $scope.openBodyView(windata); | |
692 | + | |
693 | + } | |
694 | + $scope.readyToLoad = false; | |
695 | + if ($scope.wincount < winlen && $rootScope.CAWindowLoadComplete == true) { | |
696 | + $scope.wincount = $scope.wincount + 1; | |
697 | + $rootScope.CAWindowLoadComplete = false; | |
698 | + $scope.readyToLoad = true; | |
699 | + } | |
700 | + | |
701 | + if ($scope.wincount == winlen && $rootScope.CAWindowLoadComplete == true) { | |
702 | + $scope.stopInterval(); | |
703 | + $scope.$emit("LoadModuleComplete", "CLINICAL_ANIMATIONS", slideId); | |
704 | + } | |
705 | + | |
706 | + | |
707 | + }, 100); | |
708 | + | |
709 | + $scope.stopInterval = function () { | |
710 | + if (angular.isDefined(timeint)) { | |
711 | + $interval.cancel(timeint); | |
712 | + timeint = undefined; | |
713 | + } | |
714 | + | |
715 | + }; | |
716 | + | |
717 | + } | |
718 | + else { | |
719 | + $scope.openBodyView(null); | |
720 | + } | |
721 | + } | |
722 | + | |
723 | + $scope.openBodyView = function (caModuleData) { | |
724 | + | |
725 | + if ($rootScope.isCallFromOtherModule == true) { | |
726 | + $scope.caOpenInOtherModules = caModuleData; | |
727 | + $rootScope.MULTI_VIEW_ID += 1; | |
728 | + var windowviewid = $rootScope.MULTI_VIEW_ID; | |
729 | + | |
730 | + $scope.initializeCIWindowData(windowviewid, false, $scope.caOpenInOtherModules.currentWindowId); | |
731 | + | |
732 | + var moduleName = $scope.caOpenInOtherModules.mType; | |
733 | + $scope.SetCAwindowStoreData(windowviewid, 'moduleName', moduleName); | |
734 | + | |
735 | + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist_mp4link.json') | |
736 | + promise.then( | |
737 | + function (result) { | |
738 | + | |
739 | + $scope.CAlistViewData = result.root.CAData; | |
740 | + var id = $scope.GetCAwindowStoreData(windowviewid, 'imageId'); | |
741 | + | |
742 | + var clickedCAVideoData = []; | |
743 | + clickedCAVideoData = new jinqJs() | |
744 | + .from($scope.CAlistViewData) | |
745 | + .where('_id == ' + id) | |
746 | + .select('_Video', '_LowerSummary', '_HostedFolderId'); | |
747 | + | |
748 | + // serial no of imageid | |
749 | + var imageId = $scope.caOpenInOtherModules.id; | |
750 | + | |
751 | + $scope.SetCAwindowStoreData(windowviewid, 'imageId', imageId); | |
752 | + | |
753 | + //var imageName = selectedTileData[0]._ThumbnailImage; | |
754 | + | |
755 | + // $scope.SetCAwindowStoreData(windowviewid, 'imageName', imageName); | |
756 | + | |
757 | + // var imagePath = "~/../content/images/ca/thumbnails/" + imageName; | |
758 | + | |
759 | + // $scope.SetCAwindowStoreData(windowviewid, 'CAImagePath', imagePath); | |
760 | + | |
761 | + var clickedCAVideo = clickedCAVideoData[0]._Video; | |
762 | + var clickedCASummary = clickedCAVideoData[0]._LowerSummary; | |
763 | + var hostedFolderId = clickedCAVideoData[0]._HostedFolderId; | |
764 | + | |
765 | + $scope.SetCAwindowStoreData(windowviewid, 'clickedCAVideo', clickedCAVideo); | |
766 | + $scope.SetCAwindowStoreData(windowviewid, 'clickedCASummary', clickedCASummary); | |
767 | + $scope.SetCAwindowStoreData(windowviewid, 'hostedFolderId', hostedFolderId); | |
768 | + | |
769 | + | |
770 | + // var selectedImageCALowerSummary = selectedTileData[0]._LowerSummary | |
771 | + | |
772 | + // $scope.SetCAwindowStoreData(windowviewid, 'LowerSummary', selectedImageCALowerSummary); | |
773 | + | |
774 | + var ciTitle = $scope.caOpenInOtherModules.anatomyTitle; | |
775 | + $scope.SetCAwindowStoreData(windowviewid, 'currentViewTitle', ciTitle); | |
776 | + localStorage.setItem("currentViewTitle", ciTitle); | |
777 | + | |
778 | + $scope.SetCAwindowStoreData(windowviewid, 'parentSlugName', ($location.url()).replace('/', '')); | |
779 | + | |
780 | + $scope.loadCAAnimation(windowviewid); | |
781 | + | |
782 | + }, | |
783 | + function (error) { | |
784 | + // handle errors here | |
785 | + console.log(' $scope.CAllustrationData = ' + error.statusText); | |
786 | + } | |
787 | + | |
788 | + ); | |
789 | + } | |
790 | + else { | |
791 | + $scope.SetCAwindowStoreData($rootScope.MULTI_VIEW_ID, 'parentSlugName', 'clinical-illustrations'); | |
792 | + $scope.loadCAAnimation($rootScope.MULTI_VIEW_ID); | |
793 | + } | |
794 | + | |
795 | + | |
582 | 796 | |
583 | 797 | } |
798 | + | |
584 | 799 | |
585 | - $scope.openBodyView = function () { | |
800 | + $scope.loadCAAnimation = function (windowviewid) { | |
586 | 801 | |
587 | 802 | if ($rootScope.refreshcheck == null) { |
588 | 803 | $location.path('/'); |
... | ... | @@ -597,147 +812,117 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
597 | 812 | } |
598 | 813 | $rootScope.isLoading = true; |
599 | 814 | $('#spinner').css('visibility', 'visible'); |
600 | - $scope.voId = $rootScope.getLocalStorageValue("currentBodyViewId"); | |
601 | - | |
602 | - // alert($scope.voId); | |
603 | 815 | |
816 | + $scope.jsPanelID = 'caVideoPanel' + '_' + windowviewid; | |
817 | + | |
818 | + var clickedCAVideo = $scope.GetCAwindowStoreData(windowviewid, 'clickedCAVideo'); | |
819 | + var clickedCASummary = $scope.GetCAwindowStoreData(windowviewid, 'clickedCASummary'); | |
820 | + var hostedFolderId = $scope.GetCAwindowStoreData(windowviewid, 'hostedFolderId'); | |
821 | + | |
822 | + var tittle = $scope.GetCAwindowStoreData(windowviewid, 'currentViewTitle'); | |
823 | + | |
824 | + var poster = $scope.hostedServer + hostedFolderId + "/" + hostedFolderId + ".jpg"; | |
825 | + var admp4 = $scope.hostedServer + hostedFolderId + "/" + hostedFolderId + "_ad.mp4"; | |
826 | + var hdvideo = $scope.hostedServer + hostedFolderId + "/" + hostedFolderId + "_HD.mp4"; | |
827 | + var webm = $scope.hostedServer + hostedFolderId + "/" + hostedFolderId + ".webm"; | |
828 | + var ogv = $scope.hostedServer + hostedFolderId + "/" + hostedFolderId + ".ogv"; | |
829 | + var playerScript = "~/../libs/video_4_12_11/video_4_12_11.js"; | |
830 | + | |
831 | + var vtt = "~/../content/data/vtt/" + hostedFolderId + ".vtt"; | |
832 | + | |
833 | + if ($rootScope.isCallFromOtherModule) { | |
834 | + // open JS panel for curriculum with define cornonate in CB jason | |
835 | + $scope.jsPanelWidth = $scope.caOpenInOtherModules.size.width;//1000; | |
836 | + $scope.jsPanelHeight = $scope.caOpenInOtherModules.size.height; | |
837 | + if ($scope.caOpenInOtherModules.size.height > 540) | |
838 | + $scope.jsPanelHeight = 540; | |
839 | + $scope.jsPanelLeft = 320; | |
840 | + $scope.jsPanelTop = $rootScope.cBModulejsPanelTop(); | |
604 | 841 | |
605 | - //once you get id in scope push detail in jspanel content | |
606 | - | |
607 | - // var openViews; | |
608 | - //if ($rootScope.openViews.length > 0) { | |
609 | - // openViews = new jinqJs() | |
610 | - // .from($rootScope.openViews) | |
611 | - // .where("BodyViewId==" + $scope.voId) | |
612 | - // .select(); | |
613 | - //} | |
614 | - var counter = 1; | |
615 | - var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson"); | |
616 | - localStorage.setItem("currentViewTitle", tittle); | |
617 | - //if (openViews != null && openViews.length > 0) { | |
618 | - // angular.forEach(openViews, function (value, key) { | |
619 | - | |
620 | - // if (value.body - views == tittle) { | |
621 | - // tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++; | |
622 | - // $rootScope.currentActiveViewTitle = tittle; | |
623 | - // localStorage.setItem("currentViewTitle", tittle); | |
624 | - // } | |
625 | - | |
626 | - // }); | |
627 | - //} | |
628 | - //else { | |
629 | - // localStorage.setItem("currentViewTitle", tittle); | |
842 | + } | |
843 | + else { | |
844 | + $scope.jsPanelWidth = $(window).outerWidth() - 10; | |
845 | + $scope.jsPanelHeight = $(window).outerHeight() - 110; | |
846 | + $scope.jsPanelLeft = 1; | |
847 | + $scope.jsPanelTop = 70; | |
848 | + } | |
630 | 849 | |
631 | - //} | |
632 | 850 | |
633 | - //alert($rootScope.getLocalStorageValue("currentViewTitle")); | |
851 | + if (clickedCAVideo.length > 0 && clickedCASummary.length > 0) { | |
852 | + | |
853 | + $rootScope.isLoading = false; | |
854 | + $('#spinner').css('visibility', 'hidden'); | |
855 | + | |
856 | + $.jsPanel({ | |
857 | + id: $scope.jsPanelID, | |
858 | + selector: '.caView', | |
859 | + theme: 'success', | |
860 | + currentController: 'CAController', | |
861 | + parentSlug: 'clinical-animations', | |
862 | + content: '<script src="' + playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo").pause();$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid").css("visibility","visible");}});});</script><div id="pid" class="row"><div id="divplayerinlineVideo" class="col-sm-12" align="center" width="640" height="480"><video width="640" height="360"' + | |
863 | + 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo"' + | |
864 | + ' poster="' + poster + '"' + | |
865 | + 'controls="true" preload="none" allowfullscreen="true" allowscriptaccess="always" ' + | |
866 | + ' ad="' + admp4 + '"' + | |
867 | + ' nonad="' + clickedCAVideo + '"' + | |
868 | + ' hd="' + hdvideo + '" ' + | |
869 | + ' nonhd="' + clickedCAVideo + '">' + | |
870 | + ' <source type="video/mp4" src="' + clickedCAVideo + '">' + | |
871 | + ' <source type="video/webm" src="' + webm + '">' + | |
872 | + ' <source type="video/ogv" src="' + ogv + '">' + | |
873 | + ' <track src="' + vtt + '" ' + | |
874 | + ' kind="captions" srclang="en" label="On"><object width="640" height="360"' + | |
875 | + ' type="application/x-shockwave-flash" data="//vjs.zencdn.net/3.2/video-js.swf"><param name="allowfullscreen" value="true">' + | |
876 | + ' <param name="allowscriptaccess" value="always"><param name="movie" value="//vjs.zencdn.net/3.2/video-js.swf">' + | |
877 | + ' <param name="flashvars" ng-value="controls=true&file=' + 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;-webkit-overflow-scrolling:touch !important;"><p>' + clickedCASummary + '</p></div><button id="btnTxtOnOff_' + windowviewid + '" class="btn btn-primary pull-right">Text Off</button></div></div></div>', | |
878 | + | |
879 | + title: tittle, | |
880 | + position: { | |
881 | + top: $scope.jsPanelTop, | |
882 | + left: $scope.jsPanelLeft | |
883 | + }, | |
884 | + | |
885 | + size: { | |
886 | + width: $scope.jsPanelWidth, | |
887 | + height: $scope.jsPanelHeight | |
888 | + }, | |
634 | 889 | |
635 | - var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist_mp4link.json') | |
636 | - promise.then( | |
637 | - function (result) { | |
638 | - $scope.AnimationData = result; | |
639 | - $scope.CAlistViewData = $scope.AnimationData.root.CAData; | |
890 | + }); | |
640 | 891 | |
641 | - var clickedCAVideo = []; | |
642 | - clickedCAVideo = new jinqJs() | |
643 | - .from($scope.CAlistViewData) | |
644 | - .where('_id == ' + $scope.voId) | |
645 | - .select('_Video', '_LowerSummary', '_HostedFolderId'); | |
646 | 892 | |
647 | - $scope.clickedCAVideo = clickedCAVideo[0]._Video; | |
648 | - $scope.clickedCASummary = clickedCAVideo[0]._LowerSummary; | |
649 | - $scope.hostedFolderId = clickedCAVideo[0]._HostedFolderId; | |
650 | - $scope.poster = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + ".jpg"; | |
651 | - $scope.ad = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + "_ad.mp4"; | |
652 | - $scope.HDVid = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + "_HD.mp4"; | |
653 | - $scope.webm = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + ".webm"; | |
654 | - $scope.ogv = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + ".ogv"; | |
655 | - $scope.playerScript = "~/../libs/video_4_12_11/video_4_12_11.js"; | |
656 | - //$scope.vtt = $scope.hostedServer + $scope.hostedFolderId + "/" + $scope.hostedFolderId + ".vtt" | |
657 | - $scope.vtt = "~/../content/data/vtt/" + $scope.hostedFolderId + ".vtt"; | |
658 | - console.log($scope.vtt); | |
659 | - if ($scope.clickedCAVideo.length > 0 && $scope.clickedCASummary.length > 0) { | |
660 | - | |
661 | - $rootScope.isLoading = false; | |
662 | - $('#spinner').css('visibility', 'hidden'); | |
663 | - | |
664 | - $.jsPanel({ | |
665 | - id: 'caVideoPanel', | |
666 | - selector: '.caView', | |
667 | - theme: 'success', | |
668 | - currentController: 'CAController', | |
669 | - parentSlug: 'clinical-animations', | |
670 | - content: '<script src="' + $scope.playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo").pause();$("#btnTxtOnOff").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid").css("visibility","visible");}});});</script><div id="pid" class="row"><div id="divplayerinlineVideo" class="col-sm-12" align="center" width="640" height="480"><video width="640" height="360"' + | |
671 | - 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo"' + | |
672 | - ' poster="' + $scope.poster + '"' + | |
673 | - 'controls="true" preload="none" allowfullscreen="true" allowscriptaccess="always" ' + | |
674 | - ' ad="' + $scope.ad + '"' + | |
675 | - ' nonad="' + $scope.clickedCAVideo + '"' + | |
676 | - ' hd="' + $scope.HDVid + '" ' + | |
677 | - ' nonhd="' + $scope.clickedCAVideo + '">' + | |
678 | - ' <source type="video/mp4" src="' + $scope.clickedCAVideo + '">' + | |
679 | - ' <source type="video/webm" src="' + $scope.webm + '">' + | |
680 | - ' <source type="video/ogv" src="' + $scope.ogv + '">' + | |
681 | - ' <track src="' + $scope.vtt + '" ' + | |
682 | - ' kind="captions" srclang="en" label="On"><object width="640" height="360"' + | |
683 | - ' type="application/x-shockwave-flash" data="//vjs.zencdn.net/3.2/video-js.swf"><param name="allowfullscreen" value="true">' + | |
684 | - ' <param name="allowscriptaccess" value="always"><param name="movie" value="//vjs.zencdn.net/3.2/video-js.swf">' + | |
685 | - ' <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;-webkit-overflow-scrolling:touch !important;"><p>' + $scope.clickedCASummary + '</p></div><button id="btnTxtOnOff" class="btn btn-primary pull-right">Text Off</button></div></div></div>', | |
686 | - | |
687 | - //ajax: { | |
688 | - // url: 'app/views/ca/ca-view-detail.html' | |
689 | - //}, | |
690 | - title: $rootScope.getLocalStorageValue("currentViewTitle"), | |
691 | - position: { | |
692 | - top: 70, | |
693 | - left: 1, | |
694 | - }, | |
695 | - | |
696 | - size: { width: $(window).outerWidth() - 10, height: $(window).outerHeight() - 110 }, | |
697 | - | |
698 | - }); | |
699 | - | |
700 | - | |
701 | - $rootScope.currentSlug = 'clinical-animations-detail'; | |
702 | - $('html, body').animate({ scrollTop: 0 }); | |
703 | - $rootScope.openViews.push( | |
704 | - { | |
705 | - "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | |
706 | - "slug": $rootScope.currentSlug | |
707 | - }); | |
708 | - | |
709 | - | |
710 | - var jspContentHeight = $('.jsPanel-content').height(); | |
711 | - var videoHeight = $('#divplayerinlineVideo div').height(); | |
712 | - if (videoHeight <= 0) | |
713 | - videoHeight = 360; | |
714 | - var textH = $('.video-subtitle').height(); | |
715 | - textH = textH + 40; | |
716 | - var blackBorderHeight = jspContentHeight - (videoHeight + textH); | |
717 | - | |
718 | - if ($('.jsPanel-content').length > 0) { | |
719 | - $('.video-subtitle').css('margin-bottom', blackBorderHeight); | |
720 | - $('#divplayerinlineVideo').css('background', '#fff'); | |
721 | - //Android > Clinical Animations > The animation does not fit to the screen in the Landscape mode. | |
722 | - var $ua = navigator.userAgent; | |
723 | - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { $('.jsPanel-content').css("width", "100%"); } | |
724 | - } | |
893 | + $rootScope.currentSlug = 'clinical-animations-detail'; | |
894 | + $('html, body').animate({ scrollTop: 0 }); | |
895 | + $rootScope.openViews.push( | |
896 | + { | |
897 | + "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | |
898 | + "slug": $rootScope.currentSlug | |
899 | + }); | |
725 | 900 | |
726 | - } | |
727 | 901 | |
902 | + var jspContentHeight = $('.jsPanel-content').height(); | |
903 | + var videoHeight = $('#divplayerinlineVideo div').height(); | |
904 | + if (videoHeight <= 0) | |
905 | + videoHeight = 360; | |
906 | + var textH = $('.video-subtitle').height(); | |
907 | + textH = textH + 40; | |
908 | + var blackBorderHeight = jspContentHeight - (videoHeight + textH); | |
909 | + | |
910 | + if ($('.jsPanel-content').length > 0) { | |
911 | + $('.video-subtitle').css('margin-bottom', blackBorderHeight); | |
912 | + $('#divplayerinlineVideo').css('background', '#fff'); | |
913 | + //Android > Clinical Animations > The animation does not fit to the screen in the Landscape mode. | |
914 | + var $ua = navigator.userAgent; | |
915 | + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { $('.jsPanel-content').css("width", "100%"); } | |
916 | + } | |
728 | 917 | |
729 | - }, | |
730 | - function (error) { | |
731 | - // handle errors here | |
732 | - console.log(' $scope.AnimationData = ' + error.statusText); | |
733 | - } | |
918 | + } | |
734 | 919 | |
735 | - ); | |
736 | 920 | |
921 | + | |
737 | 922 | //console.log($rootScope.openViews); |
738 | 923 | $('#CAView').css("height", $(window).outerHeight()); |
739 | 924 | |
740 | - $('#CAView').css("width", $(window).outerWidth()); | |
925 | + $('#CAView').css("width", $(window).outerWidth()-20); | |
741 | 926 | |
742 | 927 | } |
743 | 928 | |
... | ... | @@ -751,7 +936,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
751 | 936 | //console.log(id); |
752 | 937 | $scope.idSelected = id; |
753 | 938 | $scope.hiderow = true; |
754 | - var AnimationData = $scope.GetCIwindowStoreData(windowviewid, 'AnimationData'); | |
939 | + var AnimationData = $scope.GetCAwindowStoreData(windowviewid, 'AnimationData'); | |
755 | 940 | |
756 | 941 | var SelectedCAthumbImage = []; |
757 | 942 | SelectedCAthumbImage = new jinqJs() | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
1 | 1 | ๏ปฟ'use strict'; |
2 | 2 | |
3 | -AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", "TermService", "AIAConstants", "ModuleService","$interval","$q", | |
4 | - function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService, TermService, AIAConstants, ModuleService,$interval,$q) { | |
3 | +AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", "TermService", "AIAConstants", "ModuleService","$interval","$q","$filter", | |
4 | + function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService, TermService, AIAConstants, ModuleService, $interval, $q, $filter) { | |
5 | 5 | |
6 | 6 | $scope.ScopeVariablesDeclare = function () { |
7 | 7 | |
8 | - // common field data | |
8 | + // common field data | |
9 | 9 | $rootScope.path = "~/../content/images/speeachBubbleClose.png"; |
10 | 10 | $rootScope.modestyCanvasZindex = 12100; |
11 | 11 | $scope.IsSearchVisible; |
... | ... | @@ -34,7 +34,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
34 | 34 | '12': '10', |
35 | 35 | |
36 | 36 | } |
37 | - //for transarency scale one time variable | |
37 | + //for transarency scale one time variable | |
38 | 38 | $scope.TBDrawStartX; |
39 | 39 | $scope.TBDrawStartY; |
40 | 40 | $scope.speechbubbleList = []; |
... | ... | @@ -258,7 +258,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
258 | 258 | |
259 | 259 | if($rootScope.DaWindowData[x].multiwinid==windowviewid) |
260 | 260 | { |
261 | - $rootScope.DaWindowData[x][keyname]=value; | |
261 | + $rootScope.DaWindowData[x][keyname]=value; | |
262 | 262 | } |
263 | 263 | } |
264 | 264 | } |
... | ... | @@ -267,10 +267,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
267 | 267 | // handle for single window |
268 | 268 | if($rootScope.DaWindowData.length>0) |
269 | 269 | { |
270 | - for(var x=0 ;x < $rootScope.DaWindowData.length;x++){ | |
270 | + for(var x=0 ;x < $rootScope.DaWindowData.length;x++){ | |
271 | 271 | |
272 | - return $rootScope.DaWindowData[x].multiwinid; | |
273 | - } | |
272 | + return $rootScope.DaWindowData[x].multiwinid; | |
273 | + } | |
274 | 274 | } |
275 | 275 | else return 0; |
276 | 276 | } |
... | ... | @@ -307,8 +307,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
307 | 307 | $('#LateralArm_'+windowviewid).removeClass("active"); |
308 | 308 | $('#MedialArm_'+windowviewid).removeClass("active"); |
309 | 309 | |
310 | - if (viewtypename.match("Anterior")) { | |
311 | - $('#Anterior_'+windowviewid).addClass('active'); | |
310 | + if (viewtypename.match("Anterior")) { | |
311 | + $('#Anterior_'+windowviewid).addClass('active'); | |
312 | 312 | } |
313 | 313 | else if (viewtypename.match("Lateral Arm")) { |
314 | 314 | $('#LateralArm_'+windowviewid).addClass('active'); |
... | ... | @@ -486,7 +486,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
486 | 486 | var u = $location.url(); |
487 | 487 | |
488 | 488 | if ($rootScope.isOpenResourceBtnClicked == true) { |
489 | - // $rootScope.MULTI_VIEW_ID = $rootScope.MULTI_VIEW_ID + 1; | |
489 | + // $rootScope.MULTI_VIEW_ID = $rootScope.MULTI_VIEW_ID + 1; | |
490 | 490 | $rootScope.multiViewInfoIndex = 0; |
491 | 491 | $rootScope.multiViewInfo.push({ "Target": $event.currentTarget, "id": $rootScope.MULTI_VIEW_ID, "bodyViewID": $event.currentTarget.id, "bodyName": $event.currentTarget.textContent }); |
492 | 492 | // $rootScope.multiSearchData = []; |
... | ... | @@ -520,7 +520,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
520 | 520 | } |
521 | 521 | $scope.ScopeVariablesDeclare(); |
522 | 522 | |
523 | - $scope.initializeDAWindowData($rootScope.MULTI_VIEW_ID,true,undefined); | |
523 | + $scope.initializeDAWindowData($rootScope.MULTI_VIEW_ID,true,undefined); | |
524 | 524 | |
525 | 525 | //get current path |
526 | 526 | var currentURL = $location.path(); |
... | ... | @@ -576,13 +576,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
576 | 576 | $scope.ScopeVariablesDeclare(); |
577 | 577 | if ($rootScope.isCallFromOtherModule) { |
578 | 578 | $scope.DAModuleData = ModuleService.getModuleData("DISSECTIBLE_ANATOMY"); |
579 | - $scope.readyToLoad=true; | |
580 | - $rootScope.DAWindowLoadComplete = false; | |
581 | - $scope.wincount=1; | |
582 | - var winlen=$scope.DAModuleData.length; | |
583 | - var timeint = null; | |
584 | - var slideId = ""; | |
585 | - timeint = $interval(function() { | |
579 | + $scope.readyToLoad=true; | |
580 | + $rootScope.DAWindowLoadComplete = false; | |
581 | + $scope.wincount=1; | |
582 | + var winlen=$scope.DAModuleData.length; | |
583 | + var timeint = null; | |
584 | + var slideId = ""; | |
585 | + timeint = $interval(function() { | |
586 | 586 | |
587 | 587 | if($scope.readyToLoad==true) |
588 | 588 | { |
... | ... | @@ -603,20 +603,20 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
603 | 603 | { |
604 | 604 | $scope.stopInterval(); |
605 | 605 | // scope variable to use for other module |
606 | - // $rootScope.CBWindowLoadComplete==true | |
606 | + // $rootScope.CBWindowLoadComplete==true | |
607 | 607 | $scope.$emit("LoadModuleComplete", "DISSECTIBLE_ANATOMY", slideId); |
608 | 608 | } |
609 | 609 | |
610 | 610 | |
611 | - }, 100); | |
611 | + }, 100); | |
612 | 612 | |
613 | 613 | $scope.stopInterval = function() { |
614 | 614 | if (angular.isDefined(timeint)) { |
615 | - $interval.cancel(timeint); | |
616 | - timeint = undefined; | |
615 | + $interval.cancel(timeint); | |
616 | + timeint = undefined; | |
617 | 617 | } |
618 | 618 | |
619 | - }; | |
619 | + }; | |
620 | 620 | |
621 | 621 | } |
622 | 622 | else { |
... | ... | @@ -640,7 +640,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
640 | 640 | |
641 | 641 | if ($scope.daOpenInOtherModules != undefined) { |
642 | 642 | |
643 | - $scope.SetwindowStoreData(windowviewid,'voId',$scope.daOpenInOtherModules.currentBodyViewId); | |
643 | + $scope.SetwindowStoreData(windowviewid,'voId',$scope.daOpenInOtherModules.currentBodyViewId); | |
644 | 644 | $scope.SetwindowStoreData(windowviewid,'currentViewTitle',$scope.daOpenInOtherModules.windowTitle); |
645 | 645 | localStorage.setItem("currentViewTitle", $scope.daOpenInOtherModules.windowTitle); |
646 | 646 | $scope.jsPanelID = 'daImagePanel' + '_' + windowviewid; |
... | ... | @@ -648,12 +648,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
648 | 648 | console.log('$location.url = ' + $location.url()) |
649 | 649 | |
650 | 650 | var skinValue=$scope.daOpenInOtherModules.skinId; |
651 | - // localStorage.setItem("globalEthnicity",skinValue ); | |
651 | + // localStorage.setItem("globalEthnicity",skinValue ); | |
652 | 652 | $scope.SetwindowStoreData(windowviewid,'curentEthnicity',skinValue); |
653 | 653 | |
654 | 654 | var modestyValue=$scope.daOpenInOtherModules.isModestyOn; |
655 | - // localStorage.setItem("globalModesty", modestyValue); | |
656 | - $scope.SetwindowStoreData(windowviewid,'ModestyValue',modestyValue); | |
655 | + // localStorage.setItem("globalModesty", modestyValue); | |
656 | + $scope.SetwindowStoreData(windowviewid,'ModestyValue',modestyValue); | |
657 | 657 | if(modestyValue=="Y") |
658 | 658 | { |
659 | 659 | $scope.SetwindowStoreData(windowviewid,'isModestyOn',true); |
... | ... | @@ -697,7 +697,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
697 | 697 | $rootScope.MULTI_VIEW_ID = $rootScope.multiViewInfo[$rootScope.multiViewInfoIndex].id; |
698 | 698 | $rootScope.multiViewCounter = $rootScope.MULTI_VIEW_ID; |
699 | 699 | |
700 | - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'voId',$rootScope.multiViewInfo[$rootScope.multiViewInfoIndex].bodyViewID); | |
700 | + $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'voId',$rootScope.multiViewInfo[$rootScope.multiViewInfoIndex].bodyViewID); | |
701 | 701 | $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'currentViewTitle',$rootScope.multiViewInfo[$rootScope.multiViewInfoIndex].bodyName); |
702 | 702 | |
703 | 703 | $scope.jsPanelID = 'daImagePanel' + '_' + $rootScope.multiViewCounter; |
... | ... | @@ -705,7 +705,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
705 | 705 | console.log('$location.url = ' + $location.url()); |
706 | 706 | $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'parentSlugName',($location.url()).replace('/', '')); |
707 | 707 | |
708 | - //'clinical-illustrations'; // | |
708 | + //'clinical-illustrations'; // | |
709 | 709 | $scope.loadBodyView($rootScope.MULTI_VIEW_ID); |
710 | 710 | |
711 | 711 | } |
... | ... | @@ -735,7 +735,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
735 | 735 | |
736 | 736 | //check if localstorage has any settings |
737 | 737 | if (!$rootScope.isCallFromOtherModule) { |
738 | - var curentEthnicity = $rootScope.getLocalStorageValue("globalEthnicity"); | |
738 | + var curentEthnicity = $rootScope.getLocalStorageValue("globalEthnicity"); | |
739 | 739 | if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { |
740 | 740 | $rootScope.globalSetting.ethnicity = curentEthnicity; |
741 | 741 | } |
... | ... | @@ -783,7 +783,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
783 | 783 | $rootScope.jsPanelWidth = $scope.daOpenInOtherModules.size.width;//1000; |
784 | 784 | $rootScope.jsPanelHeight = $scope.daOpenInOtherModules.size.height; |
785 | 785 | if($scope.daOpenInOtherModules.size.height<450) |
786 | - $rootScope.jsPanelHeight = 450; | |
786 | + $rootScope.jsPanelHeight = 450; | |
787 | 787 | |
788 | 788 | $rootScope.jsPanelLeft = 320; |
789 | 789 | |
... | ... | @@ -889,7 +889,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
889 | 889 | |
890 | 890 | if ($rootScope.isCallFromOtherModule) { |
891 | 891 | $scope.JsPanelclick(windowviewid); |
892 | - } | |
892 | + } | |
893 | 893 | |
894 | 894 | $scope.NavigatorDraggable(windowviewid) |
895 | 895 | $scope.loadbtnNavigator(windowviewid); |
... | ... | @@ -989,7 +989,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
989 | 989 | var currentViewTitle = $scope.GetwindowStoreData(windowviewid, 'currentViewTitle'); |
990 | 990 | |
991 | 991 | $rootScope.StoreTitleName(currentViewTitle); |
992 | - $scope.LoadImageToExport(windowviewid); | |
992 | + $scope.LoadImageToExport(windowviewid); | |
993 | 993 | |
994 | 994 | }); |
995 | 995 | } |
... | ... | @@ -1002,7 +1002,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1002 | 1002 | |
1003 | 1003 | $scope.NavigatorDraggable=function(windowviewid) |
1004 | 1004 | { |
1005 | - $("#navDiv_"+windowviewid).addClass("containment-wrapper-"+windowviewid); | |
1005 | + $("#navDiv_"+windowviewid).addClass("containment-wrapper-"+windowviewid); | |
1006 | 1006 | // issue in navigator image in internet explorer |
1007 | 1007 | if ($.browser.msie == true) { |
1008 | 1008 | $("#navigatorDiv_"+windowviewid).css({"min-width":"auto", "min-height":"auto"}); |
... | ... | @@ -1027,7 +1027,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1027 | 1027 | |
1028 | 1028 | var layerNum = $scope.GetwindowStoreData(windviewid,'totalLayers'); |
1029 | 1029 | |
1030 | - // var daViewScope = angular.element(document.getElementsByClassName("daBodyView")).scope(); | |
1030 | + // var daViewScope = angular.element(document.getElementsByClassName("daBodyView")).scope(); | |
1031 | 1031 | //layerNum = parseInt(daViewScope.totalLayers) //- parseInt(scope.layerNumber); |
1032 | 1032 | var sliderVal = layerNum - ui.value; |
1033 | 1033 | $("#txtLayerNumberDA_" + windviewid).val(sliderVal); |
... | ... | @@ -1073,24 +1073,24 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1073 | 1073 | value: 50, |
1074 | 1074 | range: "min", |
1075 | 1075 | orientation: "horizontal", |
1076 | - // change: function (event, ui) { | |
1077 | - // var targetid = event.target.id; | |
1078 | - // var windviewid = targetid.split('_')[1]; | |
1079 | - // var scope = angular.element(document.getElementById("daViewDA_" + windviewid)).scope(); | |
1080 | - // scope.$apply(function () { | |
1081 | - // scope.onTransparencyChange(event, ui); | |
1082 | - // }); | |
1083 | - // } | |
1084 | - // , | |
1076 | + // change: function (event, ui) { | |
1077 | + // var targetid = event.target.id; | |
1078 | + // var windviewid = targetid.split('_')[1]; | |
1079 | + // var scope = angular.element(document.getElementById("daViewDA_" + windviewid)).scope(); | |
1080 | + // scope.$apply(function () { | |
1081 | + // scope.onTransparencyChange(event, ui); | |
1082 | + // }); | |
1083 | + // } | |
1084 | + // , | |
1085 | 1085 | stop: function (event, ui) { |
1086 | - //alert('trans changed') | |
1087 | - var targetid = event.target.id; | |
1088 | - var len= (targetid).split("_").length; | |
1089 | - var windviewid = (targetid).split("_")[len-1]; | |
1090 | - var scope = angular.element(document.getElementById("daViewDA_" + windviewid)).scope(); | |
1091 | - scope.$apply(function () { | |
1092 | - scope.onTransparencyChange(event, ui); | |
1093 | - }); | |
1086 | + //alert('trans changed') | |
1087 | + var targetid = event.target.id; | |
1088 | + var len= (targetid).split("_").length; | |
1089 | + var windviewid = (targetid).split("_")[len-1]; | |
1090 | + var scope = angular.element(document.getElementById("daViewDA_" + windviewid)).scope(); | |
1091 | + scope.$apply(function () { | |
1092 | + scope.onTransparencyChange(event, ui); | |
1093 | + }); | |
1094 | 1094 | } |
1095 | 1095 | }) |
1096 | 1096 | .slider("pips", { |
... | ... | @@ -1292,7 +1292,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1292 | 1292 | |
1293 | 1293 | $scope.viewID = 'daViewDA' + '_' + $rootScope.multiViewCounter; |
1294 | 1294 | |
1295 | - // $scope.loadView(); | |
1295 | + // $scope.loadView(); | |
1296 | 1296 | } |
1297 | 1297 | } |
1298 | 1298 | |
... | ... | @@ -1375,7 +1375,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1375 | 1375 | } |
1376 | 1376 | |
1377 | 1377 | $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { |
1378 | - //$(document).on("click", " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { | |
1378 | + //$(document).on("click", " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { | |
1379 | 1379 | |
1380 | 1380 | $rootScope.selectedBodySystemName = 'All'; |
1381 | 1381 | $rootScope.selectedBodySystemId = 0; |
... | ... | @@ -1523,12 +1523,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1523 | 1523 | |
1524 | 1524 | if ($scope.vocabTempTermArray.length == $rootScope.lexiconLanguageArray.length) { |
1525 | 1525 | $("#setting-spinner").css("display", "none"); |
1526 | - // add data vocabTermDataArray | |
1527 | - $scope.SetwindowStoreData(windowviewid, 'vocabTermDataArray', $scope.vocabTempTermArray); | |
1526 | + // add data vocabTermDataArray | |
1527 | + $scope.SetwindowStoreData(windowviewid, 'vocabTermDataArray', $scope.vocabTempTermArray); | |
1528 | 1528 | |
1529 | 1529 | for (var i = 0; i <= $scope.vocabTempTermArray.length - 1; i++) { |
1530 | 1530 | if ($scope.vocabTempTermArray[i].language == $rootScope.lexiconLanguageArray[0].language) { |
1531 | - // $scope.primaryLexiconInd = i; | |
1531 | + // $scope.primaryLexiconInd = i; | |
1532 | 1532 | $scope.SetwindowStoreData(windowviewid, 'primaryLexiconInd', i); |
1533 | 1533 | } |
1534 | 1534 | } |
... | ... | @@ -1539,19 +1539,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1539 | 1539 | $scope.ShowSearch(windowviewid); |
1540 | 1540 | } |
1541 | 1541 | |
1542 | - // terminate search worker instances | |
1542 | + // terminate search worker instances | |
1543 | 1543 | if ($scope.runningSearchWorkers != null || $scope.runningSearchWorkers != undefined) { |
1544 | 1544 | |
1545 | - var workerCount = $scope.runningSearchWorkers.length; | |
1546 | - if (workerCount > 0) { | |
1547 | - for (var i = workerCount - 1; i >= 0; i--) { | |
1545 | + var workerCount = $scope.runningSearchWorkers.length; | |
1546 | + if (workerCount > 0) { | |
1547 | + for (var i = workerCount - 1; i >= 0; i--) { | |
1548 | 1548 | |
1549 | - var runningWorker = $scope.runningSearchWorkers[i].workerName; | |
1550 | - runningWorker.terminate(); | |
1551 | - $scope.runningSearchWorkers.splice(i, 1); | |
1552 | - } | |
1549 | + var runningWorker = $scope.runningSearchWorkers[i].workerName; | |
1550 | + runningWorker.terminate(); | |
1551 | + $scope.runningSearchWorkers.splice(i, 1); | |
1553 | 1552 | } |
1554 | 1553 | } |
1554 | + } | |
1555 | 1555 | } |
1556 | 1556 | |
1557 | 1557 | console.log('JlinqActivity , time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); |
... | ... | @@ -1561,8 +1561,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1561 | 1561 | |
1562 | 1562 | } |
1563 | 1563 | |
1564 | - // store image for export | |
1565 | - $scope.LoadImageToExport(windowviewid); | |
1564 | + // store image for export | |
1565 | + $scope.LoadImageToExport(windowviewid); | |
1566 | 1566 | |
1567 | 1567 | } |
1568 | 1568 | |
... | ... | @@ -1601,7 +1601,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1601 | 1601 | |
1602 | 1602 | $scope.LoadDefaultLayerImage(windowviewid); |
1603 | 1603 | |
1604 | - // terminate body view worker instances | |
1604 | + // terminate body view worker instances | |
1605 | 1605 | if ($scope.runningBodyViewWorkers != null || $scope.runningBodyViewWorkers != undefined) { |
1606 | 1606 | |
1607 | 1607 | var workerCount = $scope.runningBodyViewWorkers.length; |
... | ... | @@ -1708,7 +1708,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1708 | 1708 | // load image to export |
1709 | 1709 | $scope.LoadImageToExport = function(windowviewid) |
1710 | 1710 | { |
1711 | - // $scope.genderId = $rootScope.getLocalStorageValue("genderId"); | |
1711 | + // $scope.genderId = $rootScope.getLocalStorageValue("genderId"); | |
1712 | 1712 | var selectedGender = $scope.GetwindowStoreData(windowviewid,'genderId'); |
1713 | 1713 | var currentBodyViewId = $scope.GetwindowStoreData(windowviewid,'voId'); |
1714 | 1714 | |
... | ... | @@ -1717,25 +1717,25 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1717 | 1717 | .where('_gender == ' + selectedGender,'_id == ' + currentBodyViewId) |
1718 | 1718 | .select(); |
1719 | 1719 | |
1720 | - var skinTone=$scope.GetwindowStoreData(windowviewid,'curentEthnicity'); | |
1720 | + var skinTone=$scope.GetwindowStoreData(windowviewid,'curentEthnicity'); | |
1721 | 1721 | |
1722 | 1722 | |
1723 | - var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue'); | |
1723 | + var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue'); | |
1724 | 1724 | |
1725 | - var viewid=selectBodyViewData[0]._id; | |
1726 | - var thumbImage=selectBodyViewData[0]._thumbnailImage; | |
1725 | + var viewid=selectBodyViewData[0]._id; | |
1726 | + var thumbImage=selectBodyViewData[0]._thumbnailImage; | |
1727 | 1727 | |
1728 | - var OriginalImage; | |
1729 | - if ((viewid == 1) || (viewid == 3) || (viewid== 5) || (viewid == 6) || (viewid== 7) || (viewid == 11)) | |
1730 | - { | |
1731 | - OriginalImage = ((thumbImage).replace('.jpg', '_' + skinTone + ModestyValue)) + '.jpg'; | |
1732 | - } | |
1733 | - else | |
1734 | - { | |
1735 | - OriginalImage = ((thumbImage).replace('.jpg', '_' + skinTone)) + '.jpg'; | |
1736 | - } | |
1728 | + var OriginalImage; | |
1729 | + if ((viewid == 1) || (viewid == 3) || (viewid== 5) || (viewid == 6) || (viewid== 7) || (viewid == 11)) | |
1730 | + { | |
1731 | + OriginalImage = ((thumbImage).replace('.jpg', '_' + skinTone + ModestyValue)) + '.jpg'; | |
1732 | + } | |
1733 | + else | |
1734 | + { | |
1735 | + OriginalImage = ((thumbImage).replace('.jpg', '_' + skinTone)) + '.jpg'; | |
1736 | + } | |
1737 | 1737 | |
1738 | - $rootScope.StoreOrgImageName(OriginalImage); | |
1738 | + $rootScope.StoreOrgImageName(OriginalImage); | |
1739 | 1739 | } |
1740 | 1740 | |
1741 | 1741 | $scope.LoadDefaultLayerImage = function (windowviewid) { |
... | ... | @@ -1786,23 +1786,23 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1786 | 1786 | |
1787 | 1787 | //Normal only |
1788 | 1788 | |
1789 | - $("#btnNormalMode_" + windowviewid).removeClass("btn-black"); | |
1790 | - $("#btnNormalMode_" + windowviewid).addClass("btn-primary"); | |
1789 | + $("#btnNormalMode_" + windowviewid).removeClass("btn-black"); | |
1790 | + $("#btnNormalMode_" + windowviewid).addClass("btn-primary"); | |
1791 | 1791 | |
1792 | - if (!$("#btnHighLight_" + windowviewid).hasClass("btn-black")) { | |
1793 | - $("#btnHighLight_" + windowviewid).addClass("btn-black"); | |
1794 | - } | |
1795 | - if ($("#btnHighLight_" + windowviewid).hasClass("btn-primary")) { | |
1796 | - $("#btnHighLight_" + windowviewid).removeClass("btn-primary"); | |
1797 | - } | |
1792 | + if (!$("#btnHighLight_" + windowviewid).hasClass("btn-black")) { | |
1793 | + $("#btnHighLight_" + windowviewid).addClass("btn-black"); | |
1794 | + } | |
1795 | + if ($("#btnHighLight_" + windowviewid).hasClass("btn-primary")) { | |
1796 | + $("#btnHighLight_" + windowviewid).removeClass("btn-primary"); | |
1797 | + } | |
1798 | 1798 | |
1799 | - if (!$("#btnExtract_" + windowviewid).hasClass("btn-black")) { | |
1800 | - $("#btnExtract_" + windowviewid).addClass("btn-black"); | |
1801 | - } | |
1799 | + if (!$("#btnExtract_" + windowviewid).hasClass("btn-black")) { | |
1800 | + $("#btnExtract_" + windowviewid).addClass("btn-black"); | |
1801 | + } | |
1802 | 1802 | |
1803 | - if ($("#btnExtract_" + windowviewid).hasClass("btn-primary")) { | |
1804 | - $("#btnExtract_" + windowviewid).removeClass("btn-primary"); | |
1805 | - } | |
1803 | + if ($("#btnExtract_" + windowviewid).hasClass("btn-primary")) { | |
1804 | + $("#btnExtract_" + windowviewid).removeClass("btn-primary"); | |
1805 | + } | |
1806 | 1806 | |
1807 | 1807 | } |
1808 | 1808 | else if($scope.daOpenInOtherModules.mode=='HIGHLIGHT') |
... | ... | @@ -1886,7 +1886,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1886 | 1886 | CurriculumTermData.push( |
1887 | 1887 | |
1888 | 1888 | { |
1889 | - // "transparentTermNumber": $scope.daOpenInOtherModules.callOuts[i].transparentTermNumber, | |
1889 | + // "transparentTermNumber": $scope.daOpenInOtherModules.callOuts[i].transparentTermNumber, | |
1890 | 1890 | "termNumber": $scope.daOpenInOtherModules.callOuts[i].termNumber, |
1891 | 1891 | "tips_x": $scope.daOpenInOtherModules.callOuts[i].tips_x, |
1892 | 1892 | "tips_y": $scope.daOpenInOtherModules.callOuts[i].tips_y, |
... | ... | @@ -1959,17 +1959,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1959 | 1959 | $rootScope.isLoading = true; |
1960 | 1960 | $('#spinner').css('visibility', 'visible'); |
1961 | 1961 | |
1962 | - // $scope.layerInfoForModesty = []; | |
1962 | + // $scope.layerInfoForModesty = []; | |
1963 | 1963 | $scope.SetwindowStoreData(windowviewid,'layerInfoForModesty',[]); |
1964 | 1964 | |
1965 | - //$scope.modestyImageInfo = []; | |
1966 | - $scope.SetwindowStoreData(windowviewid,'modestyImageInfo',[]); | |
1965 | + //$scope.modestyImageInfo = []; | |
1966 | + $scope.SetwindowStoreData(windowviewid,'modestyImageInfo',[]); | |
1967 | 1967 | |
1968 | - // store colorimagecanvaslist | |
1969 | - $scope.coloredImageCanvasList = []; | |
1970 | - $scope.SetwindowStoreData(windowviewid,'coloredImageCanvasList',[]); | |
1968 | + // store colorimagecanvaslist | |
1969 | + $scope.coloredImageCanvasList = []; | |
1970 | + $scope.SetwindowStoreData(windowviewid,'coloredImageCanvasList',[]); | |
1971 | 1971 | |
1972 | - // store colorimageMr canvas | |
1972 | + // store colorimageMr canvas | |
1973 | 1973 | $scope.coloredImageMRCanvasList = []; |
1974 | 1974 | $scope.SetwindowStoreData(windowviewid,'coloredImageMRCanvasList',[]); |
1975 | 1975 | |
... | ... | @@ -1982,7 +1982,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1982 | 1982 | $('#daBodyview').css('width', '100%'); |
1983 | 1983 | |
1984 | 1984 | if ($rootScope.isCallFromOtherModule) { |
1985 | - var canvasDIvHeight = parseInt($('#daImagePanel_' + windowviewid).outerHeight()) - 124; | |
1985 | + var canvasDIvHeight = parseInt($('#daImagePanel_' + windowviewid).outerHeight()) - 124; | |
1986 | 1986 | } |
1987 | 1987 | else |
1988 | 1988 | { |
... | ... | @@ -2028,7 +2028,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2028 | 2028 | |
2029 | 2029 | } |
2030 | 2030 | else { |
2031 | - $scope.ColoredImageSRC = []; | |
2031 | + $scope.ColoredImageSRC = []; | |
2032 | 2032 | $scope.SetwindowStoreData(windowviewid,'ColoredImageSRC',[]); |
2033 | 2033 | } |
2034 | 2034 | |
... | ... | @@ -2144,7 +2144,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2144 | 2144 | gender = 'F'; |
2145 | 2145 | } |
2146 | 2146 | else |
2147 | - { | |
2147 | + { | |
2148 | 2148 | gender = 'M'; |
2149 | 2149 | } |
2150 | 2150 | if (((genderId == 'Female') && (value._BodyRegionId == 2)) || (value._BodyRegionId == 3)) { |
... | ... | @@ -2178,7 +2178,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2178 | 2178 | var lowerlayerNumberForModesty = dtlOfSktn[0]._lns; |
2179 | 2179 | var HigherlayerNumberForModesty = dtlOfSktn[0]._lne; |
2180 | 2180 | var layerInfoForModesty=$scope.GetwindowStoreData(windowviewid,'layerInfoForModesty'); |
2181 | - layerInfoForModesty.push({ "bodyRegionId": value._BodyRegionId, "lowerlayerNumberForModesty": lowerlayerNumberForModesty, "HigherlayerNumberForModesty": HigherlayerNumberForModesty }) | |
2181 | + layerInfoForModesty.push({ "bodyRegionId": value._BodyRegionId, "lowerlayerNumberForModesty": lowerlayerNumberForModesty, "HigherlayerNumberForModesty": HigherlayerNumberForModesty }) | |
2182 | 2182 | |
2183 | 2183 | var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue,windowviewid); |
2184 | 2184 | |
... | ... | @@ -2214,7 +2214,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2214 | 2214 | |
2215 | 2215 | }); |
2216 | 2216 | |
2217 | - // push BodyRegionCordinatesData | |
2217 | + // push BodyRegionCordinatesData | |
2218 | 2218 | $scope.SetwindowStoreData(windowviewid,'BodyRegionCordinatesData',$scope.BodyRegionCordinatesData); |
2219 | 2219 | |
2220 | 2220 | } |
... | ... | @@ -2539,7 +2539,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2539 | 2539 | $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',true); |
2540 | 2540 | } |
2541 | 2541 | else |
2542 | - { | |
2542 | + { | |
2543 | 2543 | $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false); |
2544 | 2544 | $('#typedTermName_' + windowviewid).val(''); |
2545 | 2545 | $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []); |
... | ... | @@ -2612,7 +2612,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2612 | 2612 | |
2613 | 2613 | var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList'); |
2614 | 2614 | |
2615 | - previousHighlightList.push(RGBColor); | |
2615 | + previousHighlightList.push(RGBColor); | |
2616 | 2616 | |
2617 | 2617 | if ($scope.GetwindowStoreData(windowviewid,'isHighLight')) { |
2618 | 2618 | |
... | ... | @@ -2684,13 +2684,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2684 | 2684 | $scope.MultiLanguageAnnationArray = []; |
2685 | 2685 | |
2686 | 2686 | if (TermAnnotationText.length>0) { |
2687 | - for (var i = 0; i <= TermAnnotationText.length - 1; i++) { | |
2687 | + for (var i = 0; i <= TermAnnotationText.length - 1; i++) { | |
2688 | 2688 | |
2689 | - $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); | |
2690 | - } | |
2689 | + $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); | |
2690 | + } | |
2691 | 2691 | |
2692 | - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0,windowviewid); | |
2693 | - } | |
2692 | + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0,windowviewid); | |
2693 | + } | |
2694 | 2694 | } |
2695 | 2695 | else { |
2696 | 2696 | |
... | ... | @@ -2704,25 +2704,25 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2704 | 2704 | |
2705 | 2705 | $scope.MultiLanguageAnnationArray = []; |
2706 | 2706 | if (TermAnnotationText.length>0) { |
2707 | - for (var i = 0; i <= TermAnnotationText.length - 1; i++) { | |
2707 | + for (var i = 0; i <= TermAnnotationText.length - 1; i++) { | |
2708 | 2708 | |
2709 | - $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); | |
2710 | - } | |
2709 | + $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); | |
2710 | + } | |
2711 | 2711 | |
2712 | - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0,windowviewid); | |
2713 | - } | |
2712 | + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0,windowviewid); | |
2713 | + } | |
2714 | 2714 | } |
2715 | 2715 | else { |
2716 | 2716 | |
2717 | 2717 | $scope.MultiLanguageAnnationArray = []; |
2718 | 2718 | |
2719 | 2719 | if (TermAnnotationText.length>0) { |
2720 | - for (var i = 0; i <= TermAnnotationText.length - 1; i++) { | |
2720 | + for (var i = 0; i <= TermAnnotationText.length - 1; i++) { | |
2721 | 2721 | |
2722 | - $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); | |
2722 | + $scope.MultiLanguageAnnationArray.push(TermAnnotationText[i]); | |
2723 | + } | |
2724 | + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0,windowviewid); | |
2723 | 2725 | } |
2724 | - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0,windowviewid); | |
2725 | - } | |
2726 | 2726 | } |
2727 | 2727 | |
2728 | 2728 | |
... | ... | @@ -2844,7 +2844,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2844 | 2844 | |
2845 | 2845 | if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { |
2846 | 2846 | |
2847 | - var isEligibleForHighlight=false; | |
2847 | + var isEligibleForHighlight=false; | |
2848 | 2848 | if (((viewOrientationId == '1') || (viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) { |
2849 | 2849 | isEligibleForHighlight = true; |
2850 | 2850 | } |
... | ... | @@ -2867,7 +2867,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2867 | 2867 | // set color image data |
2868 | 2868 | $scope.SetwindowStoreData(windowviewid, 'ColoredImageSRC', $scope.ColoredImageSRC); |
2869 | 2869 | |
2870 | - // Scroll canvas based on CB data | |
2870 | + // Scroll canvas based on CB data | |
2871 | 2871 | var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); |
2872 | 2872 | if (isHighlightBodyWithCBTermData == true) { |
2873 | 2873 | $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX); |
... | ... | @@ -2939,7 +2939,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2939 | 2939 | if (FlipedImgCanvas.id.match('_mci')) { |
2940 | 2940 | |
2941 | 2941 | var maskImgData = context.getImageData(0, 0, w, h); |
2942 | - var MaskCanvasData = $scope.GetwindowStoreData(windowviewid,'MaskCanvasData'); | |
2942 | + var MaskCanvasData = $scope.GetwindowStoreData(windowviewid,'MaskCanvasData'); | |
2943 | 2943 | if ($rootScope.isOpenResourceBtnClicked) { |
2944 | 2944 | |
2945 | 2945 | MaskCanvasData.push( |
... | ... | @@ -3044,7 +3044,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3044 | 3044 | console.log('CTRL ON') |
3045 | 3045 | } |
3046 | 3046 | else |
3047 | - { | |
3047 | + { | |
3048 | 3048 | $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false); |
3049 | 3049 | $('#typedTermName_' + windowviewid).val(''); |
3050 | 3050 | |
... | ... | @@ -3122,7 +3122,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3122 | 3122 | } |
3123 | 3123 | var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList'); |
3124 | 3124 | |
3125 | - previousHighlightList.push(RGBColor); | |
3125 | + previousHighlightList.push(RGBColor); | |
3126 | 3126 | |
3127 | 3127 | if ($scope.GetwindowStoreData(windowviewid,'isHighLight') == true) { |
3128 | 3128 | if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) { |
... | ... | @@ -3368,7 +3368,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3368 | 3368 | $scope.SetwindowStoreData(windowviewid,'coloredImageCanvasList',$scope.coloredImageCanvasList); |
3369 | 3369 | // set color image data |
3370 | 3370 | $scope.SetwindowStoreData(windowviewid, 'ColoredImageSRC', $scope.ColoredImageSRC); |
3371 | - // Scroll canvas based on CB data | |
3371 | + // Scroll canvas based on CB data | |
3372 | 3372 | var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); |
3373 | 3373 | if (isHighlightBodyWithCBTermData == true) { |
3374 | 3374 | $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX); |
... | ... | @@ -3456,13 +3456,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3456 | 3456 | ); |
3457 | 3457 | } |
3458 | 3458 | else { |
3459 | - MaskCanvasData.push( | |
3460 | - { | |
3461 | - "bodyRegionId": bodyRegionId, | |
3462 | - "canvasId": imgCanvas.id, | |
3463 | - "maskData": maskImgData, | |
3464 | - } | |
3465 | - ); | |
3459 | + MaskCanvasData.push( | |
3460 | + { | |
3461 | + "bodyRegionId": bodyRegionId, | |
3462 | + "canvasId": imgCanvas.id, | |
3463 | + "maskData": maskImgData, | |
3464 | + } | |
3465 | + ); | |
3466 | 3466 | } |
3467 | 3467 | } |
3468 | 3468 | |
... | ... | @@ -3502,7 +3502,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3502 | 3502 | |
3503 | 3503 | $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false); |
3504 | 3504 | $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []); |
3505 | - // finish CB window load | |
3505 | + // finish CB window load | |
3506 | 3506 | $rootScope.DAWindowLoadComplete = true; |
3507 | 3507 | |
3508 | 3508 | } |
... | ... | @@ -3621,8 +3621,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3621 | 3621 | } |
3622 | 3622 | else if ($rootScope.isCallFromOtherModule) |
3623 | 3623 | { |
3624 | - multiTermList = $scope.GetwindowStoreData(windowviewid,'AllTerms'); | |
3625 | - // get actual term to highlight/extract body on selected region | |
3624 | + multiTermList = $scope.GetwindowStoreData(windowviewid,'AllTerms'); | |
3625 | + // get actual term to highlight/extract body on selected region | |
3626 | 3626 | selectedAnnotation= $scope.daOpenInOtherModules.selectedStructureId; |
3627 | 3627 | } |
3628 | 3628 | |
... | ... | @@ -3786,7 +3786,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3786 | 3786 | |
3787 | 3787 | else { |
3788 | 3788 | var whiteImageDataList=$scope.GetwindowStoreData(windowviewid,'whiteImageDataList'); |
3789 | - whiteImageDataList[bodyRegionId - 1] = e.data.value; | |
3789 | + whiteImageDataList[bodyRegionId - 1] = e.data.value; | |
3790 | 3790 | } |
3791 | 3791 | } |
3792 | 3792 | |
... | ... | @@ -3795,17 +3795,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3795 | 3795 | |
3796 | 3796 | $scope.EnableUI(); |
3797 | 3797 | |
3798 | - // terminate extract and term-number worker instances | |
3799 | - if ($scope.runningWorkers != null || $scope.runningWorkers != undefined) { | |
3800 | - var workerCount = $scope.runningWorkers.length; | |
3801 | - if (workerCount > 0) { | |
3802 | - for (var i = workerCount - 1; i >= 0; i--) { | |
3803 | - var runningWorker = $scope.runningWorkers[i].workerName; | |
3804 | - runningWorker.terminate(); | |
3805 | - $scope.runningWorkers.splice(i, 1); | |
3806 | - } | |
3798 | + // terminate extract and term-number worker instances | |
3799 | + if ($scope.runningWorkers != null || $scope.runningWorkers != undefined) { | |
3800 | + var workerCount = $scope.runningWorkers.length; | |
3801 | + if (workerCount > 0) { | |
3802 | + for (var i = workerCount - 1; i >= 0; i--) { | |
3803 | + var runningWorker = $scope.runningWorkers[i].workerName; | |
3804 | + runningWorker.terminate(); | |
3805 | + $scope.runningWorkers.splice(i, 1); | |
3807 | 3806 | } |
3808 | 3807 | } |
3808 | + } | |
3809 | 3809 | } |
3810 | 3810 | |
3811 | 3811 | }; |
... | ... | @@ -4031,7 +4031,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4031 | 4031 | } |
4032 | 4032 | else if (isHighlightBodyWithCBTermData == true) { |
4033 | 4033 | |
4034 | - $scope.ShowCBDataBodyView(windowviewid); | |
4034 | + $scope.ShowCBDataBodyView(windowviewid); | |
4035 | 4035 | } |
4036 | 4036 | else if (previousHighlightList != undefined && previousHighlightList.length > 0 && (isGenderChnage == true || isViewChange == true)) { |
4037 | 4037 | |
... | ... | @@ -4387,7 +4387,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4387 | 4387 | $rootScope.isLoading = false; |
4388 | 4388 | |
4389 | 4389 | $scope.EnableUI(); |
4390 | - // $('.ui-slider').slider('enable'); | |
4390 | + // $('.ui-slider').slider('enable'); | |
4391 | 4391 | $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('enable'); |
4392 | 4392 | } |
4393 | 4393 | |
... | ... | @@ -4413,10 +4413,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4413 | 4413 | $scope.removeCurrentHighlightedBodySystem(windowviewid); |
4414 | 4414 | |
4415 | 4415 | $rootScope.message = error; |
4416 | - $("#daMessageModal").modal('show'); | |
4416 | + $("#daMessageModal").modal('show'); | |
4417 | 4417 | |
4418 | - $(".notfoundSystem").draggable({ handle: ".modal-header" }); | |
4419 | - $(".modal-backdrop").css("opacity", ".5"); | |
4418 | + $(".notfoundSystem").draggable({ handle: ".modal-header" }); | |
4419 | + $(".modal-backdrop").css("opacity", ".5"); | |
4420 | 4420 | |
4421 | 4421 | |
4422 | 4422 | }); |
... | ... | @@ -4543,7 +4543,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4543 | 4543 | actualTermNo = $scope.matchedTermNoData[0]._ActualTermNumber; |
4544 | 4544 | annotationText = $scope.GetAnnotationBasedOnActualTermNo(actualTermNo, $rootScope.lexiconLanguageArray[j].language, windowviewid); |
4545 | 4545 | annotation.push(annotationText); |
4546 | - // $rootScope.annotationText.push(annotationText); | |
4546 | + // $rootScope.annotationText.push(annotationText); | |
4547 | 4547 | $scope.SetwindowStoreData(windowviewid,'TermAnnotationText',annotation); |
4548 | 4548 | $scope.SetwindowStoreData(windowviewid,'actualTermNumber',actualTermNo); |
4549 | 4549 | break; |
... | ... | @@ -4667,7 +4667,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4667 | 4667 | var transparencyBoxBottom = parseInt(TransparencyBoxStartY) + parseInt(tCanvasHeight); |
4668 | 4668 | var transparencyBoxRight = parseInt(TransparencyBoxStartX) + parseInt(tCanvasWidth); |
4669 | 4669 | |
4670 | - // var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData; | |
4670 | + // var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData; | |
4671 | 4671 | var BodyRegionDictionary = $scope.GetwindowStoreData(windowviewid,'BodyRegionCordinatesData'); |
4672 | 4672 | |
4673 | 4673 | $scope.transparencyDrawnRegions = []; |
... | ... | @@ -4804,8 +4804,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4804 | 4804 | $timeout(function () { $scope.DisableProgressBar(windowviewid) }, 2000); |
4805 | 4805 | } |
4806 | 4806 | } |
4807 | - var totalayer=$scope.GetwindowStoreData(windowviewid,'totalLayers'); | |
4808 | - var nlayer=$scope.GetwindowStoreData(windowviewid,'layerNumber'); | |
4807 | + var totalayer=$scope.GetwindowStoreData(windowviewid,'totalLayers'); | |
4808 | + var nlayer=$scope.GetwindowStoreData(windowviewid,'layerNumber'); | |
4809 | 4809 | var sliderVal = parseInt(totalayer) - parseInt(nlayer); |
4810 | 4810 | |
4811 | 4811 | console.log('inside CalculateImageCordinates. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + totalayer + '- parseInt($scope.layerNumber) ' + nlayer + 'set value: ' + sliderVal); |
... | ... | @@ -4935,8 +4935,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4935 | 4935 | console.log('not clicked on same point') |
4936 | 4936 | $scope.createSpeechBubbleBasedOnAnnotationLength(pointClicked, x, y, id, tipx, tipy,windowviewid,speechBubbleCounter); |
4937 | 4937 | |
4938 | - $scope.speechbubbleList.push({ xaxis: x, yaxis: y, ids: id }); | |
4939 | - // $scope.SetwindowStoreData(windowviewid,'speechbubbleList',$scope.speechList); | |
4938 | + $scope.speechbubbleList.push({ xaxis: x, yaxis: y, ids: id }); | |
4939 | + // $scope.SetwindowStoreData(windowviewid,'speechbubbleList',$scope.speechList); | |
4940 | 4940 | } |
4941 | 4941 | $('.appendDragg').draggable({ |
4942 | 4942 | drag: function (evt) { |
... | ... | @@ -4961,14 +4961,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4961 | 4961 | }); |
4962 | 4962 | $('.dynCross_'+windowviewid).on('click', function (evt) { |
4963 | 4963 | if ( $scope.speechbubbleList != null || $scope.speechbubbleList != undefined) { |
4964 | - var removeid=$(this).parent().parent().attr('id'); | |
4965 | - for (var m = 0; m <= $scope.speechbubbleList.length - 1; m++) { | |
4966 | - if ( $scope.speechbubbleList[m].ids == removeid) { | |
4967 | - $scope.speechbubbleList.splice(m, 1); | |
4968 | - break; | |
4964 | + var removeid=$(this).parent().parent().attr('id'); | |
4965 | + for (var m = 0; m <= $scope.speechbubbleList.length - 1; m++) { | |
4966 | + if ( $scope.speechbubbleList[m].ids == removeid) { | |
4967 | + $scope.speechbubbleList.splice(m, 1); | |
4968 | + break; | |
4969 | + } | |
4969 | 4970 | } |
4970 | 4971 | } |
4971 | - } | |
4972 | 4972 | $(this).parent().parent().parent().remove(); |
4973 | 4973 | }); |
4974 | 4974 | } |
... | ... | @@ -5018,7 +5018,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5018 | 5018 | var pointClicked_annotation = parseInt(x) + parseInt(y); |
5019 | 5019 | var Exists_annotation = $('#canvasDivDA_' + windowviewid).find("div[id=" + pointClicked_annotation + "]").length; |
5020 | 5020 | $scope.createSpeechBubbleBasedOnTransparencyWithCtrl(pointClicked_annotation, Exists_annotation, x, y, sub_id_annotation,windowviewid,TPspeechBubbleCounter); |
5021 | - $scope.speechbubbleList.push({ xaxis: x, yaxis: y, ids: sub_id_annotation }); | |
5021 | + $scope.speechbubbleList.push({ xaxis: x, yaxis: y, ids: sub_id_annotation }); | |
5022 | 5022 | $scope.SetwindowStoreData(windowviewid,'speachBubbleArrayAnnotation',$scope.speechList1); |
5023 | 5023 | $('.appendDragg_annotation').draggable({ |
5024 | 5024 | drag: function (evt) { |
... | ... | @@ -5202,8 +5202,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5202 | 5202 | console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) |
5203 | 5203 | } |
5204 | 5204 | if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) { |
5205 | - $('#sppeachBubble_'+windowviewid).css("min-width", "auto"); | |
5206 | - $('#sppeachBubble_'+windowviewid).css("white-space", "nowrap"); | |
5205 | + $('#sppeachBubble_'+windowviewid).css("min-width", "auto"); | |
5206 | + $('#sppeachBubble_'+windowviewid).css("white-space", "nowrap"); | |
5207 | 5207 | |
5208 | 5208 | } |
5209 | 5209 | } |
... | ... | @@ -5241,7 +5241,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5241 | 5241 | $("#" + sub_id_annotation).css("min-width", "auto"); |
5242 | 5242 | $("#" + sub_id_annotation).css("white-space", "nowrap"); |
5243 | 5243 | |
5244 | - } | |
5244 | + } | |
5245 | 5245 | |
5246 | 5246 | } |
5247 | 5247 | else { |
... | ... | @@ -5265,7 +5265,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5265 | 5265 | $("#" + sub_id_annotation).css("min-width", "auto"); |
5266 | 5266 | $("#" + sub_id_annotation).css("white-space", "nowrap"); |
5267 | 5267 | |
5268 | - } | |
5268 | + } | |
5269 | 5269 | } |
5270 | 5270 | else { |
5271 | 5271 | $('#canvasDivDA_' + windowviewid).find("div[id=" + pointClicked_annotation + "]").css("display", "block"); |
... | ... | @@ -5301,7 +5301,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5301 | 5301 | $('#sppeachBubble_annotation_'+windowviewid).css("min-width", "auto"); |
5302 | 5302 | $('#sppeachBubble_annotation_'+windowviewid).css("white-space", "nowrap"); |
5303 | 5303 | |
5304 | - } | |
5304 | + } | |
5305 | 5305 | } |
5306 | 5306 | else { |
5307 | 5307 | $('#sppeachBubble_annotation_'+windowviewid+" p").remove(); |
... | ... | @@ -5319,7 +5319,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5319 | 5319 | $('#sppeachBubble_annotation_'+windowviewid).css("min-width", "auto"); |
5320 | 5320 | $('#sppeachBubble_annotation_'+windowviewid).css("white-space", "nowrap"); |
5321 | 5321 | |
5322 | - } | |
5322 | + } | |
5323 | 5323 | } |
5324 | 5324 | var Globe = []; |
5325 | 5325 | Globe.push({ currentX: x, currentY: y }); |
... | ... | @@ -5624,7 +5624,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5624 | 5624 | $scope.DisableUI(); |
5625 | 5625 | |
5626 | 5626 | $scope.SetwindowStoreData(windowviewid,'layerNumberBeforeTBDraw',parseInt($('#txtLayerNumberDA_' + windowviewid).val())); |
5627 | - // $scope.layerNumberBeforeTBDraw = parseInt($('#txtLayerNumberDA_' + windowviewid).val()); | |
5627 | + // $scope.layerNumberBeforeTBDraw = parseInt($('#txtLayerNumberDA_' + windowviewid).val()); | |
5628 | 5628 | |
5629 | 5629 | //draw temp box to store the canvas data with original transparecy |
5630 | 5630 | if (document.getElementById('tempCanvas_' + windowviewid) != null) { |
... | ... | @@ -6248,27 +6248,27 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6248 | 6248 | var winid = (modestyTransCanvases[j].id).split("_")[len-1]; |
6249 | 6249 | if(winid==windowviewid) |
6250 | 6250 | { |
6251 | - if (modestyTransCanvases[j].id.match(bodyRegionId)) { | |
6251 | + if (modestyTransCanvases[j].id.match(bodyRegionId)) { | |
6252 | 6252 | |
6253 | - var modestyCanavs = document.getElementById(modestyTransCanvases[j].id); | |
6253 | + var modestyCanavs = document.getElementById(modestyTransCanvases[j].id); | |
6254 | 6254 | |
6255 | - if (isModestyOn == true && (parseInt(lowerlayerNumberForModesty) <= parseInt( $scope.GetwindowStoreData(windowviewid,'layerNumber'))) | |
6256 | - && (HigherlayerNumberForModesty) > parseInt($scope.GetwindowStoreData(windowviewid,'layerNumber'))) { | |
6255 | + if (isModestyOn == true && (parseInt(lowerlayerNumberForModesty) <= parseInt( $scope.GetwindowStoreData(windowviewid,'layerNumber'))) | |
6256 | + && (HigherlayerNumberForModesty) > parseInt($scope.GetwindowStoreData(windowviewid,'layerNumber'))) { | |
6257 | 6257 | |
6258 | - $rootScope.isTBLayerLessSeven = true; | |
6258 | + $rootScope.isTBLayerLessSeven = true; | |
6259 | 6259 | |
6260 | - modestyCanavs.style.visibility = 'visible'; | |
6260 | + modestyCanavs.style.visibility = 'visible'; | |
6261 | 6261 | |
6262 | - } | |
6263 | - else { | |
6262 | + } | |
6263 | + else { | |
6264 | 6264 | |
6265 | - $rootScope.isTBLayerLessSeven = false; | |
6266 | - modestyCanavs.style.visibility = 'hidden'; | |
6265 | + $rootScope.isTBLayerLessSeven = false; | |
6266 | + modestyCanavs.style.visibility = 'hidden'; | |
6267 | 6267 | |
6268 | 6268 | |
6269 | + } | |
6269 | 6270 | } |
6270 | 6271 | } |
6271 | - } | |
6272 | 6272 | |
6273 | 6273 | } |
6274 | 6274 | } |
... | ... | @@ -6612,55 +6612,55 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6612 | 6612 | var winid = (modestyTransCanvases[j].id).split("_")[len-1]; |
6613 | 6613 | if(winid==windowviewid) |
6614 | 6614 | { |
6615 | - var modctx = document.getElementById(modestyTransCanvases[j].id).getContext('2d'); | |
6616 | - var modimageDa = modctx.getImageData(0, 0, modestyTransCanvases[j].width, modestyTransCanvases[j].height); | |
6615 | + var modctx = document.getElementById(modestyTransCanvases[j].id).getContext('2d'); | |
6616 | + var modimageDa = modctx.getImageData(0, 0, modestyTransCanvases[j].width, modestyTransCanvases[j].height); | |
6617 | 6617 | |
6618 | - var modimageData = modimageDa.data; | |
6619 | - var length = modimageData.length; | |
6620 | - | |
6621 | - if (isHighLight) { | |
6622 | - var c = 0; | |
6623 | - for (var i = 0; i < modimageData.length; i += 4) { | |
6624 | - if (modimageData[i] == modimageData[i + 1] && modimageData[i + 1] == modimageData[i + 2] && modimageData[i + 2] === 0) { | |
6625 | - modimageData[i + 3] = 0; | |
6626 | - } | |
6618 | + var modimageData = modimageDa.data; | |
6619 | + var length = modimageData.length; | |
6620 | + | |
6621 | + if (isHighLight) { | |
6622 | + var c = 0; | |
6623 | + for (var i = 0; i < modimageData.length; i += 4) { | |
6624 | + if (modimageData[i] == modimageData[i + 1] && modimageData[i + 1] == modimageData[i + 2] && modimageData[i + 2] === 0) { | |
6625 | + modimageData[i + 3] = 0; | |
6626 | + } | |
6627 | 6627 | |
6628 | + } | |
6629 | + modctx.putImageData(modimageDa, 0, 0); | |
6630 | + // } | |
6628 | 6631 | } |
6629 | - modctx.putImageData(modimageDa, 0, 0); | |
6630 | - // } | |
6631 | - } | |
6632 | - // set every fourth value to desired transparency | |
6633 | - var ctx1 = document.getElementById(modestyTransCanvases[j].id).getContext('2d'); | |
6634 | - var imageDa1 = ctx1.getImageData(0, 0, modestyTransCanvases[j].width, modestyTransCanvases[j].height); | |
6632 | + // set every fourth value to desired transparency | |
6633 | + var ctx1 = document.getElementById(modestyTransCanvases[j].id).getContext('2d'); | |
6634 | + var imageDa1 = ctx1.getImageData(0, 0, modestyTransCanvases[j].width, modestyTransCanvases[j].height); | |
6635 | 6635 | |
6636 | - var imageData1 = imageDa1.data; | |
6637 | - var length = imageData1.length; | |
6636 | + var imageData1 = imageDa1.data; | |
6637 | + var length = imageData1.length; | |
6638 | 6638 | |
6639 | - for (var i = 3; i < length; i += 4) { | |
6639 | + for (var i = 3; i < length; i += 4) { | |
6640 | 6640 | |
6641 | - if (bodyVid == "9" || bodyVid == "11") { | |
6641 | + if (bodyVid == "9" || bodyVid == "11") { | |
6642 | 6642 | |
6643 | - if (imageData1[i] == 0) { | |
6643 | + if (imageData1[i] == 0) { | |
6644 | 6644 | |
6645 | + } | |
6646 | + else { | |
6647 | + imageData1[i] = ((255) * (parseInt(transNumber))) / 100; | |
6648 | + } | |
6645 | 6649 | } |
6646 | 6650 | else { |
6647 | - imageData1[i] = ((255) * (parseInt(transNumber))) / 100; | |
6648 | - } | |
6649 | - } | |
6650 | - else { | |
6651 | - if (imageData1[i] == 0) { | |
6651 | + if (imageData1[i] == 0) { | |
6652 | 6652 | |
6653 | + } | |
6654 | + else | |
6655 | + imageData1[i] = ((255) * (parseInt(transNumber))) / 100; | |
6653 | 6656 | } |
6654 | - else | |
6655 | - imageData1[i] = ((255) * (parseInt(transNumber))) / 100; | |
6657 | + | |
6656 | 6658 | } |
6659 | + // after the manipulation, reset the data | |
6660 | + // and put the imagedata back to the canvas | |
6657 | 6661 | |
6662 | + ctx1.putImageData(imageDa1, 0, 0); | |
6658 | 6663 | } |
6659 | - // after the manipulation, reset the data | |
6660 | - // and put the imagedata back to the canvas | |
6661 | - | |
6662 | - ctx1.putImageData(imageDa1, 0, 0); | |
6663 | - } | |
6664 | 6664 | } |
6665 | 6665 | } |
6666 | 6666 | |
... | ... | @@ -6806,7 +6806,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6806 | 6806 | } |
6807 | 6807 | |
6808 | 6808 | $rootScope.setSelectedBodyRegionData = function (windowviewid) { |
6809 | - // var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData; | |
6809 | + // var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData; | |
6810 | 6810 | var BodyRegionDictionary = $scope.GetwindowStoreData(windowviewid,'BodyRegionCordinatesData'); |
6811 | 6811 | var bodyVid= $scope.GetwindowStoreData(windowviewid,'voId') |
6812 | 6812 | $.each(BodyRegionDictionary, function (index, value) { |
... | ... | @@ -7219,18 +7219,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7219 | 7219 | pixelDataTrans = maskCanvasContexttrans.getImageData(Math.round(actulalX - x), Math.round(actualY - y), 1, 1); |
7220 | 7220 | var annotations = $scope.getAnnotationForTransparencyBox(pixelData, pixelDataTrans, $scope,windowviewid); |
7221 | 7221 | |
7222 | - $scope.annotationTextArrayT1 = []; | |
7223 | - $scope.annotationTextArrayT2 = []; | |
7224 | - for (var i = 0; i <= $rootScope.annotationTextForTrans1.length - 1; i++) { | |
7225 | - $scope.annotationTextArrayT1.push($rootScope.annotationTextForTrans1[i]); | |
7226 | - } | |
7227 | - for (var i = 0; i <= $rootScope.annotationTextForTrans2.length - 1; i++) { | |
7228 | - $scope.annotationTextArrayT2.push($rootScope.annotationTextForTrans2[i]); | |
7229 | - } | |
7230 | - var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText'); | |
7231 | - if (TermAnnotationText.length > 0) { | |
7222 | + $scope.annotationTextArrayT1 = []; | |
7223 | + $scope.annotationTextArrayT2 = []; | |
7224 | + for (var i = 0; i <= $rootScope.annotationTextForTrans1.length - 1; i++) { | |
7225 | + $scope.annotationTextArrayT1.push($rootScope.annotationTextForTrans1[i]); | |
7226 | + } | |
7227 | + for (var i = 0; i <= $rootScope.annotationTextForTrans2.length - 1; i++) { | |
7228 | + $scope.annotationTextArrayT2.push($rootScope.annotationTextForTrans2[i]); | |
7229 | + } | |
7230 | + var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText'); | |
7231 | + if (TermAnnotationText.length > 0) { | |
7232 | 7232 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, false, 0, 0,windowviewid); |
7233 | - } | |
7233 | + } | |
7234 | 7234 | } |
7235 | 7235 | |
7236 | 7236 | |
... | ... | @@ -7358,18 +7358,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7358 | 7358 | |
7359 | 7359 | var annotations = $scope.getAnnotationForTransparencyBox(pixelData, pixelDataTrans, $scope,windowviewid); |
7360 | 7360 | |
7361 | - $scope.annotationTextArrayT1 = []; | |
7362 | - $scope.annotationTextArrayT2 = []; | |
7363 | - for (var i = 0; i <= $rootScope.annotationTextForTrans1.length - 1; i++) { | |
7364 | - $scope.annotationTextArrayT1.push($rootScope.annotationTextForTrans1[i]); | |
7365 | - } | |
7366 | - for (var i = 0; i <= $rootScope.annotationTextForTrans2.length - 1; i++) { | |
7367 | - $scope.annotationTextArrayT2.push($rootScope.annotationTextForTrans2[i]); | |
7368 | - } | |
7369 | - var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText'); | |
7370 | - if (TermAnnotationText.length > 0) { | |
7361 | + $scope.annotationTextArrayT1 = []; | |
7362 | + $scope.annotationTextArrayT2 = []; | |
7363 | + for (var i = 0; i <= $rootScope.annotationTextForTrans1.length - 1; i++) { | |
7364 | + $scope.annotationTextArrayT1.push($rootScope.annotationTextForTrans1[i]); | |
7365 | + } | |
7366 | + for (var i = 0; i <= $rootScope.annotationTextForTrans2.length - 1; i++) { | |
7367 | + $scope.annotationTextArrayT2.push($rootScope.annotationTextForTrans2[i]); | |
7368 | + } | |
7369 | + var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText'); | |
7370 | + if (TermAnnotationText.length > 0) { | |
7371 | 7371 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, evt.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, false, 0, 0,windowviewid); |
7372 | - } | |
7372 | + } | |
7373 | 7373 | } |
7374 | 7374 | |
7375 | 7375 | |
... | ... | @@ -7561,7 +7561,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7561 | 7561 | // $rootScope.switchCanvas(); |
7562 | 7562 | //To enable extract button |
7563 | 7563 | $scope.SetwindowStoreData(windowviewid,'isTransparencyActivated',false); |
7564 | - // $rootScope.isTransparencyActivated = false; | |
7564 | + // $rootScope.isTransparencyActivated = false; | |
7565 | 7565 | $("#btnExtract_" + windowviewid).removeClass("disabled"); |
7566 | 7566 | $("#btnExtract_" + windowviewid).css("pointer-events", "auto"); |
7567 | 7567 | |
... | ... | @@ -7617,7 +7617,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7617 | 7617 | |
7618 | 7618 | var tempCanvases = $("canvas[id*='transparencyTempCanvas']"); |
7619 | 7619 | for (var i = 0; i < tempCanvases.length; i++) { |
7620 | - var len= (tempCanvases[i].id).split("_").length; | |
7620 | + var len= (tempCanvases[i].id).split("_").length; | |
7621 | 7621 | var winid = (tempCanvases[i].id).split("_")[len-1]; |
7622 | 7622 | if(winid==windowviewid) |
7623 | 7623 | { |
... | ... | @@ -7813,7 +7813,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7813 | 7813 | } |
7814 | 7814 | } |
7815 | 7815 | else |
7816 | - { | |
7816 | + { | |
7817 | 7817 | var zoomVal = $('#zoomValueDA_' +windowviewid).val(); |
7818 | 7818 | if (zoomVal == 25) { |
7819 | 7819 | $scope.SetwindowStoreData(windowviewid,'zoomInOut',75); |
... | ... | @@ -8113,20 +8113,20 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8113 | 8113 | var candivScrollTop=$('#canvasDivDA_' + windowviewid).scrollTop(); |
8114 | 8114 | |
8115 | 8115 | // Fix Navigator position by CanvasDiv Scrolling |
8116 | - var can = $("#canvasDivDA_" + windowviewid); | |
8117 | - var canheight = can[0].scrollHeight; | |
8118 | - var canwidth = can[0].scrollWidth; | |
8116 | + var can = $("#canvasDivDA_" + windowviewid); | |
8117 | + var canheight = can[0].scrollHeight; | |
8118 | + var canwidth = can[0].scrollWidth; | |
8119 | 8119 | |
8120 | - var dragDivTop= (candivScrollTop/canheight)*($('#navigatorDiv_' + windowviewid).height()); | |
8121 | - var dragDivLeft= (candivScrollleft/canwidth)*($('#navigatorDiv_' + windowviewid).width()); | |
8120 | + var dragDivTop= (candivScrollTop/canheight)*($('#navigatorDiv_' + windowviewid).height()); | |
8121 | + var dragDivLeft= (candivScrollleft/canwidth)*($('#navigatorDiv_' + windowviewid).width()); | |
8122 | 8122 | |
8123 | 8123 | |
8124 | - $("#draggable_" + windowviewid).css('top', dragDivTop); | |
8125 | - $("#draggable_" + windowviewid).css('left', dragDivLeft>40?40:dragDivLeft); | |
8124 | + $("#draggable_" + windowviewid).css('top', dragDivTop); | |
8125 | + $("#draggable_" + windowviewid).css('left', dragDivLeft>40?40:dragDivLeft); | |
8126 | 8126 | |
8127 | 8127 | |
8128 | - $scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',candivScrollleft); | |
8129 | - $scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',candivScrollTop); | |
8128 | + $scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',candivScrollleft); | |
8129 | + $scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',candivScrollTop); | |
8130 | 8130 | |
8131 | 8131 | |
8132 | 8132 | }); |
... | ... | @@ -8304,18 +8304,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8304 | 8304 | if (doHighlightOrExtract == true) { |
8305 | 8305 | $scope.loopcounter=0; |
8306 | 8306 | var AllTerms=$scope.GetwindowStoreData(windowviewid,'AllTerms'); |
8307 | - $scope.whiteImageDataList = []; | |
8308 | - $scope.SetwindowStoreData(windowviewid,'whiteImageDataList',[]); | |
8309 | - $scope.whiteImageMRDataList = []; | |
8310 | - $scope.SetwindowStoreData(windowviewid,'whiteImageMRDataList',[]); | |
8311 | - $scope.grayImageDataList = []; | |
8312 | - $scope.SetwindowStoreData(windowviewid,'grayImageDataList',[]); | |
8313 | - $scope.grayImageMRDataList = []; | |
8314 | - $scope.SetwindowStoreData(windowviewid,'grayImageMRDataList',[]); | |
8315 | - | |
8316 | - // not using | |
8307 | + $scope.whiteImageDataList = []; | |
8308 | + $scope.SetwindowStoreData(windowviewid,'whiteImageDataList',[]); | |
8309 | + $scope.whiteImageMRDataList = []; | |
8310 | + $scope.SetwindowStoreData(windowviewid,'whiteImageMRDataList',[]); | |
8311 | + $scope.grayImageDataList = []; | |
8312 | + $scope.SetwindowStoreData(windowviewid,'grayImageDataList',[]); | |
8313 | + $scope.grayImageMRDataList = []; | |
8314 | + $scope.SetwindowStoreData(windowviewid,'grayImageMRDataList',[]); | |
8315 | + | |
8316 | + // not using | |
8317 | 8317 | // $scope.SetwindowStoreData(windowviewid,'updatedWhiteImageDataList',[]); |
8318 | - // $scope.SetwindowStoreData(windowviewid,'updatedWhiteImageMRDataList',[]); | |
8318 | + // $scope.SetwindowStoreData(windowviewid,'updatedWhiteImageMRDataList',[]); | |
8319 | 8319 | |
8320 | 8320 | |
8321 | 8321 | var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList'); |
... | ... | @@ -8572,7 +8572,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8572 | 8572 | |
8573 | 8573 | $timeout(function () { |
8574 | 8574 | $scope.DisableUI(); |
8575 | - $scope.HighlightBodyOnExtract(windowviewid) }, 50); | |
8575 | + $scope.HighlightBodyOnExtract(windowviewid) }, 50); | |
8576 | 8576 | |
8577 | 8577 | } |
8578 | 8578 | else if (isHighlightBodyByBodySystem == true || isbodySystemHighlight == true) { |
... | ... | @@ -8731,14 +8731,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8731 | 8731 | |
8732 | 8732 | $timeout(function () { |
8733 | 8733 | $scope.DisableUI(); |
8734 | - $scope.HighlightBodyOnExtract(windowviewid) }, 50); | |
8734 | + $scope.HighlightBodyOnExtract(windowviewid) }, 50); | |
8735 | 8735 | |
8736 | 8736 | } |
8737 | 8737 | else if (isListManagerSelected == true) { |
8738 | 8738 | console.log('2. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') |
8739 | 8739 | $timeout(function () { |
8740 | 8740 | $scope.DisableUI(); |
8741 | - $scope.HighlightBodyOnExtract(windowviewid) }, 50); | |
8741 | + $scope.HighlightBodyOnExtract(windowviewid) }, 50); | |
8742 | 8742 | |
8743 | 8743 | } |
8744 | 8744 | else if (isHighlightBodyByBodySystem == true || isbodySystemHighlight == true) { |
... | ... | @@ -8748,7 +8748,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8748 | 8748 | { |
8749 | 8749 | $timeout(function () { |
8750 | 8750 | $scope.DisableUI(); |
8751 | - $scope.HighlightBodyOnExtract(windowviewid) }, 50); | |
8751 | + $scope.HighlightBodyOnExtract(windowviewid) }, 50); | |
8752 | 8752 | } |
8753 | 8753 | else { |
8754 | 8754 | $rootScope.isLoading = false; |
... | ... | @@ -9005,8 +9005,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9005 | 9005 | $scope.SetwindowStoreData(windowviewid,'currentViewTitle',currentViewTitle); |
9006 | 9006 | localStorage.setItem("currentViewTitle", currentViewTitle); // use at home controller |
9007 | 9007 | |
9008 | - // store image for export | |
9009 | - $rootScope.StoreTitleName(currentViewTitle); | |
9008 | + // store image for export | |
9009 | + $rootScope.StoreTitleName(currentViewTitle); | |
9010 | 9010 | |
9011 | 9011 | $rootScope.isLoading = true; |
9012 | 9012 | |
... | ... | @@ -9072,16 +9072,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9072 | 9072 | |
9073 | 9073 | if($rootScope.isCallFromOtherModule) |
9074 | 9074 | { |
9075 | - var cLayer= $scope.GetwindowStoreData(windowviewid,'layerNumber'); | |
9075 | + var cLayer= $scope.GetwindowStoreData(windowviewid,'layerNumber'); | |
9076 | 9076 | |
9077 | - if(cLayer>totalLayer) | |
9078 | - { | |
9079 | - $scope.SetwindowStoreData(windowviewid,'layerNumber',totalLayer); | |
9080 | - } | |
9077 | + if(cLayer>totalLayer) | |
9078 | + { | |
9079 | + $scope.SetwindowStoreData(windowviewid,'layerNumber',totalLayer); | |
9080 | + } | |
9081 | 9081 | } |
9082 | 9082 | else |
9083 | 9083 | { |
9084 | - $scope.SetwindowStoreData(windowviewid,'layerNumber',0); | |
9084 | + $scope.SetwindowStoreData(windowviewid,'layerNumber',0); | |
9085 | 9085 | |
9086 | 9086 | } |
9087 | 9087 | |
... | ... | @@ -9091,7 +9091,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9091 | 9091 | DataService.getAnotherJson(termJsonPath) |
9092 | 9092 | .then( |
9093 | 9093 | function (result) { |
9094 | - var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); | |
9094 | + var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); | |
9095 | 9095 | $scope.SetwindowStoreData(windowviewid,'TermNumberData',result); |
9096 | 9096 | var isViewChange=$scope.GetwindowStoreData(windowviewid,'isViewChange'); |
9097 | 9097 | var isGenderChnage=$scope.GetwindowStoreData(windowviewid,'isGenderChnage'); |
... | ... | @@ -9109,12 +9109,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9109 | 9109 | } |
9110 | 9110 | else if (previousHighlightList != null && previousHighlightList.length > 0 && |
9111 | 9111 | (isGenderChnage == true || isViewChange == true)) |
9112 | - { | |
9112 | + { | |
9113 | 9113 | $scope.SetwindowStoreData(windowviewid,'AllTerms',[]); |
9114 | 9114 | $scope.SetwindowStoreData(windowviewid,'isHighLight',true); |
9115 | 9115 | var TermNData=$scope.GetwindowStoreData(windowviewid,'TermNumberData'); |
9116 | 9116 | if (TermNData != undefined) { |
9117 | - var actualTermNumber=$scope.GetwindowStoreData(windowviewid,'actualTermNumber'); | |
9117 | + var actualTermNumber=$scope.GetwindowStoreData(windowviewid,'actualTermNumber'); | |
9118 | 9118 | $scope.TermList = $scope.getTermNumberList(actualTermNumber,windowviewid); |
9119 | 9119 | if ($scope.TermList != null && $scope.TermList.length > 0) { |
9120 | 9120 | $scope.setLayerNumberAndHighlightByTermList(windowviewid); |
... | ... | @@ -9331,13 +9331,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9331 | 9331 | } |
9332 | 9332 | ); |
9333 | 9333 | |
9334 | - // store image for export | |
9335 | - $rootScope.StoreTitleName(currentViewTitle); | |
9334 | + // store image for export | |
9335 | + $rootScope.StoreTitleName(currentViewTitle); | |
9336 | 9336 | |
9337 | 9337 | var viewtarget = angular.element(event.currentTarget); |
9338 | 9338 | var title_drop_view = viewtarget.attr('title'); |
9339 | 9339 | |
9340 | - $scope.setActiveview(windowviewid,title_drop_view); | |
9340 | + $scope.setActiveview(windowviewid,title_drop_view); | |
9341 | 9341 | |
9342 | 9342 | $rootScope.CloseAnnotationTool(); |
9343 | 9343 | $('#typedTermName_' + windowviewid).val(''); |
... | ... | @@ -9491,7 +9491,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9491 | 9491 | .then( |
9492 | 9492 | function (result) { |
9493 | 9493 | $scope.SetwindowStoreData(windowviewid,'BodySystemData',result); |
9494 | - // $rootScope.BodySystemData = result; | |
9494 | + // $rootScope.BodySystemData = result; | |
9495 | 9495 | |
9496 | 9496 | }, |
9497 | 9497 | function (error) { |
... | ... | @@ -9542,11 +9542,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9542 | 9542 | $scope.SetwindowStoreData(windowviewid,'isHighlightBodyByBodySystem',true); |
9543 | 9543 | // no $scope.systemMatchedTermList using ,getting from service // birendra |
9544 | 9544 | |
9545 | - // var BodySystemData=$scope.GetwindowStoreData(windowviewid,'BodySystemData'); | |
9546 | - // $scope.systemMatchedTermList = new jinqJs() | |
9547 | - // .from(BodySystemData.BodySystem.BodySystemTerm) | |
9548 | - // .where('_SystemNumber == ' + event.currentTarget.id) | |
9549 | - // .select(); | |
9545 | + // var BodySystemData=$scope.GetwindowStoreData(windowviewid,'BodySystemData'); | |
9546 | + // $scope.systemMatchedTermList = new jinqJs() | |
9547 | + // .from(BodySystemData.BodySystem.BodySystemTerm) | |
9548 | + // .where('_SystemNumber == ' + event.currentTarget.id) | |
9549 | + // .select(); | |
9550 | 9550 | |
9551 | 9551 | if ($scope.GetwindowStoreData(windowviewid,'isHighLight') == false) { |
9552 | 9552 | //color the body gray |
... | ... | @@ -9623,21 +9623,47 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9623 | 9623 | |
9624 | 9624 | $scope.removeCurrentHighlightedBodySystem = function (windowviewid) { |
9625 | 9625 | var grayImageDataList=$scope.GetwindowStoreData(windowviewid,'grayImageDataList'); |
9626 | - for (var i = 0; i < grayImageDataList.length; i++) { | |
9627 | - var grayCanvasID = 'imageCanvas' + parseInt(i + 1) + "_" + windowviewid; | |
9628 | - var grayCanvas = document.getElementById(grayCanvasID); | |
9626 | + | |
9627 | + var grayImageMRDataList = $scope.GetwindowStoreData(windowviewid, 'grayImageMRDataList'); | |
9629 | 9628 | |
9630 | - if (grayCanvas != null) { | |
9631 | - var grayCanvasContext = grayCanvas.getContext("2d"); | |
9629 | + var ColoredImageSRC = $scope.GetwindowStoreData(windowviewid, 'ColoredImageSRC'); | |
9630 | + console.log('ColoredImageSRC length before gray= ' + ColoredImageSRC.length) | |
9631 | + | |
9632 | + angular.forEach(ColoredImageSRC, function (value, key) { | |
9633 | + var grayCanvasID; | |
9634 | + if (value.haveMirror == 'true') { | |
9635 | + grayCanvasID = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid; | |
9636 | + | |
9637 | + var grayCanvasMR = document.getElementById(grayCanvasID); | |
9632 | 9638 | |
9633 | - var canvasHeight = grayCanvas.height; | |
9634 | - var canvasWidth = grayCanvas.width; | |
9635 | - grayCanvasContext.clearRect(0, 0, canvasHeight, canvasWidth) | |
9636 | - grayCanvasContext.putImageData(grayImageDataList[parseInt(i)], 0, 0); | |
9639 | + if (grayCanvasMR != null) { | |
9640 | + var grayCanvasContextMR = grayCanvasMR.getContext("2d"); | |
9641 | + var canvasHeight = grayCanvasMR.height; | |
9642 | + var canvasWidth = grayCanvasMR.width; | |
9643 | + grayCanvasContextMR.clearRect(0, 0, canvasHeight, canvasWidth); | |
9644 | + grayCanvasContextMR.putImageData(grayImageMRDataList[parseInt(value.bodyRegionId)], 0, 0); | |
9645 | + } | |
9637 | 9646 | } |
9638 | - } | |
9639 | - } | |
9647 | + else | |
9648 | + { | |
9649 | + grayCanvasID = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid; | |
9650 | + | |
9651 | + var grayCanvas = document.getElementById(grayCanvasID); | |
9652 | + | |
9653 | + if (grayCanvas != null) { | |
9654 | + var grayCanvasContext = grayCanvas.getContext("2d"); | |
9640 | 9655 | |
9656 | + var canvasHeight = grayCanvas.height; | |
9657 | + var canvasWidth = grayCanvas.width; | |
9658 | + grayCanvasContext.clearRect(0, 0, canvasHeight, canvasWidth) | |
9659 | + grayCanvasContext.putImageData(grayImageDataList[parseInt(value.bodyRegionId) - 1], 0, 0); | |
9660 | + } | |
9661 | + } | |
9662 | + | |
9663 | + }); | |
9664 | + | |
9665 | + }; | |
9666 | + | |
9641 | 9667 | $scope.removeBodySyetemSelectionClass = function (windowviewid,title_highlightbody) { |
9642 | 9668 | |
9643 | 9669 | $('#CurrentStructure_'+windowviewid).removeClass("active"); |
... | ... | @@ -9711,7 +9737,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9711 | 9737 | if (vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != null || vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != undefined) |
9712 | 9738 | console.log('$scope.VocabTermTxt.length= ' + vocabTermDataArray[primaryLexiconIndx].vocabTermTxt.length) |
9713 | 9739 | $scope.IsSearchVisible = true; |
9714 | - $timeout(function () { | |
9740 | + | |
9715 | 9741 | var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); |
9716 | 9742 | if ((vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != null || vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != undefined) && (vocabTermDataArray[0].vocabTermTxt.length > 0)) { |
9717 | 9743 | //This is added as the $scope.VocabTermTxt can change while changing view also the li elements need to be removed |
... | ... | @@ -9746,7 +9772,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9746 | 9772 | |
9747 | 9773 | console.log("primary language: " + vocabTermDataArray[primaryLexiconIndx].language); |
9748 | 9774 | |
9749 | - $timeout(function () { | |
9750 | 9775 | $rootScope.a = primaryLexiconIndx; |
9751 | 9776 | |
9752 | 9777 | $scope.vocabArray = vocabTermDataArray; |
... | ... | @@ -9762,8 +9787,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9762 | 9787 | |
9763 | 9788 | $("#termlistfilter_" + windowviewid).css("display", "block"); |
9764 | 9789 | |
9765 | - }, 150);//Bug#39757 | |
9766 | - | |
9767 | 9790 | $timeout(function () { |
9768 | 9791 | |
9769 | 9792 | $("#termlistfilter_" + windowviewid + " > li").each(function (key, value) { |
... | ... | @@ -9785,8 +9808,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9785 | 9808 | else { |
9786 | 9809 | $rootScope.loadSearchData(windowviewid); |
9787 | 9810 | } |
9788 | - }, 500); | |
9789 | - | |
9811 | + | |
9790 | 9812 | } |
9791 | 9813 | |
9792 | 9814 | |
... | ... | @@ -10602,18 +10624,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10602 | 10624 | |
10603 | 10625 | var len = (event.target.id).split("_").length; |
10604 | 10626 | var windowviewid = (event.target.id).split("_")[len - 1]; |
10605 | - | |
10606 | - var oldtimestamp = $scope.GetwindowStoreData(windowviewid, 'SearchTimeStampValue'); | |
10607 | - | |
10608 | - //var newSearchValue = $("#typedTermName_" + windowviewid).val(); | |
10627 | + | |
10609 | 10628 | var date = new Date(); |
10610 | 10629 | var newtimestamp = date.getTime(); |
10611 | 10630 | |
10612 | - // console.log('search text value: ' + newSearchValue); | |
10613 | - | |
10614 | 10631 | var oldtimestamp = $scope.GetwindowStoreData(windowviewid, 'SearchTimeStampValue'); |
10615 | 10632 | |
10616 | - if ((newtimestamp - oldtimestamp) > 1000) { | |
10633 | + if ((newtimestamp - oldtimestamp) > 500) { | |
10617 | 10634 | |
10618 | 10635 | $scope.SetwindowStoreData(windowviewid, 'SearchTimeStampValue', newtimestamp); |
10619 | 10636 | $scope.showFilteredTerms(windowviewid); |
... | ... | @@ -10621,23 +10638,27 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10621 | 10638 | |
10622 | 10639 | } |
10623 | 10640 | |
10624 | - | |
10625 | 10641 | $scope.showFilteredTerms = function (windowviewid) { |
10626 | 10642 | |
10627 | - console.log('showFilteredTerms is called' ); | |
10643 | + // console.log('showFilteredTerms is called' ); | |
10628 | 10644 | |
10629 | 10645 | $('#searchListDiv_' + windowviewid).empty(); |
10630 | 10646 | |
10631 | - var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray'); | |
10632 | - $scope.vocabArray = vocabTermDataArray; | |
10633 | - $rootScope.a = $scope.GetwindowStoreData(windowviewid, 'primaryLexiconInd'); | |
10647 | + var lexiconInd = $scope.GetwindowStoreData(windowviewid, 'primaryLexiconInd'); | |
10648 | + | |
10649 | + var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray')[lexiconInd].vocabTermTxt; | |
10650 | + | |
10634 | 10651 | |
10635 | - $scope.sFilter = $("#typedTermName_" + windowviewid).val();; | |
10636 | - var $e2 = $('<ul id="termlistfilter_' + windowviewid + '" class="form-control dropdown-menu ng-scope" style="height:132px;width:100%;overflow-y:scroll;position:absolute;display:block;z-index:60001;"><li class="ng-scope" ng-repeat="item in vocabArray[a].vocabTermTxt| filter:{ _TermText: sFilter}| limitTo : 10">' + | |
10637 | - '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' + | |
10638 | - ' </li></ul>').appendTo('#searchListDiv_' + windowviewid); | |
10652 | + var searchvalue = $("#typedTermName_" + windowviewid).val(); | |
10653 | + var searchfilterdata = $filter('filter')(vocabTermDataArray, searchvalue); | |
10654 | + $scope.limitTofilterdata = $filter('limitTo')(searchfilterdata, 10); | |
10655 | + | |
10656 | + var $e2 = $('<ul id="termlistfilter_' + windowviewid + '" class="form-control dropdown-menu ng-scope" style="height:132px;width:100%;overflow-y:scroll;position:absolute;display:block;z-index:60001;"><li class="ng-scope" ng-repeat="item in limitTofilterdata">' + | |
10657 | + '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' + | |
10658 | + ' </li></ul>').appendTo('#searchListDiv_' + windowviewid); | |
10639 | 10659 | $compile($e2)($scope); |
10640 | 10660 | |
10661 | + | |
10641 | 10662 | $("#termlistfilter_" + windowviewid).css("display", "block"); |
10642 | 10663 | |
10643 | 10664 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
... | ... | @@ -12,6 +12,7 @@ moduleDataObj.AAData = []; |
12 | 12 | moduleDataObj.DAData = []; |
13 | 13 | moduleDataObj.CAData = []; |
14 | 14 | moduleDataObj.CIData = []; |
15 | +moduleDataObj.CAData = []; | |
15 | 16 | |
16 | 17 | AIA.service('ModuleService', function ($http, DataService) { |
17 | 18 | return { |
... | ... | @@ -139,11 +140,32 @@ AIA.service('ModuleService', function ($http, DataService) { |
139 | 140 | return moduleDataObj.DAData; |
140 | 141 | else if (moduleName == "CLINICAL_ILLUSTRATIONS") |
141 | 142 | return moduleDataObj.CIData; |
143 | + else if (moduleName == "CLINICAL_ANIMATIONS") | |
144 | + return moduleDataObj.CAData; | |
142 | 145 | }, |
143 | 146 | |
144 | 147 | setModuleData: function (windowData, windowId, SlideNo) { |
145 | 148 | |
146 | - if (windowData.mType == "CLINICAL_ILLUSTRATIONS") { | |
149 | + if (windowData.mType == "CLINICAL_ANIMATIONS") { | |
150 | + moduleDataObj.CAData.push({ | |
151 | + slideId: SlideNo, | |
152 | + currentWindowId: windowId, | |
153 | + mType: windowData.mType, | |
154 | + containsCapturedContent: windowData.containsCapturedContent, | |
155 | + textVisible: windowData.textVisible, | |
156 | + anatomyTitle: windowData.windowTitle, | |
157 | + horizontalScroll: windowData.scrollFlvPosition.horizontal + 'px', | |
158 | + verticalScroll: windowData.scrollFlvPosition.vertical + 'px', | |
159 | + imageId: windowData.imageId, | |
160 | + maximised: windowData.maximised, | |
161 | + minimised: windowData.minimised, | |
162 | + id: windowData.id, | |
163 | + position: windowData.position, | |
164 | + size: windowData.size, | |
165 | + contextMenu: windowData.contextMenu | |
166 | + }); | |
167 | + } | |
168 | + else if (windowData.mType == "CLINICAL_ILLUSTRATIONS") { | |
147 | 169 | moduleDataObj.CIData.push({ |
148 | 170 | slideId: SlideNo, |
149 | 171 | currentWindowId: windowId, |
... | ... | @@ -244,6 +266,7 @@ AIA.service('ModuleService', function ($http, DataService) { |
244 | 266 | moduleDataObj.DAData = []; |
245 | 267 | moduleDataObj.AAData = []; |
246 | 268 | moduleDataObj.CIData = []; |
269 | + moduleDataObj.CAData = []; | |
247 | 270 | |
248 | 271 | } |
249 | 272 | }; | ... | ... |