Commit 42aa9f6e385d797d1b4c030bb361fc54fed55108

Authored by Birendra Kumar
1 parent 772d1f29

fixed the issue

400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... ... @@ -1057,7 +1057,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1057 1057 var allwindowData = windowsInSelectedSlide.window;
1058 1058 var windowData;
1059 1059 var imageSourc;
1060   - var windowId = 0;
  1060 + var DawindowId = 0;
  1061 + var AtlasWindowId = 0;
1061 1062  
1062 1063 //check for multiple windows, if Array.isArray==true
1063 1064 if (allwindowData != undefined && Array.isArray(allwindowData)) {
... ... @@ -1079,14 +1080,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1079 1080 windowData = JSON.parse(allwindowData[i])
1080 1081  
1081 1082 if (windowData.mType == "DISSECTIBLE_ANATOMY") {
1082   - ModuleService.setModuleData(JSON.parse(allwindowData[i]), windowId);
1083   -
  1083 + ModuleService.setModuleData(JSON.parse(allwindowData[i]), DawindowId);
  1084 + DawindowId = DawindowId + 1;
1084 1085 }
1085 1086 else if (windowData.mType == "ATLAS_ANATOMY") {
1086   - ModuleService.setModuleData(JSON.parse(allwindowData[i]), windowId);
1087   -
  1087 + ModuleService.setModuleData(JSON.parse(allwindowData[i]), AtlasWindowId);
  1088 + AtlasWindowId = AtlasWindowId + 1;
1088 1089 }
1089   - windowId = windowId + 1;
  1090 +
1090 1091 }
1091 1092 }
1092 1093 }
... ... @@ -1099,11 +1100,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1099 1100 $scope.openImagePanel();
1100 1101 }
1101 1102 else if (windowData.mType == "DISSECTIBLE_ANATOMY") {
1102   - ModuleService.setModuleData(JSON.parse(allwindowData), windowId);
  1103 + ModuleService.setModuleData(JSON.parse(allwindowData), DawindowId);
1103 1104  
1104 1105 }
1105 1106 else if (windowData.mType == "ATLAS_ANATOMY") {
1106   - ModuleService.setModuleData(JSON.parse(allwindowData), windowId);
  1107 + ModuleService.setModuleData(JSON.parse(allwindowData), AtlasWindowId);
1107 1108  
1108 1109 }
1109 1110  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -8,7 +8,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
8 8 // common field data
9 9 $rootScope.path = "~/../content/images/speeachBubbleClose.png";
10 10 $rootScope.modestyCanvasZindex = 12100;
11   - $scope.CurrentStructure = "active";
12 11 $scope.IsSearchVisible;
13 12 $scope.bodyViews = {
14 13 'Anterior': '1',
... ... @@ -116,6 +115,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
116 115 'previousHighlightList':[],
117 116 'MaskCanvasData':[],
118 117 'isModestyOn':true,
  118 + 'ModestyValue':'Y',
119 119 'curentEthnicity':'W',
120 120 'modestyImageInfo':[],
121 121 'ColoredImageSRC':[],
... ... @@ -208,6 +208,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
208 208 'previousHighlightList':[],
209 209 'MaskCanvasData':[],
210 210 'isModestyOn':true,
  211 + 'ModestyValue':'Y',
211 212 'curentEthnicity':'W',
212 213 'modestyImageInfo':[],
213 214 'ColoredImageSRC':[],
... ... @@ -253,7 +254,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
253 254 }
254 255 }
255 256 }
256   -
  257 + $rootScope.GetDaWindowId=function()
  258 + {
  259 + // handle for single window
  260 + if($rootScope.DaWindowData.length>0)
  261 + {
  262 + for(var x=0 ;x < $rootScope.DaWindowData.length;x++){
  263 +
  264 + return $rootScope.DaWindowData[x].multiwinid;
  265 + }
  266 + }
  267 + else return 0;
  268 + }
257 269  
258 270 $scope.setGenderNameById = function (BodyViewId,windowviewid) {
259 271 if (BodyViewId == '1' | BodyViewId == '2' | BodyViewId == '3' | BodyViewId == '4' | BodyViewId == '9' | BodyViewId == '10') {
... ... @@ -377,7 +389,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
377 389 userModestysettings = curentmodesty;
378 390 }
379 391 else {
380   - userModestysettings = $rootScope.globalSetting.modesty;
  392 + userModestysettings = $rootScope.globalSetting.modesty;
381 393 }
382 394 if(curentmodesty=="Y")
383 395 {
... ... @@ -388,6 +400,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
388 400 $scope.SetwindowStoreData(windowviewid,'isModestyOn',false);
389 401 }
390 402  
  403 + $scope.SetwindowStoreData(windowviewid,'ModestyValue',userModestysettings);
  404 +
391 405 var thumbnailImage;
392 406 if ((value._id == 1) || (value._id == 3) || (value._id == 5) || (value._id == 6) || (value._id == 7) || (value._id == 11))
393 407 thumbnailImage = ((value._thumbnailImage).replace('.jpg', '_' + userEthnicity + userModestysettings)) + '.jpg';
... ... @@ -597,51 +611,45 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
597 611 $scope.openBodyView = function (damoduledata) {
598 612 $scope.daOpenInOtherModules = damoduledata;
599 613  
600   - if ($rootScope.isCallFromOtherModule != undefined) {
  614 + if ($rootScope.isCallFromOtherModule) {
601 615 $rootScope.MULTI_VIEW_ID += 1;
  616 + var windowviewid= $rootScope.MULTI_VIEW_ID;
602 617  
603   - $scope.initializeWindowData($rootScope.MULTI_VIEW_ID,false,$scope.daOpenInOtherModules.currentWindowId);
  618 + $scope.initializeWindowData(windowviewid,false,$scope.daOpenInOtherModules.currentWindowId);
604 619  
605   - }
606   -
607   - // alert($rootScope.MULTI_VIEW_ID);
608   -
609   - if ($rootScope.isCallFromOtherModule) {
610 620 //$scope.daOpenInOtherModules = ModuleService.getModuleData("DISSECTIBLE_ANATOMY");
611 621  
612 622 if ($scope.daOpenInOtherModules != undefined) {
613 623  
614   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'voId',$scope.daOpenInOtherModules.currentBodyViewId);
615   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'currentViewTitle',$scope.daOpenInOtherModules.windowTitle);
  624 + $scope.SetwindowStoreData(windowviewid,'voId',$scope.daOpenInOtherModules.currentBodyViewId);
  625 + $scope.SetwindowStoreData(windowviewid,'currentViewTitle',$scope.daOpenInOtherModules.windowTitle);
616 626  
617   - $scope.jsPanelID = 'daImagePanel' + '_' + $rootScope.MULTI_VIEW_ID;
618   - $scope.viewID = 'daViewDA_' + $rootScope.MULTI_VIEW_ID;
  627 + $scope.jsPanelID = 'daImagePanel' + '_' + windowviewid;
  628 + $scope.viewID = 'daViewDA_' + windowviewid;
619 629 console.log('$location.url = ' + $location.url())
620 630  
621   - // replace current modesty by CB jason
622 631 var skinValue=$scope.daOpenInOtherModules.skinId;
623   - localStorage.setItem("globalEthnicity",skinValue );
624   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'curentEthnicity',skinValue);
  632 + // localStorage.setItem("globalEthnicity",skinValue );
  633 + $scope.SetwindowStoreData(windowviewid,'curentEthnicity',skinValue);
625 634  
626   - // replace current modesty by CB jason
627 635 var modestyValue=$scope.daOpenInOtherModules.isModestyOn;
628   - localStorage.setItem("globalModesty", modestyValue);
629   -
  636 + // localStorage.setItem("globalModesty", modestyValue);
  637 + $scope.SetwindowStoreData(windowviewid,'ModestyValue',modestyValue);
630 638 if(modestyValue=="Y")
631 639 {
632   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'isModestyOn',true);
  640 + $scope.SetwindowStoreData(windowviewid,'isModestyOn',true);
633 641 }
634 642 else
635 643 {
636   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'isModestyOn',false);
  644 + $scope.SetwindowStoreData(windowviewid,'isModestyOn',false);
637 645 }
638 646  
639   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'zoomInOut',$scope.daOpenInOtherModules.zoom);
  647 + $scope.SetwindowStoreData(windowviewid,'zoomInOut',$scope.daOpenInOtherModules.zoom);
640 648  
641 649 //// one layer down as compare to current running on production
642   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'layerNumber',$scope.daOpenInOtherModules.layerNumber-1);
  650 + $scope.SetwindowStoreData(windowviewid,'layerNumber',$scope.daOpenInOtherModules.layerNumber-1);
643 651  
644   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'parentSlugName',($location.url()).replace('/', ''));
  652 + $scope.SetwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
645 653 //'clinical-illustrations'; //
646 654  
647 655 if ( $scope.BodyViewData == null || $scope.BodyViewData == undefined) {
... ... @@ -656,12 +664,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
656 664  
657 665 $scope.BodyViewData = data;
658 666  
659   - $scope.loadBodyView($rootScope.MULTI_VIEW_ID);
  667 + $scope.loadBodyView(windowviewid);
660 668 })
661 669 })
662 670 }
663 671 else {
664   - $scope.loadBodyView($rootScope.MULTI_VIEW_ID);
  672 + $scope.loadBodyView(windowviewid);
665 673 }
666 674  
667 675 }
... ... @@ -690,8 +698,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
690 698 $scope.jsPanelID = 'daImagePanel' + '_' + $rootScope.MULTI_VIEW_ID;
691 699 $scope.viewID = 'daViewDA' + '_' + $rootScope.MULTI_VIEW_ID;
692 700 $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'parentSlugName','da-view-list');
693   - // $rootScope.DaWindowData.find(v => v.multiwinid == $rootScope.MULTI_VIEW_ID).parentSlugName = 'da-view-list';
694   -
  701 +
695 702 $scope.loadBodyView($rootScope.MULTI_VIEW_ID);
696 703 }
697 704  
... ... @@ -709,16 +716,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
709 716 //0. we will initially append container to load body
710 717  
711 718 //check if localstorage has any settings
  719 + if (!$rootScope.isCallFromOtherModule) {
712 720 var curentEthnicity = $rootScope.getLocalStorageValue("globalEthnicity");
713   - if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) {
714   - $rootScope.globalSetting.ethnicity = curentEthnicity;
715   - $scope.SetwindowStoreData(windowviewid,'curentEthnicity',curentEthnicity);
716   - }
717   -
718   - var curentmodesty = $rootScope.getLocalStorageValue("globalModesty");
719   - if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
720   - $rootScope.globalSetting.modesty = curentmodesty
  721 + if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) {
  722 + $rootScope.globalSetting.ethnicity = curentEthnicity;
  723 + }
721 724 }
  725 + if (!$rootScope.isCallFromOtherModule) {
  726 + var curentmodesty = $rootScope.getLocalStorageValue("globalModesty");
  727 + if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
  728 + $rootScope.globalSetting.modesty = curentmodesty
  729 + }
  730 + }
  731 +
722 732  
723 733 //0.1
724 734  
... ... @@ -867,6 +877,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
867 877  
868 878 $scope.setActiveview(windowviewid,viewtitlename);
869 879  
  880 + $scope.removeBodySyetemSelectionClass(windowviewid,'Current Structure');
  881 +
870 882 // console.log('html is compiled ' + document.getElementById('daView'))
871 883 if ($('#' + $scope.jsPanelID).offset().top == 0)
872 884 $('#' + $scope.jsPanelID).css("top", '70px');
... ... @@ -967,8 +979,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
967 979 value: 0,
968 980 slide: function (event, ui) {
969 981 var targetid = event.target.id;
970   - var windviewid = targetid.split('_')[1];
971   -
  982 + var len= (targetid).split("_").length;
  983 + var windviewid = (targetid).split("_")[len-1];
  984 +
972 985 var layerNum = $scope.GetwindowStoreData(windviewid,'totalLayers');
973 986  
974 987 // var daViewScope = angular.element(document.getElementsByClassName("daBodyView")).scope();
... ... @@ -979,7 +992,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
979 992 stop: function (event, ui) {
980 993  
981 994 var targetid = event.target.id;
982   - var windviewid = targetid.split('_')[1];
  995 + var len= (targetid).split("_").length;
  996 + var windviewid = (targetid).split("_")[len-1];
  997 +
983 998 var la;
984 999 var rootScope = angular.element(document.getElementById("bo")).scope();
985 1000 rootScope.$apply(function () {
... ... @@ -1027,7 +1042,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1027 1042 stop: function (event, ui) {
1028 1043 //alert('trans changed')
1029 1044 var targetid = event.target.id;
1030   - var windviewid = targetid.split('_')[1];
  1045 + var len= (targetid).split("_").length;
  1046 + var windviewid = (targetid).split("_")[len-1];
1031 1047 var scope = angular.element(document.getElementById("daViewDA_" + windviewid)).scope();
1032 1048 scope.$apply(function () {
1033 1049 scope.onTransparencyChange(event, ui);
... ... @@ -1151,12 +1167,28 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1151 1167  
1152 1168 $("#IdFemale").attr("id", "IdFemale_" + $rootScope.MULTI_VIEW_ID);
1153 1169  
  1170 + // bodyview id
1154 1171 $("#Anterior").attr("id", "Anterior_" + $rootScope.MULTI_VIEW_ID);
1155 1172 $("#Lateral").attr("id", "Lateral_" + $rootScope.MULTI_VIEW_ID);
1156 1173 $("#Medial").attr("id", "Medial_" + $rootScope.MULTI_VIEW_ID);
1157 1174 $("#Posterior").attr("id", "Posterior_" + $rootScope.MULTI_VIEW_ID);
1158 1175 $("#LateralArm").attr("id", "LateralArm_" + $rootScope.MULTI_VIEW_ID);
1159 1176 $("#MedialArm").attr("id", "MedialArm_" + $rootScope.MULTI_VIEW_ID);
  1177 +
  1178 + // bodyview id
  1179 + $("#CurrentStructure").attr("id", "CurrentStructure_" + $rootScope.MULTI_VIEW_ID);
  1180 + $("#Cardiovascular").attr("id", "Cardiovascular_" + $rootScope.MULTI_VIEW_ID);
  1181 + $("#Digestive").attr("id", "Digestive_" + $rootScope.MULTI_VIEW_ID);
  1182 + $("#Endocrine").attr("id", "Endocrine_" + $rootScope.MULTI_VIEW_ID);
  1183 + $("#Immune").attr("id", "Immune_" + $rootScope.MULTI_VIEW_ID);
  1184 + $("#Integumentary").attr("id", "Integumentary_" + $rootScope.MULTI_VIEW_ID);
  1185 + $("#Lymphatic").attr("id", "Lymphatic_" + $rootScope.MULTI_VIEW_ID);
  1186 + $("#Muscular").attr("id", "Muscular_" + $rootScope.MULTI_VIEW_ID);
  1187 + $("#Nervous").attr("id", "Nervous_" + $rootScope.MULTI_VIEW_ID);
  1188 + $("#Reproductive").attr("id", "Reproductive_" + $rootScope.MULTI_VIEW_ID);
  1189 + $("#Respiratory").attr("id", "Respiratory_" + $rootScope.MULTI_VIEW_ID);
  1190 + $("#Skeletal").attr("id", "Skeletal_" + $rootScope.MULTI_VIEW_ID);
  1191 + $("#Urinary").attr("id", "Urinary_" + $rootScope.MULTI_VIEW_ID);
1160 1192  
1161 1193 var $all = $("#da-input_" + $rootScope.MULTI_VIEW_ID).prepend('<input type="text" class="form-control input-sm pull-left da-search" id="typedTermName_' + $rootScope.MULTI_VIEW_ID + '" onclick="OnSearch(event)" ondblclick="OnSearch(event)" ng-model="searchFilter" ng-change="resetSearchListView()" ng-blur="HideSearch()" placeholder=" search..." />')
1162 1194 $compile($all)($scope);
... ... @@ -1295,8 +1327,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1295 1327 });
1296 1328 }
1297 1329  
1298   - $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
1299   - // $(document).on("click", " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
  1330 + // $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
  1331 + $(document).on("click", " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
1300 1332  
1301 1333 $rootScope.selectedBodySystemName = 'All';
1302 1334 $rootScope.selectedBodySystemId = 0;
... ... @@ -1310,7 +1342,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1310 1342  
1311 1343  
1312 1344 $("#" + $scope.jsPanelID).resize(function (event) {
1313   - var windowviewid = (event.currentTarget.id).split("_")[1];
  1345 + var len= (event.currentTarget.id).split("_").length;
  1346 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
1314 1347 var CanvasDivLeftPosition=$scope.GetwindowStoreData(windowviewid,'CanvasDivLeftPosition');
1315 1348 var CanvasDivTopPosition=$scope.GetwindowStoreData(windowviewid,'CanvasDivTopPosition');
1316 1349 $('#canvasDivDA_' + windowviewid).scrollLeft(CanvasDivLeftPosition);
... ... @@ -1551,8 +1584,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1551 1584 .success(function (data) {
1552 1585 $scope.SetwindowStoreData(windowviewid,'NavigatorData',data);
1553 1586  
  1587 + if (!$rootScope.isCallFromOtherModule) {
  1588 + $scope.SetwindowStoreData(windowviewid,'curentEthnicity',$rootScope.globalSetting.ethnicity);
  1589 +
  1590 + }
1554 1591 var skinTone=$scope.GetwindowStoreData(windowviewid,'curentEthnicity');
1555   -
  1592 +
  1593 + if (!$rootScope.isCallFromOtherModule) {
  1594 + $scope.SetwindowStoreData(windowviewid,'ModestyValue',$rootScope.globalSetting.modesty);
  1595 +
  1596 + }
  1597 + var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue');
  1598 +
1556 1599 var navigatorManData = new jinqJs()
1557 1600 .from(data.Navigtor.ViewOrientation)
1558 1601 .where("_ViewOrientationId == " + currentBodyViewId)
... ... @@ -1579,7 +1622,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1579 1622 if ((navigatorImage != null || navigatorImage != undefined) && (navigatorImage.length > 0)) {
1580 1623 angular.forEach(navigatorImage, function (value, key) {
1581 1624  
1582   - if (value._HaveModesty === $rootScope.globalSetting.modesty) {
  1625 + if (value._HaveModesty === ModestyValue) {
1583 1626 navImageModesty = value._ImageName;
1584 1627 }
1585 1628 })
... ... @@ -1776,12 +1819,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1776 1819  
1777 1820 $('#layerChangeSliderDA_' + windowviewid).slider("option", "value", sliderVal);
1778 1821  
1779   - $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX);
1780   - $('#canvasDivDA_' + windowviewid).scrollTop($scope.daOpenInOtherModules.canvasVScrollX);
1781   -
1782   - $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
1783   - $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
1784   -
1785 1822 $timeout(function () {
1786 1823  
1787 1824 $('#sppeachBubble_'+windowviewid).css('display', 'none');
... ... @@ -1857,7 +1894,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1857 1894 $scope.BodyRegionCordinatesData = []; // create an empty array
1858 1895 $scope.SetwindowStoreData(windowviewid,'BodyRegionCordinatesData',[]);
1859 1896 $('#daBodyview').css('width', '100%');
1860   - var canvasDIvHeight = parseInt($('#daImagePanel_' + windowviewid).outerHeight()) - 104;
  1897 +
  1898 + if ($rootScope.isCallFromOtherModule) {
  1899 + var canvasDIvHeight = parseInt($('#daImagePanel_' + windowviewid).outerHeight()) - 124;
  1900 + }
  1901 + else
  1902 + {
  1903 + var canvasDIvHeight = parseInt($('#daImagePanel_' + windowviewid).outerHeight()) - 104;
  1904 + }
1861 1905  
1862 1906 $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight);
1863 1907 $('#leftToolBarDA_' + windowviewid).css('height', $('#daImagePanel_' + windowviewid).outerHeight())
... ... @@ -2060,7 +2104,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2060 2104 var nlayer=$scope.GetwindowStoreData(windowviewid,'layerNumber');
2061 2105 if ((parseInt(dtlOfSktn[0]._lns) <= parseInt(nlayer)) && (parseInt(dtlOfSktn[0]._lne) > parseInt(nlayer)) && (dtlOfSktn[0]._isfr == 'Y')) {
2062 2106 $rootScope.isLayerLessSeven = true; // using at home
2063   - if (($rootScope.globalSetting.modesty == 'Y')) {
  2107 + var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue');
  2108 + if ((ModestyValue == 'Y')) {
2064 2109  
2065 2110 $('.modestyImg_'+windowviewid).css('visibility', 'visible');
2066 2111 }
... ... @@ -2096,7 +2141,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2096 2141 //set scrollbars on canvas and hide loading label
2097 2142 $('#daLoaderLabel').css('visibility', 'hidden')
2098 2143  
2099   - $('#canvasDivDA_' + windowviewid).css('overflow', 'scroll')
  2144 + $('#canvasDivDA_' + windowviewid).css('overflow', 'scroll');
  2145 +
2100 2146 if (isiOSSafari) {
2101 2147 $('#canvasDivDA_' + windowviewid).scrollLeft($('#canvasDivDA_' + windowviewid).width() + 150)
2102 2148  
... ... @@ -2105,7 +2151,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2105 2151 $('#canvasDivDA_' + windowviewid).scrollLeft($('#canvasDivDA_' + windowviewid).width() / 2)
2106 2152 }
2107 2153  
2108   - $('#canvasDivDA_' + windowviewid).scrollTop(50)
  2154 + $('#canvasDivDA_' + windowviewid).scrollTop(50);
2109 2155  
2110 2156 var sliderVal = parseInt($scope.GetwindowStoreData(windowviewid,'totalLayers')) - parseInt($scope.GetwindowStoreData(windowviewid,'layerNumber'));
2111 2157  
... ... @@ -2225,6 +2271,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2225 2271  
2226 2272 $scope.userInput = parseInt(lNumber);
2227 2273  
  2274 + if (!$rootScope.isCallFromOtherModule) {
  2275 + $scope.SetwindowStoreData(windowviewid,'curentEthnicity',$rootScope.globalSetting.ethnicity);
  2276 +
  2277 + }
2228 2278 var skinTone=$scope.GetwindowStoreData(windowviewid,'curentEthnicity');
2229 2279  
2230 2280  
... ... @@ -2311,6 +2361,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2311 2361 var zoomValue=$scope.GetwindowStoreData(windowviewid,'zoomInOut');
2312 2362 //filter bodyRegion data basd on skintone
2313 2363  
  2364 + if (!$rootScope.isCallFromOtherModule) {
  2365 + $scope.SetwindowStoreData(windowviewid,'curentEthnicity',$rootScope.globalSetting.ethnicity);
  2366 +
  2367 + }
2314 2368 var skinTone=$scope.GetwindowStoreData(windowviewid,'curentEthnicity');
2315 2369 $scope.bagartDetailsOnSktn = new jinqJs()
2316 2370 .from($scope.bagartBodyRegionDetails)
... ... @@ -2355,10 +2409,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2355 2409  
2356 2410 if (isMaskImage == 'Y') {
2357 2411 if ($rootScope.isOpenResourceBtnClicked) {
2358   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci' + '|' + windowviewid;
  2412 + FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci' + "_" + windowviewid;
2359 2413 }
2360 2414 else {
2361   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci'+ '|' + windowviewid;
  2415 + FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci'+ "_" + windowviewid;
2362 2416  
2363 2417 }
2364 2418  
... ... @@ -2368,10 +2422,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2368 2422 else {
2369 2423  
2370 2424 if ($rootScope.isOpenResourceBtnClicked) {
2371   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + '|' + windowviewid;
  2425 + FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
2372 2426 }
2373 2427 else {
2374   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + '|' + windowviewid;
  2428 + FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
2375 2429  
2376 2430 }
2377 2431  
... ... @@ -2386,8 +2440,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2386 2440  
2387 2441  
2388 2442 FlipedImgCanvas.addEventListener('click', function (evt) {
2389   -
2390   - var windowviewid = (evt.currentTarget.id).split("|")[1];
  2443 + var len= (evt.currentTarget.id).split("_").length;
  2444 + var windowviewid = (evt.currentTarget.id).split("_")[len-1];
2391 2445 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
2392 2446 $scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
2393 2447 //to get correct data on multihighlight highlight
... ... @@ -2409,10 +2463,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2409 2463  
2410 2464 }
2411 2465  
2412   - // clear CB term data on mouse click
2413   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
2414   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
2415   -
2416 2466 //get mouse coordinate of mirror image click
2417 2467 var mousePos = $scope.getMousePos(evt.pageX,evt.pageY,windowviewid);
2418 2468  
... ... @@ -2485,7 +2535,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2485 2535 for (var i = 0; i < $scope.machedIcolorInBodyRegion.length; i++) {
2486 2536 var bodyRegionId = $scope.machedIcolorInBodyRegion[i];
2487 2537  
2488   - var grayCanvasID = 'imageCanvas' + bodyRegionId + "|" + windowviewid;
  2538 + var grayCanvasID = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
2489 2539 var grayCanvas = document.getElementById(grayCanvasID);
2490 2540  
2491 2541 var grayCanvasContext = grayCanvas.getContext("2d");
... ... @@ -2499,7 +2549,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2499 2549 var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId');
2500 2550 if (bodyVid == "1" || bodyVid == "4" || bodyVid == "5" || bodyVid == "8") {
2501 2551 if (bodyRegionId == 4 || bodyRegionId == 5 || bodyRegionId == 6) {
2502   - var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "|" + windowviewid;
  2552 + var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
2503 2553 var grayCanvasMR = document.getElementById(grayCanvasID);
2504 2554  
2505 2555 var grayCanvasContextMR = grayCanvasMR.getContext("2d");
... ... @@ -2688,10 +2738,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2688 2738 var imageCanvas;
2689 2739  
2690 2740 if ($rootScope.multiViewCounter != undefined) {
2691   - imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + '|' + windowviewid);
  2741 + imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid);
2692 2742 }
2693 2743 else {
2694   - imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + '|' + windowviewid);
  2744 + imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid);
2695 2745 }
2696 2746  
2697 2747  
... ... @@ -2728,8 +2778,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2728 2778 $scope.SetwindowStoreData(windowviewid,'coloredImageCanvasList',$scope.coloredImageCanvasList);
2729 2779 $scope.SetwindowStoreData(windowviewid,'coloredImageMRCanvasList',$scope.coloredImageMRCanvasList);
2730 2780 // set color image data
2731   - $scope.SetwindowStoreData(windowviewid,'ColoredImageSRC',$scope.ColoredImageSRC);
  2781 + $scope.SetwindowStoreData(windowviewid, 'ColoredImageSRC', $scope.ColoredImageSRC);
2732 2782  
  2783 + // Scroll canvas based on CB data
  2784 + var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
  2785 + if (isHighlightBodyWithCBTermData == true) {
  2786 + $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX);
  2787 + $('#canvasDivDA_' + windowviewid).scrollTop($scope.daOpenInOtherModules.canvasVScrollX);
  2788 +
  2789 + $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
  2790 + $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
  2791 + }
  2792 +
2733 2793 if ($rootScope.isOpenResourceBtnClicked && $rootScope.isTermClicked == false) {
2734 2794 $scope.EnableUI();
2735 2795 if (($rootScope.multiViewInfoIndex + 1) < $rootScope.multiViewInfo.length) {
... ... @@ -2769,7 +2829,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2769 2829 $scope.highLightBody(windowviewid);
2770 2830 }
2771 2831 else {
2772   - var isHighlightBodyWithCBTermData=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData');
  2832 + var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
2773 2833 if (isHighlightBodyWithCBTermData == true) {
2774 2834 $scope.ShowCBDataBodyView(windowviewid);
2775 2835 }
... ... @@ -2842,19 +2902,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2842 2902 if (isMaskImage == 'Y') {
2843 2903 imgCanvas.style.visibility = 'hidden';
2844 2904 if ($rootScope.isOpenResourceBtnClicked) {
2845   - imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + '|' + windowviewid;
  2905 + imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
2846 2906 }
2847 2907 else {
2848   - imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + '|' + windowviewid;
  2908 + imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
2849 2909 }
2850 2910  
2851 2911 }
2852 2912 else {
2853 2913 if ($rootScope.isOpenResourceBtnClicked) {
2854   - imgCanvas.id = 'imageCanvas' + bodyRegionId + '|' + windowviewid;
  2914 + imgCanvas.id = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
2855 2915 }
2856 2916 else {
2857   - imgCanvas.id = 'imageCanvas' + bodyRegionId + '|' + windowviewid;
  2917 + imgCanvas.id = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
2858 2918 }
2859 2919  
2860 2920  
... ... @@ -2883,8 +2943,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2883 2943  
2884 2944 imgCanvas.addEventListener('click', function (evt) {
2885 2945  
2886   - var windowviewid = (evt.currentTarget.id).split("|")[1];
2887   -
  2946 + var len= (evt.currentTarget.id).split("_").length;
  2947 + var windowviewid = (evt.currentTarget.id).split("_")[len-1];
2888 2948 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
2889 2949 $scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
2890 2950 if ($scope.isLayerChange == true) {
... ... @@ -2906,10 +2966,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2906 2966  
2907 2967 }
2908 2968  
2909   - // clear CB term data on mouse click
2910   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
2911   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
2912   -
  2969 +
2913 2970 var annotationText;
2914 2971 var context = imgCanvas.getContext("2d");
2915 2972  
... ... @@ -2921,7 +2978,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2921 2978 maskCanvasId = canvasId;
2922 2979 }
2923 2980 else {
2924   - maskCanvasId = canvasId.split("|")[0] + '_mci' + "|" + windowviewid;
  2981 + maskCanvasId = canvasId.split("_")[0] + '_mci' + "_" + windowviewid;
2925 2982 }
2926 2983 var maskCanvas = document.getElementById(maskCanvasId);
2927 2984 var maskCanvasContext = maskCanvas.getContext("2d");
... ... @@ -2950,8 +3007,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2950 3007 //
2951 3008 else if (maskCanvasId.match('modestyImg') && RGBColor == '000000') {
2952 3009  
2953   - bodyRegionId = maskCanvasId.split("|")[0].slice(-1);
2954   - maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + "|" + windowviewid;
  3010 + bodyRegionId = maskCanvasId.split("_")[0].slice(-1);
  3011 + maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
2955 3012  
2956 3013 var maskCanvas = document.getElementById(maskCanvasId);
2957 3014 var maskCanvasContext = maskCanvas.getContext("2d");
... ... @@ -2983,7 +3040,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2983 3040 for (var i = 0; i < $scope.machedIcolorInBodyRegion.length; i++) {
2984 3041 var bodyRegionId = $scope.machedIcolorInBodyRegion[i];
2985 3042  
2986   - var grayCanvasID = 'imageCanvas' + bodyRegionId + "|" + windowviewid;
  3043 + var grayCanvasID = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
2987 3044 var grayCanvas = document.getElementById(grayCanvasID);
2988 3045 var grayImageDataList=$scope.GetwindowStoreData(windowviewid,'grayImageDataList');
2989 3046 var grayCanvasContext = grayCanvas.getContext("2d");
... ... @@ -2995,7 +3052,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2995 3052 // for unhighlight the mirrored body region
2996 3053 if (bodyVid == "1" || bodyVid == "4" || bodyVid == "5" || bodyVid == "8") {
2997 3054 if (bodyRegionId == 4 || bodyRegionId == 5 || bodyRegionId == 6) {
2998   - var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "|" + windowviewid;
  3055 + var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
2999 3056 var grayCanvasMR = document.getElementById(grayCanvasID);
3000 3057 var grayImageMRDataList=$scope.GetwindowStoreData(windowviewid,'grayImageMRDataList');
3001 3058 var grayCanvasContextMR = grayCanvasMR.getContext("2d");
... ... @@ -3180,10 +3237,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3180 3237  
3181 3238 var imageCanvas;
3182 3239 if ($rootScope.multiViewCounter != undefined) {
3183   - imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '|' + windowviewid);
  3240 + imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + "_" + windowviewid);
3184 3241 }
3185 3242 else {
3186   - imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '|' + windowviewid);
  3243 + imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + "_" + windowviewid);
3187 3244 }
3188 3245  
3189 3246 if (imageCanvas != null || imageCanvas != undefined) {
... ... @@ -3217,11 +3274,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3217 3274  
3218 3275 if (isEligibleForHighlight == true) {
3219 3276 $scope.SetwindowStoreData(windowviewid,'coloredImageMRCanvasList',$scope.coloredImageMRCanvasList);
3220   - $scope.SetwindowStoreData(windowviewid,'coloredImageCanvasList',$scope.coloredImageCanvasList);
3221   -
  3277 + $scope.SetwindowStoreData(windowviewid,'coloredImageCanvasList',$scope.coloredImageCanvasList);
3222 3278 // set color image data
3223   - $scope.SetwindowStoreData(windowviewid,'ColoredImageSRC',$scope.ColoredImageSRC);
3224   -
  3279 + $scope.SetwindowStoreData(windowviewid, 'ColoredImageSRC', $scope.ColoredImageSRC);
  3280 + // Scroll canvas based on CB data
  3281 + var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
  3282 + if (isHighlightBodyWithCBTermData == true) {
  3283 + $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX);
  3284 + $('#canvasDivDA_' + windowviewid).scrollTop($scope.daOpenInOtherModules.canvasVScrollX);
  3285 +
  3286 + $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
  3287 + $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
  3288 + }
  3289 +
3225 3290 if ($rootScope.isOpenResourceBtnClicked && $rootScope.isTermClicked == false) {
3226 3291 $scope.EnableUI();
3227 3292 if (($rootScope.multiViewInfoIndex + 1) < $rootScope.multiViewInfo.length) {
... ... @@ -3267,7 +3332,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3267 3332  
3268 3333 }
3269 3334 else {
3270   - var isHighlightBodyWithCBTermData=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData');
  3335 + var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
3271 3336 if (isHighlightBodyWithCBTermData == true) {
3272 3337 $scope.ShowCBDataBodyView(windowviewid);
3273 3338 }
... ... @@ -3326,12 +3391,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3326 3391  
3327 3392 /// $scope.TermList = $scope.getTermNumberList(actualterm);
3328 3393 // $scope.termCoordinate = $scope.getTermCoordinate(actualterm);
3329   -
3330   - $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX);
3331   - $('#canvasDivDA_' + windowviewid).scrollTop($scope.daOpenInOtherModules.canvasVScrollX);
3332   -
3333   - $scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',$("#canvasDivDA_" + windowviewid).scrollTop());
3334   - $scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',$("#canvasDivDA_" + windowviewid).scrollLeft());
  3394 +
3335 3395 var CurriculumTermData=$scope.GetwindowStoreData(windowviewid,'CurriculumTermData');
3336 3396 for (var i = 0; i < CurriculumTermData.length; i++) {
3337 3397 $scope.MultiLanguageAnnationArray = [];
... ... @@ -3348,8 +3408,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3348 3408 }
3349 3409  
3350 3410 }
  3411 +
  3412 + $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false);
  3413 + $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []);
  3414 + $scope.SetwindowStoreData(windowviewid, 'AllTerms', []);
  3415 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
3351 3416 // finish CB window load
3352   - $rootScope.CBWindowLoadComplete=true;
  3417 + $rootScope.CBWindowLoadComplete = true;
  3418 +
3353 3419 }
3354 3420  
3355 3421 $scope.highLightBodyBasedOnIcolor = function (RGBColor,windowviewid) {
... ... @@ -4013,7 +4079,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4013 4079 var whiteImageMRDataList=$scope.GetwindowStoreData(windowviewid,'whiteImageMRDataList');
4014 4080  
4015 4081 for (var i = 0; i < grayImageDataList.length; i++) {
4016   - var grayCanvasID = 'imageCanvas' + parseInt(i + 1) + "|" + windowviewid;
  4082 + var grayCanvasID = 'imageCanvas' + parseInt(i + 1) + "_" + windowviewid;
4017 4083 var grayCanvas = document.getElementById(grayCanvasID);
4018 4084  
4019 4085 if (grayCanvas != null) {
... ... @@ -4030,7 +4096,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4030 4096 }
4031 4097 }
4032 4098 for (var i = 4; i <= grayImageMRDataList.length; i++) {
4033   - var grayCanvasMRID = 'imageCanvas' + i + '_MR' + "|" + windowviewid;
  4099 + var grayCanvasMRID = 'imageCanvas' + i + '_MR' + "_" + windowviewid;
4034 4100 var grayCanvasMR = document.getElementById(grayCanvasMRID);
4035 4101  
4036 4102 if (grayCanvasMR != null) {
... ... @@ -4055,7 +4121,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4055 4121 if (TermExistInBodyRegionId != undefined) {
4056 4122 if (prevBRID != TermExistInBodyRegionId) {
4057 4123  
4058   - var grayCanvasID = 'imageCanvas' + TermExistInBodyRegionId + "|" + windowviewid;
  4124 + var grayCanvasID = 'imageCanvas' + TermExistInBodyRegionId + "_" + windowviewid;
4059 4125 var grayCanvas = document.getElementById(grayCanvasID);
4060 4126  
4061 4127 if (grayCanvas != null) {
... ... @@ -4079,7 +4145,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4079 4145 var gData = grayCanvasContext.getImageData(0, 0, canvasWidth, canvasHeight);
4080 4146  
4081 4147 //for mirror images
4082   - var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "|" + windowviewid;
  4148 + var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "_" + windowviewid;
4083 4149 var grayCanvasMR = document.getElementById(grayCanvasMRID);
4084 4150 var grayCanvasMRX;
4085 4151 var grayCanvasMRY;
... ... @@ -4090,7 +4156,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4090 4156 if (TermExistInBodyRegionId == 4 || TermExistInBodyRegionId == 5 || TermExistInBodyRegionId == 6) {
4091 4157  
4092 4158  
4093   - var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "|" + windowviewid;
  4159 + var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "_" + windowviewid;
4094 4160 var grayCanvasMR = document.getElementById(grayCanvasMRID);
4095 4161 grayCanvasMRX = grayCanvasMR.style.left;
4096 4162 grayCanvasMRY = grayCanvasMR.style.top;
... ... @@ -4103,7 +4169,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4103 4169 FlipedImgCanvas.style.left = canvasX + "px";
4104 4170 FlipedImgCanvas.style.top = canvasY + "px";
4105 4171 FlipedImgCanvas.style.visibility = 'hidden';
4106   - FlipedImgCanvas.id = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "|" + windowviewid;
  4172 + FlipedImgCanvas.id = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "_" + windowviewid;
4107 4173  
4108 4174 //remove previous canavs
4109 4175 $('#' + grayCanvasMRID).remove();
... ... @@ -4149,7 +4215,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4149 4215 })
4150 4216  
4151 4217 //for non mirrored bpdy regions
4152   - var grayCanvasID = 'imageCanvas' + TermExistInBodyRegionId + "|" + windowviewid;
  4218 + var grayCanvasID = 'imageCanvas' + TermExistInBodyRegionId + "_" + windowviewid;
4153 4219 var grayCanvas = document.getElementById(grayCanvasID);
4154 4220  
4155 4221 if (grayCanvas != null) {
... ... @@ -4163,7 +4229,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4163 4229 //for mirror body regions
4164 4230 if (TermExistInBodyRegionId == 4 || TermExistInBodyRegionId == 5 || TermExistInBodyRegionId == 6) {
4165 4231  
4166   - var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "|" + windowviewid;
  4232 + var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "_" + windowviewid;
4167 4233  
4168 4234 var grayCanvasMR = document.getElementById(grayCanvasMRID);
4169 4235  
... ... @@ -4431,15 +4497,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4431 4497 $scope.isLayerChange = true;
4432 4498 $rootScope.isLoading = true;
4433 4499 $('#spinner').css('visibility', 'visible');
4434   -
4435   - if ($rootScope.isCallFromOtherModule) {
4436   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
4437   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
4438   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
4439   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
4440   - }
4441   - //1.
4442   -
  4500 +
4443 4501 var canvasDiv = document.getElementById("canvasDivDA_" + windowviewid);
4444 4502 $scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
4445 4503 $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft;
... ... @@ -4758,7 +4816,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4758 4816 }
4759 4817 $('.appendDragg').draggable({
4760 4818 drag: function (evt) {
4761   - var windid = (evt.target.id).split("_")[1];
  4819 + var len= (evt.target.id).split("_").length;
  4820 + var windid = (evt.target.id).split("_")[len-1];
4762 4821 $(this).prev('div').css("display", "none");
4763 4822 var bor_id = $(this).next('div').attr('id');
4764 4823 var sub_id1 = $(this).attr('id');
... ... @@ -4804,7 +4863,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4804 4863 $('#sppeachBubble_'+windowviewid).draggable(
4805 4864 {
4806 4865 drag: function (evt) {
4807   - var windid = (evt.target.id).split("_")[1];
  4866 + var len= (evt.target.id).split("_").length;
  4867 + var windid = (evt.target.id).split("_")[len-1];
4808 4868 $('#dot_'+windid).css("visibility", "hidden");
4809 4869 var canvasDiv = document.getElementById('canvasDivDA_' + windid)
4810 4870  
... ... @@ -4814,7 +4874,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4814 4874 },
4815 4875 });
4816 4876 $('#crossDiv_'+windowviewid).on('click', function (evt) {
4817   - var windid = (evt.target.id).split("_")[1];
  4877 + var len= (evt.target.id).split("_").length;
  4878 + var windid = (evt.target.id).split("_")[len-1];
4818 4879 $('#sppeachBubble_'+windid).remove();
4819 4880 $('#bord_'+windowviewid).remove();
4820 4881 $('#dot_'+windid).remove();
... ... @@ -4837,7 +4898,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4837 4898 $scope.SetwindowStoreData(windowviewid,'speachBubbleArrayAnnotation',$scope.speechList1);
4838 4899 $('.appendDragg_annotation').draggable({
4839 4900 drag: function (evt) {
4840   - var windid = (evt.target.id).split("_")[2];
  4901 + var len= (evt.target.id).split("_").length;
  4902 + var windid = (evt.target.id).split("_")[len-1];
4841 4903 $(this).prev('div').css("display", "none");
4842 4904 var bor_id_anno = $(this).next('div').attr('id');
4843 4905 var sub_id1_anno = $(this).attr('id');
... ... @@ -4875,7 +4937,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4875 4937 $('#sppeachBubble_annotation_'+windowviewid).draggable(
4876 4938 {
4877 4939 drag: function (evt) {
4878   - var windid = (evt.target.id).split("_")[2];
  4940 + var len= (evt.target.id).split("_").length;
  4941 + var windid = (evt.target.id).split("_")[len-1];
4879 4942 $('#dot_annotation_'+windid).remove();
4880 4943 var canvasDiv = document.getElementById('canvasDivDA_' + windid);
4881 4944 var verticalScrollPosition = canvasDiv.scrollTop;
... ... @@ -4884,7 +4947,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4884 4947 },
4885 4948 });
4886 4949 $('.crossDiv_annotation_'+windowviewid).on('click', function (evt) {
4887   - var windid = (evt.target.className).split("_")[2];
  4950 + var len= (evt.target.className).split("_").length;
  4951 + var windid = (evt.target.className).split("_")[len-1];
4888 4952 $('#sppeachBubble_annotation_'+windid).remove();
4889 4953 $('#bord_annotation_'+windid).remove();
4890 4954 $('#dot_annotation_'+windid).remove();
... ... @@ -5378,14 +5442,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5378 5442 $scope.createTransparencyBox = function (windowviewid) {
5379 5443  
5380 5444 $scope.SetwindowStoreData(windowviewid,'isTransparencyBtnClicked',true);
5381   -
5382   - if ($rootScope.isCallFromOtherModule) {
5383   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
5384   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
5385   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
5386   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
5387   - }
5388   -
  5445 +
5389 5446 //do not create TBOX if in extarct mode otherwise create
5390 5447 if ($scope.GetwindowStoreData(windowviewid,'isExtract') == false) {
5391 5448  
... ... @@ -5446,9 +5503,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5446 5503 }
5447 5504  
5448 5505 function mouseDownListener(e) {
5449   -
5450   - var windowviewid = (e.currentTarget.id).split("_")[1];
5451   -
  5506 + var len= (e.currentTarget.id).split("_").length;
  5507 + var windowviewid = (e.currentTarget.id).split("_")[len-1];
  5508 +
5452 5509 e.preventDefault();
5453 5510 //to prevent screen scroll on ipad while drawing TB
5454 5511 e.preventDefault();
... ... @@ -5519,7 +5576,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5519 5576 }
5520 5577  
5521 5578 function mouseMoveListener(e) {
5522   - var windowviewid = (e.currentTarget.id).split("_")[1];
  5579 + var len= (e.currentTarget.id).split("_").length;
  5580 + var windowviewid = (e.currentTarget.id).split("_")[len-1];
5523 5581 e.preventDefault();
5524 5582 //to prevent screen scroll on ipad while drawing TB
5525 5583 e.preventDefault();
... ... @@ -5550,7 +5608,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5550 5608  
5551 5609  
5552 5610 function mouseUpListener(e) {
5553   - var windowviewid = (event.currentTarget.id).split("_")[1];
  5611 + var len= (e.currentTarget.id).split("_").length;
  5612 + var windowviewid = (e.currentTarget.id).split("_")[len-1];
5554 5613 e.preventDefault();
5555 5614  
5556 5615 //to prevent screen scroll on ipad while drawing TB
... ... @@ -6711,7 +6770,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6711 6770 $rootScope.setSelectedBodyRegionData(windowviewid);
6712 6771  
6713 6772 if ($rootScope.isMirrorBodyRegion == "No") {
6714   - var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_mci" + "|" + windowviewid;
  6773 + var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_mci" + "_" + windowviewid;
6715 6774 var maskCanvas = document.getElementById(maskCanvasId);
6716 6775 var maskCanvasContext = maskCanvas.getContext("2d");
6717 6776  
... ... @@ -6723,7 +6782,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6723 6782 }
6724 6783 else {
6725 6784  
6726   - var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_MR_mci"+ "|" + windowviewid;
  6785 + var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_MR_mci"+ "_" + windowviewid;
6727 6786 var maskoffsetval = $('#' + maskCanvasId).offset();
6728 6787 var mirrorCanvasX = maskoffsetval.left;
6729 6788 var mirrorImageCanvas = document.getElementById(maskCanvasId);
... ... @@ -7037,7 +7096,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7037 7096 }
7038 7097  
7039 7098 function TransparencyCanvasClickListener(evt) {
7040   - var windowviewid = (evt.currentTarget.id).split("_")[1];
  7099 + var len= (evt.currentTarget.id).split("_").length;
  7100 + var windowviewid = (evt.currentTarget.id).split("_")[len-1];
7041 7101 var pixelData;
7042 7102 var pixelDataTrans;
7043 7103 var mousePos = $scope.getMousePos(evt.pageX,evt.pageY,windowviewid);
... ... @@ -7107,7 +7167,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7107 7167 var mirrorCanvasX = x;
7108 7168 var mirrorCanvasWidth = width;
7109 7169  
7110   - var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "|" + windowviewid;
  7170 + var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "_" + windowviewid;
7111 7171 var clickedCanavs = document.getElementById(clickedCanvasMaskId);
7112 7172  
7113 7173 var maskCanvasId = 'transparencyTempCanvasMask_' + clickedBodyRegion + '_mci' + "_" + windowviewid;
... ... @@ -7177,7 +7237,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7177 7237 }
7178 7238 else {
7179 7239  
7180   - var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "|" + windowviewid;
  7240 + var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "_" + windowviewid;
7181 7241 var maskCanvas = document.getElementById(clickedCanvasMaskId);
7182 7242 var maskCanvasContext = maskCanvas.getContext("2d");
7183 7243  
... ... @@ -7209,8 +7269,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7209 7269 }
7210 7270  
7211 7271 function OnClickModestyTransCanvas(evt) {
7212   -
7213   - var windowviewid = (evt.currentTarget.id).split("_")[2];
  7272 + var len= (evt.target.id).split("_").length;
  7273 + var windowviewid = (evt.target.id).split("_")[len-1];
7214 7274  
7215 7275 var tCanvasLeft = $(".ui-wrapper").css("left");
7216 7276 var tCanvasLeftAftrSplit = tCanvasLeft.split("p");
... ... @@ -7258,7 +7318,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7258 7318  
7259 7319 var bodyRegionId = canvasId.split("_")[1].slice(-1);
7260 7320  
7261   - var maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + '|' + windowviewid;
  7321 + var maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
7262 7322 var maskCanvas = document.getElementById(maskCanvasId);
7263 7323 var maskCanvasContext = maskCanvas.getContext("2d");
7264 7324  
... ... @@ -7302,8 +7362,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7302 7362 }
7303 7363  
7304 7364 function getAnnotationAndCraeteSpeechBubble(mirrorCanvasX, mirrorCanvasWidth, mousePos, maskCanvasContexttrans, clickedBodyRegion, x, y, evt) {
7305   - var windowviewid = (evt.target.id).split("_")[1];
7306   -
  7365 + var len= (evt.target.id).split("_").length;
  7366 + var windowviewid = (evt.target.id).split("_")[len-1];
  7367 +
7307 7368 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
7308 7369 var verticalScrollPosition = canvasDiv.scrollTop;
7309 7370 var horizontlScrollPosition = canvasDiv.scrollLeft;
... ... @@ -7315,7 +7376,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7315 7376 var actulalX = mirrorXOnNormalImage
7316 7377 var actualY = mousePos.y + verticalScrollPosition
7317 7378  
7318   - var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + '|' + windowviewid;
  7379 + var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "_" + windowviewid;
7319 7380 var maskCanvas = document.getElementById(clickedCanvasMaskId);
7320 7381 var maskCanvasContext = maskCanvas.getContext("2d");
7321 7382 var imgX = Math.round(actulalX - parseInt((x).replace('px', '')));
... ... @@ -7448,8 +7509,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7448 7509  
7449 7510 $scope.onTransparencyChange = function (ev, ui) {
7450 7511  
7451   - var targetid = ev.target.id;
7452   - var windowviewid = targetid.split('_')[1];
  7512 + var len= (ev.target.id).split("_").length;
  7513 + var windowviewid = (ev.target.id).split("_")[len-1];
7453 7514  
7454 7515 $scope.SetwindowStoreData(windowviewid,'transNumber',ui.value);
7455 7516  
... ... @@ -7716,7 +7777,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7716 7777  
7717 7778 $scope.enableZoom = function (event) {
7718 7779  
7719   - var windowviewid = (event.currentTarget.id).split("_")[1];
  7780 + var len= (event.currentTarget.id).split("_").length;
  7781 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
7720 7782  
7721 7783 if ($rootScope.isOpenResourceBtnClicked) {
7722 7784  
... ... @@ -7726,12 +7788,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7726 7788 $scope.setScopeVariables();
7727 7789 }
7728 7790 }
7729   - if ($rootScope.isCallFromOtherModule) {
7730   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
7731   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
7732   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
7733   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
7734   - }
7735 7791  
7736 7792 $("#OnIdentify").removeClass("annotationtoolbartab");
7737 7793 $("#DrawMode").removeClass("annotationtoolbartab");
... ... @@ -7863,12 +7919,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7863 7919 var maskId;
7864 7920  
7865 7921 if ($rootScope.isOpenResourceBtnClicked) {
7866   - id = 'imageCanvas' + i + '|' + windowviewid;
7867   - maskId = 'imageCanvas' + i + '_mci' + '|' + windowviewid;
  7922 + id = 'imageCanvas' + i + "_" + windowviewid;
  7923 + maskId = 'imageCanvas' + i + '_mci' + "_" + windowviewid;
7868 7924 }
7869 7925 else {
7870   - id = 'imageCanvas' + i + '|' + windowviewid;
7871   - maskId = 'imageCanvas' + i + '_mci'+'|'+ windowviewid;
  7926 + id = 'imageCanvas' + i + "_" + windowviewid;
  7927 + maskId = 'imageCanvas' + i + '_mci'+"_"+ windowviewid;
7872 7928 }
7873 7929  
7874 7930  
... ... @@ -7885,12 +7941,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7885 7941 if (i == 4 || i == 5 || i == 6) {
7886 7942  
7887 7943 if ($rootScope.isOpenResourceBtnClicked) {
7888   - id = 'imageCanvas' + i + '_MR' + '|' + windowviewid;
7889   - maskId = 'imageCanvas' + i + '_MR_mci' + '|' + windowviewid;
  7944 + id = 'imageCanvas' + i + '_MR' + "_" + windowviewid;
  7945 + maskId = 'imageCanvas' + i + '_MR_mci' + "_" + windowviewid;
7890 7946 }
7891 7947 else {
7892   - id = 'imageCanvas' + i + '_MR'+'|'+ windowviewid;
7893   - maskId = 'imageCanvas' + i + '_MR_mci'+'|'+ windowviewid;
  7948 + id = 'imageCanvas' + i + '_MR'+"_"+ windowviewid;
  7949 + maskId = 'imageCanvas' + i + '_MR_mci'+"_"+ windowviewid;
7894 7950 }
7895 7951  
7896 7952  
... ... @@ -7908,8 +7964,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7908 7964 var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
7909 7965 if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) {
7910 7966 for (var j = 0; j < modestyCanvases.length; j++) {
7911   - var len= (modestyCanvases[j].id).split("|").length;
7912   - var winid = (modestyCanvases[j].id).split("|")[len-1];
  7967 + var len= (modestyCanvases[j].id).split("_").length;
  7968 + var winid = (modestyCanvases[j].id).split("_")[len-1];
7913 7969 if(winid==windowviewid)
7914 7970 {
7915 7971 modestyCanvases[j].parentNode.removeChild(modestyCanvases[j]);
... ... @@ -7941,13 +7997,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7941 7997  
7942 7998 }
7943 7999 else {
7944   - if ($rootScope.isCallFromOtherModule) {
7945   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
7946   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
7947   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
7948   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
7949   - }
7950   -
  8000 +
7951 8001 $scope.SetwindowStoreData(windowviewid,'isHighLight',true);
7952 8002 $scope.SetwindowStoreData(windowviewid,'isNormalMode',false);
7953 8003 $scope.SetwindowStoreData(windowviewid,'isZoomed',false);
... ... @@ -8035,13 +8085,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8035 8085 if ($scope.GetwindowStoreData(windowviewid,'isNormalMode') == true) {
8036 8086  
8037 8087 }
8038   - else {
8039   - if ($rootScope.isCallFromOtherModule) {
8040   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
8041   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
8042   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
8043   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
8044   - }
  8088 + else {
8045 8089 //1.
8046 8090 $scope.flushCanvas(windowviewid);
8047 8091  
... ... @@ -8098,8 +8142,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8098 8142  
8099 8143 //// #7972 Mozilla Firefox> Incorrect navigation
8100 8144 $("#canvasDiv").scroll(function (event) {
8101   - var windowviewid = (event.currentTarget.id).split("_")[1];
8102   -
  8145 + var len= (event.currentTarget.id).split("_").length;
  8146 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
  8147 +
8103 8148 $scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',$('#canvasDivDA_' + windowviewid).scrollLeft());
8104 8149 $scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',$('#canvasDivDA_' + windowviewid).scrollTop());
8105 8150  
... ... @@ -8110,14 +8155,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8110 8155 $scope.DisableUI();
8111 8156  
8112 8157 console.log('isCalledFromButton= ' + isCalledFromButton);
8113   -
8114   - if ($rootScope.isCallFromOtherModule) {
8115   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
8116   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
8117   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
8118   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
8119   - }
8120   -
  8158 +
8121 8159 $scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',$('#canvasDivDA_' + windowviewid).scrollLeft());
8122 8160 $scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',$('#canvasDivDA_' + windowviewid).scrollTop());
8123 8161  
... ... @@ -8215,8 +8253,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8215 8253 $scope.enableShowHideStructureBox = function (event) {
8216 8254  
8217 8255 //if listanager is visisble then close it
8218   - var windowviewid = (event.currentTarget.id).split("_")[1];
8219   -
  8256 + var len= (event.currentTarget.id).split("_").length;
  8257 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
  8258 +
8220 8259 $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false);
8221 8260 $rootScope.CloseListManager();
8222 8261 var btnStrutureBoxname = document.getElementById("btnStrutureBox_" + windowviewid).name;
... ... @@ -8308,18 +8347,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8308 8347 var id;
8309 8348 if (value.haveMirror == 'true') {
8310 8349 if ($rootScope.multiViewCounter != undefined) {
8311   - id = 'imageCanvas' + value.bodyRegionId + '_MR' + '|' + windowviewid;
  8350 + id = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid;
8312 8351 }
8313 8352 else {
8314   - id = 'imageCanvas' + value.bodyRegionId + '_MR' + '|' + windowviewid;
  8353 + id = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid;
8315 8354 }
8316 8355 }
8317 8356 else {
8318 8357 if ($rootScope.multiViewCounter != undefined) {
8319   - id = 'imageCanvas' + value.bodyRegionId + '|' + windowviewid;
  8358 + id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
8320 8359 }
8321 8360 else {
8322   - id = 'imageCanvas' + value.bodyRegionId + '|' + windowviewid;
  8361 + id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
8323 8362 }
8324 8363  
8325 8364 }
... ... @@ -8496,7 +8535,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8496 8535 if (AllTerms != undefined && AllTerms.length > 0) {
8497 8536 $scope.HighlightBodyByTermList(AllTerms,windowviewid);
8498 8537 }
8499   - else {
  8538 + else
  8539 + {
  8540 + // If CB window data has no terms
  8541 + var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
  8542 + if (isHighlightBodyWithCBTermData == true) {
  8543 + $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false);
  8544 + $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []);
  8545 + $scope.SetwindowStoreData(windowviewid, 'AllTerms', []);
  8546 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
  8547 + // finish CB window load
  8548 + $rootScope.CBWindowLoadComplete = true;
  8549 + }
  8550 +
8500 8551 $scope.EnableUI();
8501 8552 }
8502 8553 }, 500);
... ... @@ -8564,18 +8615,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8564 8615 var id;
8565 8616 if (value.haveMirror == 'true') {
8566 8617 if ($rootScope.multiViewCounter != undefined) {
8567   - id = 'imageCanvas' + value.bodyRegionId + '_MR' + '|' + windowviewid;
  8618 + id = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid;
8568 8619 }
8569 8620 else {
8570   - id = 'imageCanvas' + value.bodyRegionId + '_MR'+'|' + windowviewid;;
  8621 + id = 'imageCanvas' + value.bodyRegionId + '_MR'+"_" + windowviewid;;
8571 8622 }
8572 8623 }
8573 8624 else {
8574 8625 if ($rootScope.multiViewCounter != undefined) {
8575   - id = 'imageCanvas' + value.bodyRegionId + '|' + windowviewid;
  8626 + id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
8576 8627 }
8577 8628 else {
8578   - id = 'imageCanvas' + value.bodyRegionId + '|' + windowviewid;
  8629 + id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
8579 8630 }
8580 8631 }
8581 8632  
... ... @@ -8826,8 +8877,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8826 8877  
8827 8878 $scope.OnGenderChange = function (event) {
8828 8879  
8829   - var windowviewid = (event.target.parentElement.parentElement.id).split("_")[1];
8830   -
  8880 + var len= (event.target.parentElement.parentElement.id).split("_").length;
  8881 + var windowviewid = (event.target.parentElement.parentElement.id).split("_")[len-1];
  8882 +
8831 8883 var genderId = $scope.GetwindowStoreData(windowviewid,'genderId');
8832 8884 if (genderId == event.currentTarget.title) {
8833 8885 return;
... ... @@ -8888,14 +8940,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8888 8940 $("#btnHighLight_" + windowviewid).addClass("btn-primary");
8889 8941  
8890 8942 }
8891   -
8892   - if ($rootScope.isCallFromOtherModule) {
8893   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
8894   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
8895   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
8896   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
8897   - }
8898   -
  8943 +
8899 8944 var currentBodyViewId = $scope.correspondingBodyViewIds[$scope.GetwindowStoreData(windowviewid,'voId')];
8900 8945  
8901 8946  
... ... @@ -9095,8 +9140,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9095 9140 }
9096 9141  
9097 9142 $scope.OnViewChange = function (event) {
9098   -
9099   - var windowviewid = (event.target.parentElement.parentElement.id).split('_')[1];
  9143 + var len= (event.target.parentElement.parentElement.id).split("_").length;
  9144 + var windowviewid = (event.target.parentElement.parentElement.id).split("_")[len-1];
9100 9145 var viewid = $scope.GetwindowStoreData(windowviewid,'voId')
9101 9146 var selectedViewId = $scope.bodyViews[event.currentTarget.title];
9102 9147  
... ... @@ -9130,7 +9175,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9130 9175 if ($rootScope.isOpenResourceBtnClicked) {
9131 9176  
9132 9177 var multiViewInfo = $rootScope.multiViewInfo;
9133   - var windowviewid = event.target.parentElement.parentElement.id.split('_')[1];
  9178 + //var windowviewid = event.target.parentElement.parentElement.id.split('_')[1];
9134 9179 $rootScope.multiViewCounter = windowviewid;
9135 9180 $scope.setScopeVariables();
9136 9181 }
... ... @@ -9191,15 +9236,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9191 9236 if (canDivChildCount > 0) {
9192 9237 canDiv.innerHTML = '';
9193 9238 }
9194   -
9195   - if ($rootScope.isCallFromOtherModule) {
9196   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
9197   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
9198   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
9199   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
9200   -
9201   - }
9202   -
  9239 +
9203 9240 $scope.SetwindowStoreData(windowviewid,'viewOrientationId',selectedViewId);
9204 9241 var genderId = $scope.GetwindowStoreData(windowviewid,'genderId');
9205 9242  
... ... @@ -9339,7 +9376,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9339 9376 $scope.loadNavigatorForSelectedBodyView = function (currentBodyViewId, windowviewid) {
9340 9377  
9341 9378 var NavigatorData=$scope.GetwindowStoreData(windowviewid,'NavigatorData');
9342   - $scope.SetwindowStoreData(windowviewid,'curentEthnicity',$rootScope.globalSetting.ethnicity);
  9379 +
  9380 + if (!$rootScope.isCallFromOtherModule) {
  9381 + $scope.SetwindowStoreData(windowviewid,'ModestyValue',$rootScope.globalSetting.modesty);
  9382 +
  9383 + }
  9384 + var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue');
  9385 +
  9386 + if (!$rootScope.isCallFromOtherModule) {
  9387 + $scope.SetwindowStoreData(windowviewid,'curentEthnicity',$rootScope.globalSetting.ethnicity);
  9388 +
  9389 + }
  9390 + var skinTone=$scope.GetwindowStoreData(windowviewid,'curentEthnicity');
  9391 +
9343 9392 if (NavigatorData != null || NavigatorData != undefined) {
9344 9393 var navdtlOrient = new jinqJs()
9345 9394 .from(NavigatorData.Navigtor.ViewOrientation)
... ... @@ -9351,7 +9400,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9351 9400  
9352 9401 var navOrientationdata = new jinqJs()
9353 9402 .from(navdtlOrient[0].ImageInfo)
9354   - .where("_Ethnicity == " + $rootScope.globalSetting.ethnicity)
  9403 + .where("_Ethnicity == " + skinTone)
9355 9404 .select();
9356 9405  
9357 9406 if (navOrientationdata != null || navOrientationdata != undefined) {
... ... @@ -9362,7 +9411,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9362 9411 var navImageModesty;
9363 9412  
9364 9413 angular.forEach(navigatorImage, function (value, key) {
9365   - if (value._HaveModesty === $rootScope.globalSetting.modesty) {
  9414 + if (value._HaveModesty === ModestyValue) {
9366 9415 navImageModesty = value._ImageName;
9367 9416 }
9368 9417 })
... ... @@ -9373,7 +9422,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9373 9422 }
9374 9423  
9375 9424 var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId');
9376   - document.getElementById("navimg_" + windowviewid).src = '~/../content/images/DA/ethnicity/body-views/' + bodyVid + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty;
  9425 + document.getElementById("navimg_" + windowviewid).src = '~/../content/images/DA/ethnicity/body-views/' + bodyVid + '/' + skinTone + '/navigator_images/' + navImageModesty;
9377 9426 }
9378 9427 }
9379 9428  
... ... @@ -9434,19 +9483,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9434 9483  
9435 9484 $scope.HighlightBodyByBodySystem = function (event) {
9436 9485  
9437   - var windowviewid = (event.target.parentElement.parentElement.id).split("_")[1];
  9486 + var len= (event.target.parentElement.parentElement.id).split("_").length;
  9487 + var windowviewid = (event.target.parentElement.parentElement.id).split("_")[len-1];
  9488 +
9438 9489 var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId');
9439 9490 $scope.SetwindowStoreData(windowviewid,'isExtract',false);
9440 9491 $("#structureDropdownDA_" + windowviewid).toggle();
9441 9492 $scope.DisableUI();
9442   -
9443   - if ($rootScope.isCallFromOtherModule) {
9444   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
9445   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
9446   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
9447   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
9448   - }
9449   -
  9493 +
9450 9494 $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false);
9451 9495 $rootScope.CloseListManager();
9452 9496  
... ... @@ -9522,7 +9566,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9522 9566 var viewtarget_highlightbody = angular.element(event.currentTarget);
9523 9567 var title_highlightbody = viewtarget_highlightbody.attr('title');
9524 9568  
9525   - $scope.removeBodySyetemSelectionClass(title_highlightbody);
  9569 + $scope.removeBodySyetemSelectionClass(windowviewid,title_highlightbody);
9526 9570  
9527 9571 //Highlight button should be active
9528 9572 $("#btnHighLight_" + windowviewid).addClass("btn-primary");
... ... @@ -9549,7 +9593,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9549 9593 $scope.removeCurrentHighlightedBodySystem = function (windowviewid) {
9550 9594 var grayImageDataList=$scope.GetwindowStoreData(windowviewid,'grayImageDataList');
9551 9595 for (var i = 0; i < grayImageDataList.length; i++) {
9552   - var grayCanvasID = 'imageCanvas' + parseInt(i + 1) + "|" + windowviewid;
  9596 + var grayCanvasID = 'imageCanvas' + parseInt(i + 1) + "_" + windowviewid;
9553 9597 var grayCanvas = document.getElementById(grayCanvasID);
9554 9598  
9555 9599 if (grayCanvas != null) {
... ... @@ -9563,220 +9607,63 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9563 9607 }
9564 9608 }
9565 9609  
9566   - $scope.removeBodySyetemSelectionClass = function (title_highlightbody) {
9567   - if (title_highlightbody == "CurrentStructure") {
9568   - $scope.CurrentStructure = "active";
9569   - $scope.Cardiovascular = "";
9570   - $scope.Digestive = "";
9571   - $scope.Endocrine = "";
9572   - $scope.Immune = "";
9573   - $scope.Integumentary = "";
9574   - $scope.Lymphatic = "";
9575   - $scope.Muscular = "";
9576   - $scope.Nervous = "";
9577   - $scope.Reproductive = "";
9578   - $scope.Respiratory = "";
9579   - $scope.Skeletal = "";
9580   - $scope.Urinary = "";
  9610 + $scope.removeBodySyetemSelectionClass = function (windowviewid,title_highlightbody) {
  9611 +
  9612 + $('#CurrentStructure_'+windowviewid).removeClass("active");
  9613 + $('#Cardiovascular_'+windowviewid).removeClass("active");
  9614 + $('#Digestive_'+windowviewid).removeClass("active");
  9615 + $('#Endocrine_'+windowviewid).removeClass("active");
  9616 + $('#Immune_'+windowviewid).removeClass("active");
  9617 + $('#Integumentary_'+windowviewid).removeClass("active");
  9618 + $('#Lymphatic_'+windowviewid).removeClass("active");
  9619 + $('#Muscular_'+windowviewid).removeClass("active");
  9620 + $('#Nervous_'+windowviewid).removeClass("active");
  9621 + $('#Reproductive_'+windowviewid).removeClass("active");
  9622 + $('#Respiratory_'+windowviewid).removeClass("active");
  9623 + $('#Skeletal_'+windowviewid).removeClass("active");
  9624 + $('#Urinary_'+windowviewid).removeClass("active");
  9625 +
  9626 + if (title_highlightbody == "Current Structure") {
  9627 + $('#CurrentStructure_'+windowviewid).addClass("active");
9581 9628 }
9582 9629 else if (title_highlightbody == "Cardiovascular") {
9583   - $scope.CurrentStructure = "";
9584   - $scope.Cardiovascular = "active";
9585   - $scope.Digestive = "";
9586   - $scope.Endocrine = "";
9587   - $scope.Immune = "";
9588   - $scope.Integumentary = "";
9589   - $scope.Lymphatic = "";
9590   - $scope.Muscular = "";
9591   - $scope.Nervous = "";
9592   - $scope.Reproductive = "";
9593   - $scope.Respiratory = "";
9594   - $scope.Skeletal = "";
9595   - $scope.Urinary = "";
  9630 + $('#Cardiovascular_'+windowviewid).addClass("active");
9596 9631 }
9597 9632  
9598 9633 else if (title_highlightbody == "Digestive") {
9599   - $scope.CurrentStructure = "";
9600   - $scope.Cardiovascular = "";
9601   - $scope.Digestive = "active";
9602   - $scope.Endocrine = "";
9603   - $scope.Immune = "";
9604   - $scope.Integumentary = "";
9605   - $scope.Lymphatic = "";
9606   - $scope.Muscular = "";
9607   - $scope.Nervous = "";
9608   - $scope.Reproductive = "";
9609   - $scope.Respiratory = "";
9610   - $scope.Skeletal = "";
9611   - $scope.Urinary = "";
  9634 + $('#Digestive_'+windowviewid).addClass("active");
9612 9635 }
9613 9636  
9614 9637 else if (title_highlightbody == "Endocrine") {
9615   - $scope.CurrentStructure = "";
9616   - $scope.Cardiovascular = "";
9617   - $scope.Digestive = "";
9618   - $scope.Endocrine = "active";
9619   - $scope.Immune = "";
9620   - $scope.Integumentary = "";
9621   - $scope.Lymphatic = "";
9622   - $scope.Muscular = "";
9623   - $scope.Nervous = "";
9624   - $scope.Reproductive = "";
9625   - $scope.Respiratory = "";
9626   - $scope.Skeletal = "";
9627   - $scope.Urinary = "";
  9638 + $('#Endocrine_'+windowviewid).addClass("active");
9628 9639 }
9629 9640 else if (title_highlightbody == "Immune") {
9630   -
9631   - $scope.CurrentStructure = "";
9632   - $scope.Cardiovascular = "";
9633   - $scope.Digestive = "";
9634   - $scope.Endocrine = "";
9635   - $scope.Immune = "active";
9636   - $scope.Integumentary = "";
9637   - $scope.Lymphatic = "";
9638   - $scope.Muscular = "";
9639   - $scope.Nervous = "";
9640   - $scope.Reproductive = "";
9641   - $scope.Respiratory = "";
9642   - $scope.Skeletal = "";
9643   - $scope.Urinary = "";
  9641 + $('#Immune_'+windowviewid).addClass("active");
9644 9642 }
9645 9643 else if (title_highlightbody == "Integumentary") {
9646   - $scope.CurrentStructure = "";
9647   - $scope.Cardiovascular = "";
9648   - $scope.Digestive = "";
9649   - $scope.Endocrine = "";
9650   - $scope.Immune = "";
9651   - $scope.Integumentary = "active";
9652   - $scope.Lymphatic = "";
9653   - $scope.Muscular = "";
9654   - $scope.Nervous = "";
9655   - $scope.Reproductive = "";
9656   - $scope.Respiratory = "";
9657   - $scope.Skeletal = "";
9658   - $scope.Urinary = "";
  9644 + $('#Integumentary_'+windowviewid).addClass("active");
9659 9645 }
9660 9646 else if (title_highlightbody == "Lymphatic") {
9661   - $scope.CurrentStructure = "";
9662   - $scope.Cardiovascular = "";
9663   - $scope.Digestive = "";
9664   - $scope.Endocrine = "";
9665   - $scope.Immune = "";
9666   - $scope.Integumentary = "";
9667   - $scope.Lymphatic = "active";
9668   - $scope.Muscular = "";
9669   - $scope.Nervous = "";
9670   - $scope.Reproductive = "";
9671   - $scope.Respiratory = "";
9672   - $scope.Skeletal = "";
9673   - $scope.Urinary = "";
  9647 + $('#Lymphatic_'+windowviewid).addClass("active");
9674 9648 }
9675 9649 else if (title_highlightbody == "Muscular") {
9676   - $scope.CurrentStructure = "";
9677   - $scope.Cardiovascular = "";
9678   - $scope.Digestive = "";
9679   - $scope.Endocrine = "";
9680   - $scope.Immune = "";
9681   - $scope.Integumentary = "";
9682   - $scope.Lymphatic = "";
9683   - $scope.Muscular = "active";
9684   - $scope.Nervous = "";
9685   - $scope.Reproductive = "";
9686   - $scope.Respiratory = "";
9687   - $scope.Skeletal = "";
9688   - $scope.Urinary = "";
  9650 + $('#Muscular_'+windowviewid).addClass("active");
9689 9651 }
9690 9652 else if (title_highlightbody == "Nervous") {
9691   - $scope.CurrentStructure = "";
9692   - $scope.Cardiovascular = "";
9693   - $scope.Digestive = "";
9694   - $scope.Endocrine = "";
9695   - $scope.Immune = "";
9696   - $scope.Integumentary = "";
9697   - $scope.Lymphatic = "";
9698   - $scope.Muscular = "";
9699   - $scope.Nervous = "active";
9700   - $scope.Reproductive = "";
9701   - $scope.Respiratory = "";
9702   - $scope.Skeletal = "";
9703   - $scope.Urinary = "";
  9653 + $('#Nervous_'+windowviewid).addClass("active");
9704 9654 }
9705 9655 else if (title_highlightbody == "Reproductive") {
9706   - $scope.CurrentStructure = "";
9707   - $scope.Cardiovascular = "";
9708   - $scope.Digestive = "";
9709   - $scope.Endocrine = "";
9710   - $scope.Immune = "";
9711   - $scope.Integumentary = "";
9712   - $scope.Lymphatic = "";
9713   - $scope.Muscular = "";
9714   - $scope.Nervous = "";
9715   - $scope.Reproductive = "active";
9716   - $scope.Respiratory = "";
9717   - $scope.Skeletal = "";
9718   - $scope.Urinary = "";
  9656 + $('#Reproductive_'+windowviewid).addClass("active");
9719 9657 }
9720 9658 else if (title_highlightbody == "Respiratory") {
9721   - $scope.CurrentStructure = "";
9722   - $scope.Cardiovascular = "";
9723   - $scope.Digestive = "";
9724   - $scope.Endocrine = "";
9725   - $scope.Immune = "";
9726   - $scope.Integumentary = "";
9727   - $scope.Lymphatic = "";
9728   - $scope.Muscular = "";
9729   - $scope.Nervous = "";
9730   - $scope.Reproductive = "";
9731   - $scope.Respiratory = "active";
9732   - $scope.Skeletal = "";
9733   - $scope.Urinary = "";
  9659 + $('#Respiratory_'+windowviewid).addClass("active");
9734 9660 }
9735 9661 else if (title_highlightbody == "Skeletal") {
9736   - $scope.CurrentStructure = "";
9737   - $scope.Cardiovascular = "";
9738   - $scope.Digestive = "";
9739   - $scope.Endocrine = "";
9740   - $scope.Immune = "";
9741   - $scope.Integumentary = "";
9742   - $scope.Lymphatic = "";
9743   - $scope.Muscular = "";
9744   - $scope.Nervous = "";
9745   - $scope.Reproductive = "";
9746   - $scope.Respiratory = "";
9747   - $scope.Skeletal = "active";
9748   - $scope.Urinary = "";
  9662 + $('#Skeletal_'+windowviewid).addClass("active");
9749 9663 }
9750 9664 else if (title_highlightbody == "Urinary") {
9751   - $scope.CurrentStructure = "";
9752   - $scope.Cardiovascular = "";
9753   - $scope.Digestive = "";
9754   - $scope.Endocrine = "";
9755   - $scope.Immune = "";
9756   - $scope.Integumentary = "";
9757   - $scope.Lymphatic = "";
9758   - $scope.Muscular = "";
9759   - $scope.Nervous = "";
9760   - $scope.Reproductive = "";
9761   - $scope.Respiratory = "";
9762   - $scope.Skeletal = "";
9763   - $scope.Urinary = "active";
9764   - }
9765   - else {
9766   - $scope.CurrentStructure = "";
9767   - $scope.Cardiovascular = "";
9768   - $scope.Digestive = "";
9769   - $scope.Endocrine = "";
9770   - $scope.Immune = "";
9771   - $scope.Integumentary = "";
9772   - $scope.Lymphatic = "";
9773   - $scope.Muscular = "";
9774   - $scope.Nervous = "";
9775   - $scope.Reproductive = "";
9776   - $scope.Respiratory = "";
9777   - $scope.Skeletal = "";
9778   - $scope.Urinary = "";
9779   - }
  9665 + $('#Urinary_'+windowviewid).addClass("active");
  9666 + }
9780 9667 }
9781 9668  
9782 9669 $scope.ShowSearch = function (windowviewid) {
... ... @@ -9867,9 +9754,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9867 9754  
9868 9755  
9869 9756 $scope.HideSearch = function () {
9870   -
9871   - var windowviewid = (event.currentTarget.id).split("_")[1];
9872   -
  9757 + var len= (event.currentTarget.id).split("_").length;
  9758 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
  9759 +
9873 9760 $timeout(function () {
9874 9761 $("#termlistfilter_" + windowviewid).css("display", "none");
9875 9762  
... ... @@ -9878,9 +9765,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9878 9765 }
9879 9766  
9880 9767 $scope.jumpToTerm = function (event) {
9881   -
9882   - var windowviewid = (event.target.parentElement.parentElement.id).split("_")[1];
9883   -
  9768 + var len= (event.target.parentElement.parentElement.id).split("_").length;
  9769 + var windowviewid = (event.target.parentElement.parentElement.id).split("_")[len-1];
  9770 +
9884 9771 $rootScope.isTermClicked = true;
9885 9772 var currenttermidTxt=$('#' + event.currentTarget.id).text();
9886 9773  
... ... @@ -9892,14 +9779,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9892 9779 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
9893 9780 $('#termList option[value="' + currenttermidTxt + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
9894 9781  
9895   -
9896   - if ($rootScope.isCallFromOtherModule) {
9897   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
9898   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
9899   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
9900   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
9901   - }
9902   -
9903 9782 $rootScope.isLoading = true;
9904 9783  
9905 9784 $('#spinner').css('visibility', 'visible');
... ... @@ -9946,7 +9825,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9946 9825 //Function to set the vertical and horizontal scroll position of CanvasDiv as per the Navigator
9947 9826 $scope.ScrollCanvasDiv = function (event) {
9948 9827  
9949   - var windowviewid = (event.target.id).split("_")[1];
  9828 + var len= (event.target.id).split("_").length;
  9829 + var windowviewid = (event.target.id).split("_")[len-1];
  9830 +
9950 9831 var x = $("#" + event.target.id).position();
9951 9832 var can = $("#canvasDivDA_" + windowviewid);
9952 9833 var canheight = can[0].scrollHeight;
... ... @@ -10161,7 +10042,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10161 10042 $scope.SetwindowStoreData(windowviewid,'isHighlightBodyByBodySystem',false);
10162 10043 $scope.SetwindowStoreData(windowviewid,'isbodySystemHighlight',false);
10163 10044  
10164   - $scope.removeBodySyetemSelectionClass("");
  10045 + $scope.removeBodySyetemSelectionClass(windowviewid,"");
10165 10046 //1.
10166 10047 $scope.SetwindowStoreData(windowviewid,'actualTermNumber',actualTermNumber);
10167 10048 console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + actualTermNumber)
... ... @@ -10580,7 +10461,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10580 10461  
10581 10462 $scope.LayerChangeBasedOnKeyPressed = function (e) {
10582 10463  
10583   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10464 + var len= (event.currentTarget.id).split("_").length;
  10465 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
  10466 +
10584 10467 // 'x' button is displaying inside the input box in IE browser.
10585 10468 if (e.keyCode == 38) {
10586 10469  
... ... @@ -10620,7 +10503,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10620 10503  
10621 10504 $scope.LayerValueChangeBasedOnKeyUp = function (e) {
10622 10505  
10623   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10506 + var len= (event.currentTarget.id).split("_").length;
  10507 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
  10508 +
10624 10509 var totalayer=$scope.GetwindowStoreData(windowviewid,'totalLayers');
10625 10510 if (e.keyCode == 13) {
10626 10511  
... ... @@ -10677,9 +10562,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10677 10562 }
10678 10563  
10679 10564 $scope.showFilteredTerms = function () {
10680   - var targetid = event.target.id;
10681   - var windowviewid = targetid.split('_')[1];
10682   -
  10565 + var len= (event.target.id).split("_").length;
  10566 + var windowviewid = (event.target.id).split("_")[len-1];
  10567 +
10683 10568 if ($('#searchListDiv_' + windowviewid).html() != "") {
10684 10569 $('#searchListDiv_' + windowviewid).empty();
10685 10570 }
... ... @@ -10707,8 +10592,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10707 10592 }, 100);
10708 10593 };
10709 10594 $scope.ApplySearch = function () {
10710   -
10711   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10595 + var len= (event.currentTarget.id).split("_").length;
  10596 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
  10597 +
10712 10598 $rootScope.isLoading = false;
10713 10599 $('#spinner').css('visibility', 'hidden');
10714 10600  
... ... @@ -10780,8 +10666,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10780 10666 }
10781 10667 $scope.closeSerachTermListPopUp = function () {
10782 10668  
10783   - var windowviewid = (event.target.parentElement.parentElement.parentElement.id).split("_")[1];
10784   -
  10669 + var len= (event.target.parentElement.parentElement.parentElement.id).split("_").length;
  10670 + var windowviewid = (event.target.parentElement.parentElement.parentElement.id).split("_")[len-1];
  10671 +
10785 10672 $('#searchedTermListPopUp_' + windowviewid).css('display', 'none');
10786 10673 $('#searchedTermListPopUp_' + windowviewid).css("visibility", "hidden");
10787 10674  
... ... @@ -10828,7 +10715,8 @@ function OnSearch(event) {
10828 10715 console.log('Show Search is called outside ');
10829 10716 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10830 10717 scope.$apply(function () {
10831   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10718 + var len= (event.currentTarget.id).split("_").length;
  10719 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10832 10720 scope.ShowSearch(windowviewid);
10833 10721 });
10834 10722 }
... ... @@ -10861,7 +10749,8 @@ function OnEnableExtract() {
10861 10749 console.log('OnEnableExtract is called outside ');
10862 10750 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10863 10751 scope.$apply(function () {
10864   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10752 + var len= (event.currentTarget.id).split("_").length;
  10753 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10865 10754 scope.enableExtract('true',windowviewid);
10866 10755 });
10867 10756 }
... ... @@ -10871,7 +10760,8 @@ function onTboxCreation() {
10871 10760 console.log('OnEnableExtract is called outside ');
10872 10761 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10873 10762 scope.$apply(function () {
10874   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10763 + var len= (event.currentTarget.id).split("_").length;
  10764 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10875 10765 scope.createTransparencyBox(windowviewid);
10876 10766 });
10877 10767 }
... ... @@ -10880,7 +10770,8 @@ function onTboxClose() {
10880 10770 console.log('onTboxClose is called outside ');
10881 10771 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10882 10772 scope.$apply(function () {
10883   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10773 + var len= (event.currentTarget.id).split("_").length;
  10774 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10884 10775 scope.CloseTransparencyBox(windowviewid);
10885 10776 });
10886 10777 }
... ... @@ -10890,7 +10781,8 @@ function OnEnableNormalMode() {
10890 10781  
10891 10782 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10892 10783 scope.$apply(function () {
10893   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10784 + var len= (event.currentTarget.id).split("_").length;
  10785 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10894 10786 scope.enableNormalMode(windowviewid);
10895 10787 });
10896 10788 }
... ... @@ -10899,7 +10791,8 @@ function OnEnableHighlight() {
10899 10791 console.log('OnEnableHighlight is called outside ');
10900 10792 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10901 10793 scope.$apply(function () {
10902   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10794 + var len= (event.currentTarget.id).split("_").length;
  10795 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10903 10796 scope.enableHighlight(windowviewid);
10904 10797 });
10905 10798 }
... ... @@ -10908,7 +10801,8 @@ function OnIdentifyClick() {
10908 10801 console.log('OnIdentifyClick is called outside ');
10909 10802 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10910 10803 scope.$apply(function () {
10911   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10804 + var len= (event.currentTarget.id).split("_").length;
  10805 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10912 10806 scope.IdentifyClick(windowviewid);
10913 10807 });
10914 10808 }
... ... @@ -10916,7 +10810,8 @@ function OnIdentifyClick() {
10916 10810 function OnZoom(event) {
10917 10811 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10918 10812 scope.DisableUI();
10919   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10813 + var len= (event.currentTarget.id).split("_").length;
  10814 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10920 10815  
10921 10816 if ($(".btn-annotation").hasClass("activebtncolor")) //Bug #14928
10922 10817 $(".btn-annotation").removeClass("activebtncolor");
... ... @@ -10943,7 +10838,8 @@ function onListManagerTermSelection(id, isTermListOptionClicked) {
10943 10838  
10944 10839 function genderChange(event) {
10945 10840 event.stopPropagation();
10946   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10841 + var len= (event.currentTarget.id).split("_").length;
  10842 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10947 10843  
10948 10844 $("#structureDropdownDA_" + windowviewid).css("display", "none");
10949 10845 $("#viewChangeIDDA_" + windowviewid).css("display", "none");
... ... @@ -10958,8 +10854,9 @@ function genderChange(event) {
10958 10854  
10959 10855 function viewChange(event) {
10960 10856 event.stopPropagation();
10961   - var windowviewid = (event.currentTarget.id).split("_")[1];
10962   -
  10857 + var len= (event.currentTarget.id).split("_").length;
  10858 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
  10859 +
10963 10860 $("#structureDropdownDA_" + windowviewid).css("display", "none");
10964 10861 $("#genderChangeIdDA_" + windowviewid).css("display", "none");
10965 10862 $("#viewChangeIDDA_" + windowviewid).toggle();
... ... @@ -10973,7 +10870,9 @@ function viewChange(event) {
10973 10870  
10974 10871 //body highlight options functinality
10975 10872 function LoadBodySystemData(event) {
10976   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10873 + var len= (event.currentTarget.id).split("_").length;
  10874 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
  10875 +
10977 10876 event.stopPropagation();
10978 10877 $("#structureDropdownDA_" + windowviewid).toggle();
10979 10878 $("#genderChangeIdDA_" + windowviewid).css("display", "none");
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -1246,6 +1246,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
1246 1246 $rootScope.OpenPitures = "OpenPitures";
1247 1247 $rootScope.newCurriculum = "newCurriculum";
1248 1248 $rootScope.openCurriculum = "openCurriculum";
  1249 + $rootScope.saveCurriculam = "saveCurriculam";
1249 1250 $rootScope.PrintPreview = "";
1250 1251 $rootScope.exportImage = "";
1251 1252 $rootScope.PrintViewer = "";
... ... @@ -1261,6 +1262,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
1261 1262 $rootScope.OpenPitures = "OpenPitures";
1262 1263 $rootScope.newCurriculum = "newCurriculum";
1263 1264 $rootScope.openCurriculum = "openCurriculum";
  1265 + $rootScope.saveCurriculam = "saveCurriculam";
1264 1266 $rootScope.PrintPreview = "";
1265 1267 $rootScope.exportImage = "";
1266 1268 $rootScope.PrintViewer = "";
... ... @@ -1275,6 +1277,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
1275 1277 $rootScope.OpenPitures = "OpenPitures";
1276 1278 $rootScope.newCurriculum = "newCurriculum";
1277 1279 $rootScope.openCurriculum = "openCurriculum";
  1280 + $rootScope.saveCurriculam = "saveCurriculam";
1278 1281 $rootScope.PrintPreview = "";
1279 1282 $rootScope.exportImage = "";
1280 1283 $rootScope.PrintViewer = "";
... ... @@ -1414,7 +1417,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
1414 1417 for (var i = 0; i < $rootScope.openViews.length; i++) {
1415 1418 k++;
1416 1419 //if ($rootScope.openViews[i].body - views == title) {
1417   - if ($rootScope.openViews[i].body-views == title) {
  1420 + if ($rootScope.openViews[i].bodyView == title) {
1418 1421 $rootScope.openViews.splice((k - 1), 1);
1419 1422  
1420 1423 $rootScope.openViews.push(
... ... @@ -1456,7 +1459,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
1456 1459 var canvasPaintElement;
1457 1460 if($location.url() == "/da-body-view")
1458 1461 {
1459   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  1462 + var MultiWinId=$rootScope.GetDaWindowId();
  1463 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
1460 1464 }
1461 1465 else
1462 1466 {
... ... @@ -1690,8 +1694,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
1690 1694 var canvasPaintElement;
1691 1695 if($location.url() == "/da-body-view")
1692 1696 {
1693   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
1694   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  1697 + var MultiWinId=$rootScope.GetDaWindowId();
  1698 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
  1699 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
1695 1700 }
1696 1701 else
1697 1702 {
... ... @@ -1858,8 +1863,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
1858 1863 var canvasPaintElement;
1859 1864 if($location.url() == "/da-body-view")
1860 1865 {
1861   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
1862   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  1866 + var MultiWinId=$rootScope.GetDaWindowId();
  1867 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
  1868 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
1863 1869 }
1864 1870 else
1865 1871 {
... ... @@ -1897,9 +1903,10 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
1897 1903 var canvasElement;
1898 1904 var canvasPaintElement;
1899 1905 if($location.url() == "/da-body-view")
1900   - {
1901   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
1902   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  1906 + {
  1907 + var MultiWinId=$rootScope.GetDaWindowId();
  1908 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
  1909 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
1903 1910 }
1904 1911 else
1905 1912 {
... ... @@ -1929,8 +1936,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
1929 1936 var canvasPaintElement;
1930 1937 if($location.url() == "/da-body-view")
1931 1938 {
1932   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
1933   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  1939 + var MultiWinId=$rootScope.GetDaWindowId();
  1940 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
  1941 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
1934 1942 }
1935 1943 else
1936 1944 {
... ... @@ -1987,8 +1995,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
1987 1995 var canvasPaintElement;
1988 1996 if($location.url() == "/da-body-view")
1989 1997 {
1990   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
1991   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  1998 + var MultiWinId=$rootScope.GetDaWindowId();
  1999 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
  2000 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
1992 2001 }
1993 2002 else
1994 2003 {
... ... @@ -2027,8 +2036,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
2027 2036 var canvasPaintElement;
2028 2037 if($location.url() == "/da-body-view")
2029 2038 {
2030   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
2031   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  2039 + var MultiWinId=$rootScope.GetDaWindowId();
  2040 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
  2041 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
2032 2042 }
2033 2043 else
2034 2044 {
... ... @@ -2104,8 +2114,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
2104 2114 var canvasPaintElement;
2105 2115 if($location.url() == "/da-body-view")
2106 2116 {
2107   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
2108   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  2117 + var MultiWinId=$rootScope.GetDaWindowId();
  2118 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
  2119 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
2109 2120 }
2110 2121 else
2111 2122 {
... ... @@ -2183,8 +2194,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
2183 2194 var canvasPaintElement;
2184 2195 if($location.url() == "/da-body-view")
2185 2196 {
2186   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
2187   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  2197 + var MultiWinId=$rootScope.GetDaWindowId();
  2198 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
  2199 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
2188 2200 }
2189 2201 else
2190 2202 {
... ... @@ -2222,8 +2234,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
2222 2234 var canvasPaintElement;
2223 2235 if($location.url() == "/da-body-view")
2224 2236 {
2225   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
2226   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  2237 + var MultiWinId=$rootScope.GetDaWindowId();
  2238 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
  2239 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
2227 2240 }
2228 2241 else
2229 2242 {
... ... @@ -2260,8 +2273,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
2260 2273 var canvasPaintElement;
2261 2274 if($location.url() == "/da-body-view")
2262 2275 {
2263   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
2264   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  2276 + var MultiWinId=$rootScope.GetDaWindowId();
  2277 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
  2278 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
2265 2279 }
2266 2280 else
2267 2281 {
... ... @@ -2299,8 +2313,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
2299 2313 var canvasPaintElement;
2300 2314 if($location.url() == "/da-body-view")
2301 2315 {
2302   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
2303   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  2316 + var MultiWinId=$rootScope.GetDaWindowId();
  2317 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
  2318 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
2304 2319 }
2305 2320 else
2306 2321 {
... ... @@ -2333,8 +2348,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
2333 2348 var canvasPaintElement;
2334 2349 if($location.url() == "/da-body-view")
2335 2350 {
2336   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
2337   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  2351 + var MultiWinId=$rootScope.GetDaWindowId();
  2352 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
  2353 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
2338 2354 }
2339 2355 else
2340 2356 {
... ... @@ -2423,8 +2439,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
2423 2439 // handling for DA
2424 2440 var canvasPaintElement;
2425 2441 if($location.url() == "/da-body-view")
2426   - {
2427   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
  2442 + {
  2443 + var MultiWinId=$rootScope.GetDaWindowId();
  2444 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
2428 2445 }
2429 2446 else
2430 2447 {
... ... @@ -3516,8 +3533,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
3516 3533 var canvasDiv;
3517 3534 if($location.url() == "/da-body-view")
3518 3535 {
3519   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
3520   - canvasDiv=document.getElementById('canvasDivDA_'+$rootScope.MULTI_VIEW_ID);
  3536 + var MultiWinId=$rootScope.GetDaWindowId();
  3537 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
  3538 + canvasDiv=document.getElementById('canvasDivDA_'+MultiWinId);
3521 3539 }
3522 3540 else
3523 3541 {
... ... @@ -3577,10 +3595,11 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
3577 3595 var canvasPaintElement;
3578 3596 var canvasDiv;
3579 3597 if($location.url() == "/da-body-view")
3580   - {
3581   - AnnotationCanvas=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
3582   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
3583   - canvasDiv=document.getElementById('canvasDivDA_'+$rootScope.MULTI_VIEW_ID);
  3598 + {
  3599 + var MultiWinId=$rootScope.GetDaWindowId();
  3600 + AnnotationCanvas=document.getElementById('canvasDA_'+MultiWinId);
  3601 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
  3602 + canvasDiv=document.getElementById('canvasDivDA_'+MultiWinId);
3584 3603 }
3585 3604 else
3586 3605 {
... ... @@ -3685,8 +3704,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
3685 3704 // handling for DA
3686 3705 var canvasDiv;
3687 3706 if($location.url() == "/da-body-view")
3688   - {
3689   - canvasDiv=document.getElementById('canvasDivDA_'+$rootScope.MULTI_VIEW_ID);
  3707 + {
  3708 + var MultiWinId=$rootScope.GetDaWindowId();
  3709 + canvasDiv=document.getElementById('canvasDivDA_'+MultiWinId);
3690 3710 }
3691 3711 else
3692 3712 {
... ... @@ -3779,8 +3799,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
3779 3799 // handling for DA
3780 3800 var canvasElement;
3781 3801 if($location.url() == "/da-body-view")
3782   - {
3783   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
  3802 + {
  3803 + var MultiWinId=$rootScope.GetDaWindowId();
  3804 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
3784 3805 }
3785 3806 else
3786 3807 {
... ... @@ -5019,7 +5040,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5019 5040 var annotationCanvas;
5020 5041 if($location.url() == "/da-body-view")
5021 5042 {
5022   - annotationCanvas=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
  5043 + var MultiWinId=$rootScope.GetDaWindowId();
  5044 + annotationCanvas=document.getElementById('canvasDA_'+MultiWinId);
5023 5045 }
5024 5046 else
5025 5047 {
... ... @@ -5062,7 +5084,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5062 5084 var canvasElement;
5063 5085 if($location.url() == "/da-body-view")
5064 5086 {
5065   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
  5087 + var MultiWinId=$rootScope.GetDaWindowId();
  5088 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
5066 5089 }
5067 5090 else
5068 5091 {
... ... @@ -5298,8 +5321,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5298 5321 var canvasPaintElement;
5299 5322 if($location.url() == "/da-body-view")
5300 5323 {
5301   - canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
5302   - $("#btnTranparency_" + $rootScope.MULTI_VIEW_ID).removeAttr('disabled', 'disabled');
  5324 + var MultiWinId=$rootScope.GetDaWindowId();
  5325 + canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
  5326 + $("#btnTranparency_" + MultiWinId).removeAttr('disabled', 'disabled');
5303 5327 }
5304 5328 else
5305 5329 {
... ... @@ -5484,8 +5508,12 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5484 5508 $rootScope.UpdateAndCloseSetting = function (setting) {
5485 5509  
5486 5510 $rootScope.UpdateSetting(setting);
5487   - if ($rootScope.MenuModuleName == "DA" || $rootScope.MenuModuleName == "AA") {
5488   - $rootScope.loadSearchData($rootScope.MULTI_VIEW_ID);
  5511 + if ($rootScope.MenuModuleName == "DA") {
  5512 + var MultiWinId=$rootScope.GetDaWindowId();
  5513 + $rootScope.loadSearchData(MultiWinId);
  5514 + }
  5515 + if ($rootScope.MenuModuleName == "AA") {
  5516 + $rootScope.loadSearchData();
5489 5517 }
5490 5518 $rootScope.isApplyBtnClicked = false;
5491 5519 //$timeout(function () {
... ... @@ -5626,13 +5654,14 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5626 5654  
5627 5655 $rootScope.globalSetting.ethnicity = $rootScope.getLocalStorageValue("globalEthnicity");
5628 5656  
5629   - if ($('.modestyImg_'+$rootScope.MULTI_VIEW_ID) != null) {
  5657 + var MultiWinId=$rootScope.GetDaWindowId();
  5658 + if ($('.modestyImg_'+MultiWinId) != null) {
5630 5659 if (($rootScope.globalSetting.modesty == 'Y')) {
5631   - $('.modestyImg_'+$rootScope.MULTI_VIEW_ID).css('visibility', 'visible');
  5660 + $('.modestyImg_'+MultiWinId).css('visibility', 'visible');
5632 5661 }
5633 5662  
5634 5663 else {
5635   - $('.modestyImg_'+$rootScope.MULTI_VIEW_ID).css('visibility', 'hidden');
  5664 + $('.modestyImg_'+MultiWinId).css('visibility', 'hidden');
5636 5665 }
5637 5666 }
5638 5667  
... ... @@ -5647,14 +5676,14 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5647 5676 }
5648 5677 if ($rootScope.isLayerLessSeven == true) {
5649 5678 if (($rootScope.globalSetting.modesty == 'Y')) {
5650   - $('.modestyImg_'+$rootScope.MULTI_VIEW_ID).css('visibility', 'visible');
  5679 + $('.modestyImg_'+MultiWinId).css('visibility', 'visible');
5651 5680 }
5652 5681  
5653 5682  
5654 5683 }
5655 5684 else {
5656 5685  
5657   - $('.modestyImg_'+$rootScope.MULTI_VIEW_ID).css('visibility', 'hidden');
  5686 + $('.modestyImg_'+MultiWinId).css('visibility', 'hidden');
5658 5687 }
5659 5688 if ($rootScope.isTBLayerLessSeven == true) {
5660 5689 if (($rootScope.globalSetting.modesty == 'Y')) {
... ... @@ -5688,16 +5717,6 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5688 5717 };
5689 5718  
5690 5719  
5691   -
5692   -
5693   -
5694   -
5695   -
5696   -
5697   -
5698   -
5699   -
5700   -
5701 5720 $rootScope.reloadChildController = function () {
5702 5721  
5703 5722 var len = $rootScope.openModules.length;
... ... @@ -5746,13 +5765,13 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5746 5765 }
5747 5766 };
5748 5767  
5749   -
5750   -
5751 5768 $rootScope.ShowPrintWindow = function () { // Print Active Viewer
  5769 +
5752 5770 var canvasDivElement;
5753 5771 if($location.url() == "/da-body-view")
5754   - {
5755   - canvasDivElement=document.getElementById('canvasDivDA_'+$rootScope.MULTI_VIEW_ID);
  5772 + {
  5773 + var MultiWinId=$rootScope.GetDaWindowId();
  5774 + canvasDivElement=document.getElementById('canvasDivDA_'+MultiWinId);
5756 5775 }
5757 5776 else
5758 5777 {
... ... @@ -5791,7 +5810,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5791 5810 var canvasDivElement;
5792 5811 if($location.url() == "/da-body-view")
5793 5812 {
5794   - canvasDivElement=document.getElementById('canvasDivDA_'+$rootScope.MULTI_VIEW_ID);
  5813 + var MultiWinId=$rootScope.GetDaWindowId();
  5814 + canvasDivElement=document.getElementById('canvasDivDA_'+MultiWinId);
5795 5815 }
5796 5816 else
5797 5817 {
... ... @@ -5815,7 +5835,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5815 5835  
5816 5836 OpenJSPanel(); // open jsPanel here
5817 5837 if ($('#jsPanel-1').length > 0) {
5818   - $('.jsPanel-btn-norm').attr('style', 'display: block');
  5838 + // $('.jsPanel-btn-norm').attr('style', 'display: block');
5819 5839 }
5820 5840  
5821 5841 console.log('jsPanel loaded exist= ' + document.getElementById('jsPanel-1')); // document.getElementsByClassName('ppImagePanel'));
... ... @@ -5869,11 +5889,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5869 5889  
5870 5890 }
5871 5891  
5872   - $('#fileMenuAnchor').parent().addClass('disableFileMenu');
5873   - if ($('#daImagePanel').length > 0) {
5874   - console.log('close')
5875   -
5876   - }
  5892 + $('#fileMenuAnchor').parent().addClass('disableFileMenu');
5877 5893 }
5878 5894 });
5879 5895  
... ... @@ -5896,7 +5912,17 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
5896 5912 };
5897 5913  
5898 5914 function OpenJSPanel() {
5899   - $("#daImagePanel").css({ "pointer-events": "none", "opacity": ".5" });
  5915 + // handling for DA
  5916 + var daImagePanelElement;
  5917 + if($location.url() == "/da-body-view")
  5918 + {
  5919 + var MultiWinId=$rootScope.GetDaWindowId();
  5920 + daImagePanelElement=document.getElementById('daImagePanel_'+MultiWinId);
  5921 + var daImagePanel=daImagePanelElement.id;
  5922 +
  5923 + $("#"+daImagePanel).css({ "pointer-events": "none", "opacity": ".5" });
  5924 + }
  5925 +
5900 5926 $("#ciImagePanel").css({ "pointer-events": "none", "opacity": ".5" });
5901 5927 $("#aiImagePanel").css({ "pointer-events": "none", "opacity": ".5" });
5902 5928 $("#ImagePanel").css({ "pointer-events": "none", "opacity": ".5" });
... ... @@ -6003,7 +6029,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
6003 6029 var canvasDivElement;
6004 6030 if($location.url() == "/da-body-view")
6005 6031 {
6006   - canvasDivElement=document.getElementById('canvasDivDA_'+$rootScope.MULTI_VIEW_ID);
  6032 + var MultiWinId=$rootScope.GetDaWindowId();
  6033 + canvasDivElement=document.getElementById('canvasDivDA_'+MultiWinId);
6007 6034 }
6008 6035 else
6009 6036 {
... ... @@ -6052,7 +6079,18 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
6052 6079 }
6053 6080  
6054 6081 $(document).on('click', '#jsPanel-1 .jsglyph-remove', function () {
6055   - $("#daImagePanel").css({ "pointer-events": "auto", "opacity": "1" });
  6082 + // handling for DA
  6083 + var daImagePanelElement;
  6084 + if($location.url() == "/da-body-view")
  6085 + {
  6086 + var MultiWinId=$rootScope.GetDaWindowId();
  6087 + daImagePanelElement=document.getElementById('daImagePanel_'+MultiWinId);
  6088 + var daImagePanel=daImagePanelElement.id;
  6089 +
  6090 + $("#"+daImagePanel).css({ "pointer-events": "auto", "opacity": "1" });
  6091 +
  6092 + }
  6093 +
6056 6094 $("#ciImagePanel").css({ "pointer-events": "auto", "opacity": "1" });
6057 6095 $("#aiImagePanel").css({ "pointer-events": "auto", "opacity": "1" });
6058 6096 $("#ImagePanel").css({ "pointer-events": "auto", "opacity": "1" });
... ... @@ -6153,7 +6191,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
6153 6191 var canvasElement;
6154 6192 if($location.url() == "/da-body-view")
6155 6193 {
6156   - canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
  6194 + var MultiWinId=$rootScope.GetDaWindowId();
  6195 + canvasElement=document.getElementById('canvasDA_'+MultiWinId);
6157 6196 }
6158 6197 else
6159 6198 {
... ... @@ -6166,6 +6205,38 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
6166 6205  
6167 6206 };
6168 6207  
  6208 + $rootScope.SaveImagefile = function () {
  6209 + // handling for DA
  6210 + var canvasDiv;
  6211 + if($location.url() == "/da-body-view")
  6212 + {
  6213 + var MultiWinId=$rootScope.GetDaWindowId();
  6214 + canvasDiv=document.getElementById('canvasDivDA_'+MultiWinId);
  6215 + }
  6216 + else
  6217 + {
  6218 + canvasDiv = document.getElementById('canvasDiv');
  6219 + }
  6220 + var canvasDivId=canvasDiv.id;
  6221 + $("#"+canvasDivId).append("<img id='exportlogo' class='img-responsive' src='content/images/adam-logo-small.png'/>");
  6222 + html2canvas($("#"+canvasDivId), {
  6223 + onrendered: function (canvas) {
  6224 + //theCanvas = canvas;
  6225 + var fileName = document.getElementById("filename").value + '.jpg';
  6226 + if (typeof (fileName) == "undefined" || fileName == ".jpg")
  6227 + fileName = "Untitled.jpg"
  6228 + var dataURL = canvas.toDataURL("image/jpeg");
  6229 + var blob = dataURItoBlob(dataURL);
  6230 + console.log(blob);
  6231 + saveAs(blob, fileName);
  6232 + $("#exportlogo").remove();
  6233 + $("#filename").val("");
  6234 + }
  6235 + });
  6236 + $(".export-image").css("display", "none");
  6237 +
  6238 + };
  6239 +
6169 6240 }]
6170 6241 );
6171 6242  
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... ... @@ -156,7 +156,7 @@
156 156 <div class="custom-tooltip">Highlight Options</div>
157 157 <button class="btn btn-black btn-sm pull-right marginTop5 dropdown-toggle" type="button" id="dropdownMenu2" onclick="LoadBodySystemData(event)"><img src="content/images/icon-highlight.png" alt="" title=""></button>
158 158 <ul class="tool-dropdown-menu" id="structureDropdown">
159   - <li ng-class="CurrentStructure">
  159 + <li id="CurrentStructure">
160 160 <a href="#" title="Current Structure" id="0" onclick="OnBodySystemSelection(event)">
161 161 Current Structure
162 162 </a>
... ... @@ -164,18 +164,18 @@
164 164  
165 165 <li role="separator" class="divider"></li>
166 166  
167   - <li ng-class="Cardiovascular"><a href="#" title="Cardiovascular" id="1" onclick="OnBodySystemSelection(event)">Cardiovascular</a></li>
168   - <li ng-class="Digestive"><a href="#" title="Digestive" id="2" onclick="OnBodySystemSelection(event)">Digestive</a></li>
169   - <li ng-class="Endocrine"><a href="#" title="Endocrine" id="3" onclick="OnBodySystemSelection(event)">Endocrine</a></li>
170   - <li ng-class="Immune"><a href="#" title="Immune" id="4" onclick="OnBodySystemSelection(event)">Immune</a></li>
171   - <li ng-class="Integumentary"><a href="#" title="Integumentary" id="5" onclick="OnBodySystemSelection(event)">Integumentary</a></li>
172   - <li ng-class="Lymphatic"><a href="#" title="Lymphatic" id="6" onclick="OnBodySystemSelection(event)">Lymphatic</a></li>
173   - <li ng-class="Muscular"><a href="#" title="Muscular" id="7" onclick="OnBodySystemSelection(event)">Muscular</a></li>
174   - <li ng-class="Nervous"><a href="#" title="Nervous" id="8" onclick="OnBodySystemSelection(event)">Nervous</a></li>
175   - <li ng-class="Reproductive"><a href="#" title="Reproductive" id="9" onclick="OnBodySystemSelection(event)">Reproductive</a></li>
176   - <li ng-class="Respiratory"><a href="#" title="Respiratory" id="10" onclick="OnBodySystemSelection(event)">Respiratory</a></li>
177   - <li ng-class="Skeletal"><a href="#" title="Skeletal" id="11" onclick="OnBodySystemSelection(event)">Skeletal</a></li>
178   - <li ng-class="Urinary"><a href="#" title="Urinary" id="12" onclick="OnBodySystemSelection(event)">Urinary</a></li>
  167 + <li id="Cardiovascular"><a href="#" title="Cardiovascular" id="1" onclick="OnBodySystemSelection(event)">Cardiovascular</a></li>
  168 + <li id="Digestive"><a href="#" title="Digestive" id="2" onclick="OnBodySystemSelection(event)">Digestive</a></li>
  169 + <li id="Endocrine"><a href="#" title="Endocrine" id="3" onclick="OnBodySystemSelection(event)">Endocrine</a></li>
  170 + <li id="Immune"><a href="#" title="Immune" id="4" onclick="OnBodySystemSelection(event)">Immune</a></li>
  171 + <li id="Integumentary"><a href="#" title="Integumentary" id="5" onclick="OnBodySystemSelection(event)">Integumentary</a></li>
  172 + <li id="Lymphatic"><a href="#" title="Lymphatic" id="6" onclick="OnBodySystemSelection(event)">Lymphatic</a></li>
  173 + <li id="Muscular"><a href="#" title="Muscular" id="7" onclick="OnBodySystemSelection(event)">Muscular</a></li>
  174 + <li id="Nervous"><a href="#" title="Nervous" id="8" onclick="OnBodySystemSelection(event)">Nervous</a></li>
  175 + <li id="Reproductive"><a href="#" title="Reproductive" id="9" onclick="OnBodySystemSelection(event)">Reproductive</a></li>
  176 + <li id="Respiratory"><a href="#" title="Respiratory" id="10" onclick="OnBodySystemSelection(event)">Respiratory</a></li>
  177 + <li id="Skeletal"><a href="#" title="Skeletal" id="11" onclick="OnBodySystemSelection(event)">Skeletal</a></li>
  178 + <li id="Urinary"><a href="#" title="Urinary" id="12" onclick="OnBodySystemSelection(event)">Urinary</a></li>
179 179 </ul>
180 180 </div>
181 181 </div>
... ...
400-SOURCECODE/AIAHTML5.Web/index.aspx
... ... @@ -1081,8 +1081,7 @@
1081 1081 <div class="modal-footer">
1082 1082 <div class="row">
1083 1083 <input type="file" id="file1" style="display:none">
1084   - <!--<a href="data:application/xml;charset=utf-8,your code here" download="filename.html">Save</a-->
1085   - <div class="col-sm-12"><button id="btnSaveEI" class="btn btn-primary" data-dismiss="modal" type="button">Ok</button></div> <!--onclick="makeScreenshot();"--><!--ng-click="dialogs.saveAs()"--><!--ng-click="ShowAlert()"-->
  1084 + <div class="col-sm-12"><button id="btnSaveEI" ng-click="SaveImagefile()" class="btn btn-primary" data-dismiss="modal" type="button">Ok</button></div> <!--onclick="makeScreenshot();"--><!--ng-click="dialogs.saveAs()"--><!--ng-click="ShowAlert()"-->
1086 1085 </div>
1087 1086 </div>
1088 1087  
... ... @@ -1914,25 +1913,7 @@
1914 1913 });
1915 1914  
1916 1915 });
1917   - $("#btnSaveEI").click(function () {
1918   - $("#canvasDiv").append("<img id='exportlogo' class='img-responsive' src='content/images/adam-logo-small.png'/>");
1919   - html2canvas($("#canvasDiv"), {
1920   - onrendered: function (canvas) {
1921   - theCanvas = canvas;
1922   - var fileName = document.getElementById("filename").value + '.jpg';
1923   - if (typeof (fileName) == "undefined" || fileName == ".jpg")
1924   - fileName = "Untitled.jpg"
1925   - var dataURL = canvas.toDataURL("image/jpeg");
1926   - var blob = dataURItoBlob(dataURL);
1927   - console.log(blob);
1928   - saveAs(blob, fileName);
1929   - $("#exportlogo").remove();
1930   - $("#filename").val("");
1931   - }
1932   - });
1933   - $(".export-image").css("display", "none");
1934   -
1935   - });
  1916 +
1936 1917 });
1937 1918 function dataURItoBlob(dataURI) {
1938 1919 var byteString = atob(dataURI.split(',')[1]);
... ...
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
... ... @@ -965,6 +965,10 @@ cursor:pointer;
965 965 pointer-events: none;
966 966 opacity: 0.6;
967 967 }
  968 +.saveCurriculam {
  969 + pointer-events: none;
  970 + opacity: 0.6;
  971 +}
968 972 .openCurriculum {
969 973 pointer-events: none;
970 974 opacity: 0.6;
... ...