Commit 88e75b656373a77f6f6cc17438ab9840580162bc

Authored by Birendra Kumar
2 parents 43caf7aa 42aa9f6e

Merge branch 'CB_Develop' into Develop

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 })
... ... @@ -1851,7 +1894,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1851 1894 $scope.BodyRegionCordinatesData = []; // create an empty array
1852 1895 $scope.SetwindowStoreData(windowviewid,'BodyRegionCordinatesData',[]);
1853 1896 $('#daBodyview').css('width', '100%');
1854   - 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 + }
1855 1905  
1856 1906 $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight);
1857 1907 $('#leftToolBarDA_' + windowviewid).css('height', $('#daImagePanel_' + windowviewid).outerHeight())
... ... @@ -2054,7 +2104,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2054 2104 var nlayer=$scope.GetwindowStoreData(windowviewid,'layerNumber');
2055 2105 if ((parseInt(dtlOfSktn[0]._lns) <= parseInt(nlayer)) && (parseInt(dtlOfSktn[0]._lne) > parseInt(nlayer)) && (dtlOfSktn[0]._isfr == 'Y')) {
2056 2106 $rootScope.isLayerLessSeven = true; // using at home
2057   - if (($rootScope.globalSetting.modesty == 'Y')) {
  2107 + var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue');
  2108 + if ((ModestyValue == 'Y')) {
2058 2109  
2059 2110 $('.modestyImg_'+windowviewid).css('visibility', 'visible');
2060 2111 }
... ... @@ -2090,7 +2141,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2090 2141 //set scrollbars on canvas and hide loading label
2091 2142 $('#daLoaderLabel').css('visibility', 'hidden')
2092 2143  
2093   - $('#canvasDivDA_' + windowviewid).css('overflow', 'scroll')
  2144 + $('#canvasDivDA_' + windowviewid).css('overflow', 'scroll');
  2145 +
2094 2146 if (isiOSSafari) {
2095 2147 $('#canvasDivDA_' + windowviewid).scrollLeft($('#canvasDivDA_' + windowviewid).width() + 150)
2096 2148  
... ... @@ -2099,7 +2151,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2099 2151 $('#canvasDivDA_' + windowviewid).scrollLeft($('#canvasDivDA_' + windowviewid).width() / 2)
2100 2152 }
2101 2153  
2102   - $('#canvasDivDA_' + windowviewid).scrollTop(50)
  2154 + $('#canvasDivDA_' + windowviewid).scrollTop(50);
2103 2155  
2104 2156 var sliderVal = parseInt($scope.GetwindowStoreData(windowviewid,'totalLayers')) - parseInt($scope.GetwindowStoreData(windowviewid,'layerNumber'));
2105 2157  
... ... @@ -2219,6 +2271,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2219 2271  
2220 2272 $scope.userInput = parseInt(lNumber);
2221 2273  
  2274 + if (!$rootScope.isCallFromOtherModule) {
  2275 + $scope.SetwindowStoreData(windowviewid,'curentEthnicity',$rootScope.globalSetting.ethnicity);
  2276 +
  2277 + }
2222 2278 var skinTone=$scope.GetwindowStoreData(windowviewid,'curentEthnicity');
2223 2279  
2224 2280  
... ... @@ -2305,6 +2361,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2305 2361 var zoomValue=$scope.GetwindowStoreData(windowviewid,'zoomInOut');
2306 2362 //filter bodyRegion data basd on skintone
2307 2363  
  2364 + if (!$rootScope.isCallFromOtherModule) {
  2365 + $scope.SetwindowStoreData(windowviewid,'curentEthnicity',$rootScope.globalSetting.ethnicity);
  2366 +
  2367 + }
2308 2368 var skinTone=$scope.GetwindowStoreData(windowviewid,'curentEthnicity');
2309 2369 $scope.bagartDetailsOnSktn = new jinqJs()
2310 2370 .from($scope.bagartBodyRegionDetails)
... ... @@ -2349,10 +2409,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2349 2409  
2350 2410 if (isMaskImage == 'Y') {
2351 2411 if ($rootScope.isOpenResourceBtnClicked) {
2352   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci' + '|' + windowviewid;
  2412 + FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci' + "_" + windowviewid;
2353 2413 }
2354 2414 else {
2355   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci'+ '|' + windowviewid;
  2415 + FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci'+ "_" + windowviewid;
2356 2416  
2357 2417 }
2358 2418  
... ... @@ -2362,10 +2422,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2362 2422 else {
2363 2423  
2364 2424 if ($rootScope.isOpenResourceBtnClicked) {
2365   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + '|' + windowviewid;
  2425 + FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
2366 2426 }
2367 2427 else {
2368   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + '|' + windowviewid;
  2428 + FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
2369 2429  
2370 2430 }
2371 2431  
... ... @@ -2380,8 +2440,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2380 2440  
2381 2441  
2382 2442 FlipedImgCanvas.addEventListener('click', function (evt) {
2383   -
2384   - var windowviewid = (evt.currentTarget.id).split("|")[1];
  2443 + var len= (evt.currentTarget.id).split("_").length;
  2444 + var windowviewid = (evt.currentTarget.id).split("_")[len-1];
2385 2445 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
2386 2446 $scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
2387 2447 //to get correct data on multihighlight highlight
... ... @@ -2403,10 +2463,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2403 2463  
2404 2464 }
2405 2465  
2406   - // clear CB term data on mouse click
2407   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
2408   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
2409   -
2410 2466 //get mouse coordinate of mirror image click
2411 2467 var mousePos = $scope.getMousePos(evt.pageX,evt.pageY,windowviewid);
2412 2468  
... ... @@ -2479,7 +2535,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2479 2535 for (var i = 0; i < $scope.machedIcolorInBodyRegion.length; i++) {
2480 2536 var bodyRegionId = $scope.machedIcolorInBodyRegion[i];
2481 2537  
2482   - var grayCanvasID = 'imageCanvas' + bodyRegionId + "|" + windowviewid;
  2538 + var grayCanvasID = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
2483 2539 var grayCanvas = document.getElementById(grayCanvasID);
2484 2540  
2485 2541 var grayCanvasContext = grayCanvas.getContext("2d");
... ... @@ -2493,7 +2549,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2493 2549 var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId');
2494 2550 if (bodyVid == "1" || bodyVid == "4" || bodyVid == "5" || bodyVid == "8") {
2495 2551 if (bodyRegionId == 4 || bodyRegionId == 5 || bodyRegionId == 6) {
2496   - var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "|" + windowviewid;
  2552 + var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
2497 2553 var grayCanvasMR = document.getElementById(grayCanvasID);
2498 2554  
2499 2555 var grayCanvasContextMR = grayCanvasMR.getContext("2d");
... ... @@ -2682,10 +2738,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2682 2738 var imageCanvas;
2683 2739  
2684 2740 if ($rootScope.multiViewCounter != undefined) {
2685   - imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + '|' + windowviewid);
  2741 + imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid);
2686 2742 }
2687 2743 else {
2688   - imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + '|' + windowviewid);
  2744 + imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid);
2689 2745 }
2690 2746  
2691 2747  
... ... @@ -2722,8 +2778,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2722 2778 $scope.SetwindowStoreData(windowviewid,'coloredImageCanvasList',$scope.coloredImageCanvasList);
2723 2779 $scope.SetwindowStoreData(windowviewid,'coloredImageMRCanvasList',$scope.coloredImageMRCanvasList);
2724 2780 // set color image data
2725   - $scope.SetwindowStoreData(windowviewid,'ColoredImageSRC',$scope.ColoredImageSRC);
  2781 + $scope.SetwindowStoreData(windowviewid, 'ColoredImageSRC', $scope.ColoredImageSRC);
  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);
2726 2788  
  2789 + $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
  2790 + $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
  2791 + }
  2792 +
2727 2793 if ($rootScope.isOpenResourceBtnClicked && $rootScope.isTermClicked == false) {
2728 2794 $scope.EnableUI();
2729 2795 if (($rootScope.multiViewInfoIndex + 1) < $rootScope.multiViewInfo.length) {
... ... @@ -2763,7 +2829,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2763 2829 $scope.highLightBody(windowviewid);
2764 2830 }
2765 2831 else {
2766   - var isHighlightBodyWithCBTermData=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData');
  2832 + var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
2767 2833 if (isHighlightBodyWithCBTermData == true) {
2768 2834 $scope.ShowCBDataBodyView(windowviewid);
2769 2835 }
... ... @@ -2836,19 +2902,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2836 2902 if (isMaskImage == 'Y') {
2837 2903 imgCanvas.style.visibility = 'hidden';
2838 2904 if ($rootScope.isOpenResourceBtnClicked) {
2839   - imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + '|' + windowviewid;
  2905 + imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
2840 2906 }
2841 2907 else {
2842   - imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + '|' + windowviewid;
  2908 + imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
2843 2909 }
2844 2910  
2845 2911 }
2846 2912 else {
2847 2913 if ($rootScope.isOpenResourceBtnClicked) {
2848   - imgCanvas.id = 'imageCanvas' + bodyRegionId + '|' + windowviewid;
  2914 + imgCanvas.id = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
2849 2915 }
2850 2916 else {
2851   - imgCanvas.id = 'imageCanvas' + bodyRegionId + '|' + windowviewid;
  2917 + imgCanvas.id = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
2852 2918 }
2853 2919  
2854 2920  
... ... @@ -2877,8 +2943,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2877 2943  
2878 2944 imgCanvas.addEventListener('click', function (evt) {
2879 2945  
2880   - var windowviewid = (evt.currentTarget.id).split("|")[1];
2881   -
  2946 + var len= (evt.currentTarget.id).split("_").length;
  2947 + var windowviewid = (evt.currentTarget.id).split("_")[len-1];
2882 2948 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
2883 2949 $scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
2884 2950 if ($scope.isLayerChange == true) {
... ... @@ -2900,10 +2966,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2900 2966  
2901 2967 }
2902 2968  
2903   - // clear CB term data on mouse click
2904   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
2905   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
2906   -
  2969 +
2907 2970 var annotationText;
2908 2971 var context = imgCanvas.getContext("2d");
2909 2972  
... ... @@ -2915,7 +2978,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2915 2978 maskCanvasId = canvasId;
2916 2979 }
2917 2980 else {
2918   - maskCanvasId = canvasId.split("|")[0] + '_mci' + "|" + windowviewid;
  2981 + maskCanvasId = canvasId.split("_")[0] + '_mci' + "_" + windowviewid;
2919 2982 }
2920 2983 var maskCanvas = document.getElementById(maskCanvasId);
2921 2984 var maskCanvasContext = maskCanvas.getContext("2d");
... ... @@ -2944,8 +3007,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2944 3007 //
2945 3008 else if (maskCanvasId.match('modestyImg') && RGBColor == '000000') {
2946 3009  
2947   - bodyRegionId = maskCanvasId.split("|")[0].slice(-1);
2948   - maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + "|" + windowviewid;
  3010 + bodyRegionId = maskCanvasId.split("_")[0].slice(-1);
  3011 + maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
2949 3012  
2950 3013 var maskCanvas = document.getElementById(maskCanvasId);
2951 3014 var maskCanvasContext = maskCanvas.getContext("2d");
... ... @@ -2977,7 +3040,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2977 3040 for (var i = 0; i < $scope.machedIcolorInBodyRegion.length; i++) {
2978 3041 var bodyRegionId = $scope.machedIcolorInBodyRegion[i];
2979 3042  
2980   - var grayCanvasID = 'imageCanvas' + bodyRegionId + "|" + windowviewid;
  3043 + var grayCanvasID = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
2981 3044 var grayCanvas = document.getElementById(grayCanvasID);
2982 3045 var grayImageDataList=$scope.GetwindowStoreData(windowviewid,'grayImageDataList');
2983 3046 var grayCanvasContext = grayCanvas.getContext("2d");
... ... @@ -2989,7 +3052,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2989 3052 // for unhighlight the mirrored body region
2990 3053 if (bodyVid == "1" || bodyVid == "4" || bodyVid == "5" || bodyVid == "8") {
2991 3054 if (bodyRegionId == 4 || bodyRegionId == 5 || bodyRegionId == 6) {
2992   - var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "|" + windowviewid;
  3055 + var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
2993 3056 var grayCanvasMR = document.getElementById(grayCanvasID);
2994 3057 var grayImageMRDataList=$scope.GetwindowStoreData(windowviewid,'grayImageMRDataList');
2995 3058 var grayCanvasContextMR = grayCanvasMR.getContext("2d");
... ... @@ -3174,10 +3237,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3174 3237  
3175 3238 var imageCanvas;
3176 3239 if ($rootScope.multiViewCounter != undefined) {
3177   - imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '|' + windowviewid);
  3240 + imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + "_" + windowviewid);
3178 3241 }
3179 3242 else {
3180   - imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '|' + windowviewid);
  3243 + imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + "_" + windowviewid);
3181 3244 }
3182 3245  
3183 3246 if (imageCanvas != null || imageCanvas != undefined) {
... ... @@ -3211,11 +3274,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3211 3274  
3212 3275 if (isEligibleForHighlight == true) {
3213 3276 $scope.SetwindowStoreData(windowviewid,'coloredImageMRCanvasList',$scope.coloredImageMRCanvasList);
3214   - $scope.SetwindowStoreData(windowviewid,'coloredImageCanvasList',$scope.coloredImageCanvasList);
3215   -
  3277 + $scope.SetwindowStoreData(windowviewid,'coloredImageCanvasList',$scope.coloredImageCanvasList);
3216 3278 // set color image data
3217   - $scope.SetwindowStoreData(windowviewid,'ColoredImageSRC',$scope.ColoredImageSRC);
3218   -
  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 +
3219 3290 if ($rootScope.isOpenResourceBtnClicked && $rootScope.isTermClicked == false) {
3220 3291 $scope.EnableUI();
3221 3292 if (($rootScope.multiViewInfoIndex + 1) < $rootScope.multiViewInfo.length) {
... ... @@ -3261,7 +3332,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3261 3332  
3262 3333 }
3263 3334 else {
3264   - var isHighlightBodyWithCBTermData=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData');
  3335 + var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
3265 3336 if (isHighlightBodyWithCBTermData == true) {
3266 3337 $scope.ShowCBDataBodyView(windowviewid);
3267 3338 }
... ... @@ -3320,12 +3391,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3320 3391  
3321 3392 /// $scope.TermList = $scope.getTermNumberList(actualterm);
3322 3393 // $scope.termCoordinate = $scope.getTermCoordinate(actualterm);
3323   -
3324   - $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX);
3325   - $('#canvasDivDA_' + windowviewid).scrollTop($scope.daOpenInOtherModules.canvasVScrollX);
3326   -
3327   - $scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',$("#canvasDivDA_" + windowviewid).scrollTop());
3328   - $scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',$("#canvasDivDA_" + windowviewid).scrollLeft());
  3394 +
3329 3395 var CurriculumTermData=$scope.GetwindowStoreData(windowviewid,'CurriculumTermData');
3330 3396 for (var i = 0; i < CurriculumTermData.length; i++) {
3331 3397 $scope.MultiLanguageAnnationArray = [];
... ... @@ -3342,8 +3408,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3342 3408 }
3343 3409  
3344 3410 }
  3411 +
  3412 + $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false);
  3413 + $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []);
  3414 + $scope.SetwindowStoreData(windowviewid, 'AllTerms', []);
  3415 + $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
3345 3416 // finish CB window load
3346   - $rootScope.CBWindowLoadComplete=true;
  3417 + $rootScope.CBWindowLoadComplete = true;
  3418 +
3347 3419 }
3348 3420  
3349 3421 $scope.highLightBodyBasedOnIcolor = function (RGBColor,windowviewid) {
... ... @@ -4007,7 +4079,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4007 4079 var whiteImageMRDataList=$scope.GetwindowStoreData(windowviewid,'whiteImageMRDataList');
4008 4080  
4009 4081 for (var i = 0; i < grayImageDataList.length; i++) {
4010   - var grayCanvasID = 'imageCanvas' + parseInt(i + 1) + "|" + windowviewid;
  4082 + var grayCanvasID = 'imageCanvas' + parseInt(i + 1) + "_" + windowviewid;
4011 4083 var grayCanvas = document.getElementById(grayCanvasID);
4012 4084  
4013 4085 if (grayCanvas != null) {
... ... @@ -4024,7 +4096,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4024 4096 }
4025 4097 }
4026 4098 for (var i = 4; i <= grayImageMRDataList.length; i++) {
4027   - var grayCanvasMRID = 'imageCanvas' + i + '_MR' + "|" + windowviewid;
  4099 + var grayCanvasMRID = 'imageCanvas' + i + '_MR' + "_" + windowviewid;
4028 4100 var grayCanvasMR = document.getElementById(grayCanvasMRID);
4029 4101  
4030 4102 if (grayCanvasMR != null) {
... ... @@ -4049,7 +4121,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4049 4121 if (TermExistInBodyRegionId != undefined) {
4050 4122 if (prevBRID != TermExistInBodyRegionId) {
4051 4123  
4052   - var grayCanvasID = 'imageCanvas' + TermExistInBodyRegionId + "|" + windowviewid;
  4124 + var grayCanvasID = 'imageCanvas' + TermExistInBodyRegionId + "_" + windowviewid;
4053 4125 var grayCanvas = document.getElementById(grayCanvasID);
4054 4126  
4055 4127 if (grayCanvas != null) {
... ... @@ -4073,7 +4145,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4073 4145 var gData = grayCanvasContext.getImageData(0, 0, canvasWidth, canvasHeight);
4074 4146  
4075 4147 //for mirror images
4076   - var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "|" + windowviewid;
  4148 + var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "_" + windowviewid;
4077 4149 var grayCanvasMR = document.getElementById(grayCanvasMRID);
4078 4150 var grayCanvasMRX;
4079 4151 var grayCanvasMRY;
... ... @@ -4084,7 +4156,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4084 4156 if (TermExistInBodyRegionId == 4 || TermExistInBodyRegionId == 5 || TermExistInBodyRegionId == 6) {
4085 4157  
4086 4158  
4087   - var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "|" + windowviewid;
  4159 + var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "_" + windowviewid;
4088 4160 var grayCanvasMR = document.getElementById(grayCanvasMRID);
4089 4161 grayCanvasMRX = grayCanvasMR.style.left;
4090 4162 grayCanvasMRY = grayCanvasMR.style.top;
... ... @@ -4097,7 +4169,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4097 4169 FlipedImgCanvas.style.left = canvasX + "px";
4098 4170 FlipedImgCanvas.style.top = canvasY + "px";
4099 4171 FlipedImgCanvas.style.visibility = 'hidden';
4100   - FlipedImgCanvas.id = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "|" + windowviewid;
  4172 + FlipedImgCanvas.id = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "_" + windowviewid;
4101 4173  
4102 4174 //remove previous canavs
4103 4175 $('#' + grayCanvasMRID).remove();
... ... @@ -4143,7 +4215,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4143 4215 })
4144 4216  
4145 4217 //for non mirrored bpdy regions
4146   - var grayCanvasID = 'imageCanvas' + TermExistInBodyRegionId + "|" + windowviewid;
  4218 + var grayCanvasID = 'imageCanvas' + TermExistInBodyRegionId + "_" + windowviewid;
4147 4219 var grayCanvas = document.getElementById(grayCanvasID);
4148 4220  
4149 4221 if (grayCanvas != null) {
... ... @@ -4157,7 +4229,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4157 4229 //for mirror body regions
4158 4230 if (TermExistInBodyRegionId == 4 || TermExistInBodyRegionId == 5 || TermExistInBodyRegionId == 6) {
4159 4231  
4160   - var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "|" + windowviewid;
  4232 + var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "_" + windowviewid;
4161 4233  
4162 4234 var grayCanvasMR = document.getElementById(grayCanvasMRID);
4163 4235  
... ... @@ -4425,15 +4497,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4425 4497 $scope.isLayerChange = true;
4426 4498 $rootScope.isLoading = true;
4427 4499 $('#spinner').css('visibility', 'visible');
4428   -
4429   - if ($rootScope.isCallFromOtherModule) {
4430   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
4431   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
4432   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
4433   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
4434   - }
4435   - //1.
4436   -
  4500 +
4437 4501 var canvasDiv = document.getElementById("canvasDivDA_" + windowviewid);
4438 4502 $scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
4439 4503 $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft;
... ... @@ -4752,7 +4816,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4752 4816 }
4753 4817 $('.appendDragg').draggable({
4754 4818 drag: function (evt) {
4755   - var windid = (evt.target.id).split("_")[1];
  4819 + var len= (evt.target.id).split("_").length;
  4820 + var windid = (evt.target.id).split("_")[len-1];
4756 4821 $(this).prev('div').css("display", "none");
4757 4822 var bor_id = $(this).next('div').attr('id');
4758 4823 var sub_id1 = $(this).attr('id');
... ... @@ -4798,7 +4863,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4798 4863 $('#sppeachBubble_'+windowviewid).draggable(
4799 4864 {
4800 4865 drag: function (evt) {
4801   - var windid = (evt.target.id).split("_")[1];
  4866 + var len= (evt.target.id).split("_").length;
  4867 + var windid = (evt.target.id).split("_")[len-1];
4802 4868 $('#dot_'+windid).css("visibility", "hidden");
4803 4869 var canvasDiv = document.getElementById('canvasDivDA_' + windid)
4804 4870  
... ... @@ -4808,7 +4874,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4808 4874 },
4809 4875 });
4810 4876 $('#crossDiv_'+windowviewid).on('click', function (evt) {
4811   - var windid = (evt.target.id).split("_")[1];
  4877 + var len= (evt.target.id).split("_").length;
  4878 + var windid = (evt.target.id).split("_")[len-1];
4812 4879 $('#sppeachBubble_'+windid).remove();
4813 4880 $('#bord_'+windowviewid).remove();
4814 4881 $('#dot_'+windid).remove();
... ... @@ -4831,7 +4898,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4831 4898 $scope.SetwindowStoreData(windowviewid,'speachBubbleArrayAnnotation',$scope.speechList1);
4832 4899 $('.appendDragg_annotation').draggable({
4833 4900 drag: function (evt) {
4834   - var windid = (evt.target.id).split("_")[2];
  4901 + var len= (evt.target.id).split("_").length;
  4902 + var windid = (evt.target.id).split("_")[len-1];
4835 4903 $(this).prev('div').css("display", "none");
4836 4904 var bor_id_anno = $(this).next('div').attr('id');
4837 4905 var sub_id1_anno = $(this).attr('id');
... ... @@ -4869,7 +4937,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4869 4937 $('#sppeachBubble_annotation_'+windowviewid).draggable(
4870 4938 {
4871 4939 drag: function (evt) {
4872   - var windid = (evt.target.id).split("_")[2];
  4940 + var len= (evt.target.id).split("_").length;
  4941 + var windid = (evt.target.id).split("_")[len-1];
4873 4942 $('#dot_annotation_'+windid).remove();
4874 4943 var canvasDiv = document.getElementById('canvasDivDA_' + windid);
4875 4944 var verticalScrollPosition = canvasDiv.scrollTop;
... ... @@ -4878,7 +4947,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4878 4947 },
4879 4948 });
4880 4949 $('.crossDiv_annotation_'+windowviewid).on('click', function (evt) {
4881   - var windid = (evt.target.className).split("_")[2];
  4950 + var len= (evt.target.className).split("_").length;
  4951 + var windid = (evt.target.className).split("_")[len-1];
4882 4952 $('#sppeachBubble_annotation_'+windid).remove();
4883 4953 $('#bord_annotation_'+windid).remove();
4884 4954 $('#dot_annotation_'+windid).remove();
... ... @@ -5372,14 +5442,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5372 5442 $scope.createTransparencyBox = function (windowviewid) {
5373 5443  
5374 5444 $scope.SetwindowStoreData(windowviewid,'isTransparencyBtnClicked',true);
5375   -
5376   - if ($rootScope.isCallFromOtherModule) {
5377   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
5378   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
5379   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
5380   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
5381   - }
5382   -
  5445 +
5383 5446 //do not create TBOX if in extarct mode otherwise create
5384 5447 if ($scope.GetwindowStoreData(windowviewid,'isExtract') == false) {
5385 5448  
... ... @@ -5440,9 +5503,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5440 5503 }
5441 5504  
5442 5505 function mouseDownListener(e) {
5443   -
5444   - var windowviewid = (e.currentTarget.id).split("_")[1];
5445   -
  5506 + var len= (e.currentTarget.id).split("_").length;
  5507 + var windowviewid = (e.currentTarget.id).split("_")[len-1];
  5508 +
5446 5509 e.preventDefault();
5447 5510 //to prevent screen scroll on ipad while drawing TB
5448 5511 e.preventDefault();
... ... @@ -5513,7 +5576,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5513 5576 }
5514 5577  
5515 5578 function mouseMoveListener(e) {
5516   - var windowviewid = (e.currentTarget.id).split("_")[1];
  5579 + var len= (e.currentTarget.id).split("_").length;
  5580 + var windowviewid = (e.currentTarget.id).split("_")[len-1];
5517 5581 e.preventDefault();
5518 5582 //to prevent screen scroll on ipad while drawing TB
5519 5583 e.preventDefault();
... ... @@ -5544,7 +5608,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5544 5608  
5545 5609  
5546 5610 function mouseUpListener(e) {
5547   - var windowviewid = (event.currentTarget.id).split("_")[1];
  5611 + var len= (e.currentTarget.id).split("_").length;
  5612 + var windowviewid = (e.currentTarget.id).split("_")[len-1];
5548 5613 e.preventDefault();
5549 5614  
5550 5615 //to prevent screen scroll on ipad while drawing TB
... ... @@ -6705,7 +6770,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6705 6770 $rootScope.setSelectedBodyRegionData(windowviewid);
6706 6771  
6707 6772 if ($rootScope.isMirrorBodyRegion == "No") {
6708   - var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_mci" + "|" + windowviewid;
  6773 + var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_mci" + "_" + windowviewid;
6709 6774 var maskCanvas = document.getElementById(maskCanvasId);
6710 6775 var maskCanvasContext = maskCanvas.getContext("2d");
6711 6776  
... ... @@ -6717,7 +6782,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6717 6782 }
6718 6783 else {
6719 6784  
6720   - var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_MR_mci"+ "|" + windowviewid;
  6785 + var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_MR_mci"+ "_" + windowviewid;
6721 6786 var maskoffsetval = $('#' + maskCanvasId).offset();
6722 6787 var mirrorCanvasX = maskoffsetval.left;
6723 6788 var mirrorImageCanvas = document.getElementById(maskCanvasId);
... ... @@ -7031,7 +7096,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7031 7096 }
7032 7097  
7033 7098 function TransparencyCanvasClickListener(evt) {
7034   - var windowviewid = (evt.currentTarget.id).split("_")[1];
  7099 + var len= (evt.currentTarget.id).split("_").length;
  7100 + var windowviewid = (evt.currentTarget.id).split("_")[len-1];
7035 7101 var pixelData;
7036 7102 var pixelDataTrans;
7037 7103 var mousePos = $scope.getMousePos(evt.pageX,evt.pageY,windowviewid);
... ... @@ -7101,7 +7167,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7101 7167 var mirrorCanvasX = x;
7102 7168 var mirrorCanvasWidth = width;
7103 7169  
7104   - var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "|" + windowviewid;
  7170 + var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "_" + windowviewid;
7105 7171 var clickedCanavs = document.getElementById(clickedCanvasMaskId);
7106 7172  
7107 7173 var maskCanvasId = 'transparencyTempCanvasMask_' + clickedBodyRegion + '_mci' + "_" + windowviewid;
... ... @@ -7171,7 +7237,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7171 7237 }
7172 7238 else {
7173 7239  
7174   - var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "|" + windowviewid;
  7240 + var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "_" + windowviewid;
7175 7241 var maskCanvas = document.getElementById(clickedCanvasMaskId);
7176 7242 var maskCanvasContext = maskCanvas.getContext("2d");
7177 7243  
... ... @@ -7203,8 +7269,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7203 7269 }
7204 7270  
7205 7271 function OnClickModestyTransCanvas(evt) {
7206   -
7207   - var windowviewid = (evt.currentTarget.id).split("_")[2];
  7272 + var len= (evt.target.id).split("_").length;
  7273 + var windowviewid = (evt.target.id).split("_")[len-1];
7208 7274  
7209 7275 var tCanvasLeft = $(".ui-wrapper").css("left");
7210 7276 var tCanvasLeftAftrSplit = tCanvasLeft.split("p");
... ... @@ -7252,7 +7318,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7252 7318  
7253 7319 var bodyRegionId = canvasId.split("_")[1].slice(-1);
7254 7320  
7255   - var maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + '|' + windowviewid;
  7321 + var maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
7256 7322 var maskCanvas = document.getElementById(maskCanvasId);
7257 7323 var maskCanvasContext = maskCanvas.getContext("2d");
7258 7324  
... ... @@ -7296,8 +7362,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7296 7362 }
7297 7363  
7298 7364 function getAnnotationAndCraeteSpeechBubble(mirrorCanvasX, mirrorCanvasWidth, mousePos, maskCanvasContexttrans, clickedBodyRegion, x, y, evt) {
7299   - var windowviewid = (evt.target.id).split("_")[1];
7300   -
  7365 + var len= (evt.target.id).split("_").length;
  7366 + var windowviewid = (evt.target.id).split("_")[len-1];
  7367 +
7301 7368 var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
7302 7369 var verticalScrollPosition = canvasDiv.scrollTop;
7303 7370 var horizontlScrollPosition = canvasDiv.scrollLeft;
... ... @@ -7309,7 +7376,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7309 7376 var actulalX = mirrorXOnNormalImage
7310 7377 var actualY = mousePos.y + verticalScrollPosition
7311 7378  
7312   - var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + '|' + windowviewid;
  7379 + var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "_" + windowviewid;
7313 7380 var maskCanvas = document.getElementById(clickedCanvasMaskId);
7314 7381 var maskCanvasContext = maskCanvas.getContext("2d");
7315 7382 var imgX = Math.round(actulalX - parseInt((x).replace('px', '')));
... ... @@ -7442,8 +7509,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7442 7509  
7443 7510 $scope.onTransparencyChange = function (ev, ui) {
7444 7511  
7445   - var targetid = ev.target.id;
7446   - var windowviewid = targetid.split('_')[1];
  7512 + var len= (ev.target.id).split("_").length;
  7513 + var windowviewid = (ev.target.id).split("_")[len-1];
7447 7514  
7448 7515 $scope.SetwindowStoreData(windowviewid,'transNumber',ui.value);
7449 7516  
... ... @@ -7710,7 +7777,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7710 7777  
7711 7778 $scope.enableZoom = function (event) {
7712 7779  
7713   - var windowviewid = (event.currentTarget.id).split("_")[1];
  7780 + var len= (event.currentTarget.id).split("_").length;
  7781 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
7714 7782  
7715 7783 if ($rootScope.isOpenResourceBtnClicked) {
7716 7784  
... ... @@ -7720,12 +7788,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7720 7788 $scope.setScopeVariables();
7721 7789 }
7722 7790 }
7723   - if ($rootScope.isCallFromOtherModule) {
7724   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
7725   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
7726   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
7727   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
7728   - }
7729 7791  
7730 7792 $("#OnIdentify").removeClass("annotationtoolbartab");
7731 7793 $("#DrawMode").removeClass("annotationtoolbartab");
... ... @@ -7857,12 +7919,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7857 7919 var maskId;
7858 7920  
7859 7921 if ($rootScope.isOpenResourceBtnClicked) {
7860   - id = 'imageCanvas' + i + '|' + windowviewid;
7861   - maskId = 'imageCanvas' + i + '_mci' + '|' + windowviewid;
  7922 + id = 'imageCanvas' + i + "_" + windowviewid;
  7923 + maskId = 'imageCanvas' + i + '_mci' + "_" + windowviewid;
7862 7924 }
7863 7925 else {
7864   - id = 'imageCanvas' + i + '|' + windowviewid;
7865   - maskId = 'imageCanvas' + i + '_mci'+'|'+ windowviewid;
  7926 + id = 'imageCanvas' + i + "_" + windowviewid;
  7927 + maskId = 'imageCanvas' + i + '_mci'+"_"+ windowviewid;
7866 7928 }
7867 7929  
7868 7930  
... ... @@ -7879,12 +7941,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7879 7941 if (i == 4 || i == 5 || i == 6) {
7880 7942  
7881 7943 if ($rootScope.isOpenResourceBtnClicked) {
7882   - id = 'imageCanvas' + i + '_MR' + '|' + windowviewid;
7883   - maskId = 'imageCanvas' + i + '_MR_mci' + '|' + windowviewid;
  7944 + id = 'imageCanvas' + i + '_MR' + "_" + windowviewid;
  7945 + maskId = 'imageCanvas' + i + '_MR_mci' + "_" + windowviewid;
7884 7946 }
7885 7947 else {
7886   - id = 'imageCanvas' + i + '_MR'+'|'+ windowviewid;
7887   - maskId = 'imageCanvas' + i + '_MR_mci'+'|'+ windowviewid;
  7948 + id = 'imageCanvas' + i + '_MR'+"_"+ windowviewid;
  7949 + maskId = 'imageCanvas' + i + '_MR_mci'+"_"+ windowviewid;
7888 7950 }
7889 7951  
7890 7952  
... ... @@ -7902,8 +7964,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7902 7964 var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
7903 7965 if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) {
7904 7966 for (var j = 0; j < modestyCanvases.length; j++) {
7905   - var len= (modestyCanvases[j].id).split("|").length;
7906   - 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];
7907 7969 if(winid==windowviewid)
7908 7970 {
7909 7971 modestyCanvases[j].parentNode.removeChild(modestyCanvases[j]);
... ... @@ -7935,13 +7997,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7935 7997  
7936 7998 }
7937 7999 else {
7938   - if ($rootScope.isCallFromOtherModule) {
7939   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
7940   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
7941   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
7942   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
7943   - }
7944   -
  8000 +
7945 8001 $scope.SetwindowStoreData(windowviewid,'isHighLight',true);
7946 8002 $scope.SetwindowStoreData(windowviewid,'isNormalMode',false);
7947 8003 $scope.SetwindowStoreData(windowviewid,'isZoomed',false);
... ... @@ -8029,13 +8085,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8029 8085 if ($scope.GetwindowStoreData(windowviewid,'isNormalMode') == true) {
8030 8086  
8031 8087 }
8032   - else {
8033   - if ($rootScope.isCallFromOtherModule) {
8034   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
8035   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
8036   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
8037   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
8038   - }
  8088 + else {
8039 8089 //1.
8040 8090 $scope.flushCanvas(windowviewid);
8041 8091  
... ... @@ -8092,8 +8142,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8092 8142  
8093 8143 //// #7972 Mozilla Firefox> Incorrect navigation
8094 8144 $("#canvasDiv").scroll(function (event) {
8095   - var windowviewid = (event.currentTarget.id).split("_")[1];
8096   -
  8145 + var len= (event.currentTarget.id).split("_").length;
  8146 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
  8147 +
8097 8148 $scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',$('#canvasDivDA_' + windowviewid).scrollLeft());
8098 8149 $scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',$('#canvasDivDA_' + windowviewid).scrollTop());
8099 8150  
... ... @@ -8104,14 +8155,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8104 8155 $scope.DisableUI();
8105 8156  
8106 8157 console.log('isCalledFromButton= ' + isCalledFromButton);
8107   -
8108   - if ($rootScope.isCallFromOtherModule) {
8109   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
8110   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
8111   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
8112   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
8113   - }
8114   -
  8158 +
8115 8159 $scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',$('#canvasDivDA_' + windowviewid).scrollLeft());
8116 8160 $scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',$('#canvasDivDA_' + windowviewid).scrollTop());
8117 8161  
... ... @@ -8209,8 +8253,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8209 8253 $scope.enableShowHideStructureBox = function (event) {
8210 8254  
8211 8255 //if listanager is visisble then close it
8212   - var windowviewid = (event.currentTarget.id).split("_")[1];
8213   -
  8256 + var len= (event.currentTarget.id).split("_").length;
  8257 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
  8258 +
8214 8259 $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false);
8215 8260 $rootScope.CloseListManager();
8216 8261 var btnStrutureBoxname = document.getElementById("btnStrutureBox_" + windowviewid).name;
... ... @@ -8302,18 +8347,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8302 8347 var id;
8303 8348 if (value.haveMirror == 'true') {
8304 8349 if ($rootScope.multiViewCounter != undefined) {
8305   - id = 'imageCanvas' + value.bodyRegionId + '_MR' + '|' + windowviewid;
  8350 + id = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid;
8306 8351 }
8307 8352 else {
8308   - id = 'imageCanvas' + value.bodyRegionId + '_MR' + '|' + windowviewid;
  8353 + id = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid;
8309 8354 }
8310 8355 }
8311 8356 else {
8312 8357 if ($rootScope.multiViewCounter != undefined) {
8313   - id = 'imageCanvas' + value.bodyRegionId + '|' + windowviewid;
  8358 + id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
8314 8359 }
8315 8360 else {
8316   - id = 'imageCanvas' + value.bodyRegionId + '|' + windowviewid;
  8361 + id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
8317 8362 }
8318 8363  
8319 8364 }
... ... @@ -8490,7 +8535,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8490 8535 if (AllTerms != undefined && AllTerms.length > 0) {
8491 8536 $scope.HighlightBodyByTermList(AllTerms,windowviewid);
8492 8537 }
8493   - 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 +
8494 8551 $scope.EnableUI();
8495 8552 }
8496 8553 }, 500);
... ... @@ -8558,18 +8615,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8558 8615 var id;
8559 8616 if (value.haveMirror == 'true') {
8560 8617 if ($rootScope.multiViewCounter != undefined) {
8561   - id = 'imageCanvas' + value.bodyRegionId + '_MR' + '|' + windowviewid;
  8618 + id = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid;
8562 8619 }
8563 8620 else {
8564   - id = 'imageCanvas' + value.bodyRegionId + '_MR'+'|' + windowviewid;;
  8621 + id = 'imageCanvas' + value.bodyRegionId + '_MR'+"_" + windowviewid;;
8565 8622 }
8566 8623 }
8567 8624 else {
8568 8625 if ($rootScope.multiViewCounter != undefined) {
8569   - id = 'imageCanvas' + value.bodyRegionId + '|' + windowviewid;
  8626 + id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
8570 8627 }
8571 8628 else {
8572   - id = 'imageCanvas' + value.bodyRegionId + '|' + windowviewid;
  8629 + id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
8573 8630 }
8574 8631 }
8575 8632  
... ... @@ -8820,8 +8877,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8820 8877  
8821 8878 $scope.OnGenderChange = function (event) {
8822 8879  
8823   - var windowviewid = (event.target.parentElement.parentElement.id).split("_")[1];
8824   -
  8880 + var len= (event.target.parentElement.parentElement.id).split("_").length;
  8881 + var windowviewid = (event.target.parentElement.parentElement.id).split("_")[len-1];
  8882 +
8825 8883 var genderId = $scope.GetwindowStoreData(windowviewid,'genderId');
8826 8884 if (genderId == event.currentTarget.title) {
8827 8885 return;
... ... @@ -8882,14 +8940,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8882 8940 $("#btnHighLight_" + windowviewid).addClass("btn-primary");
8883 8941  
8884 8942 }
8885   -
8886   - if ($rootScope.isCallFromOtherModule) {
8887   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
8888   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
8889   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
8890   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
8891   - }
8892   -
  8943 +
8893 8944 var currentBodyViewId = $scope.correspondingBodyViewIds[$scope.GetwindowStoreData(windowviewid,'voId')];
8894 8945  
8895 8946  
... ... @@ -9089,8 +9140,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9089 9140 }
9090 9141  
9091 9142 $scope.OnViewChange = function (event) {
9092   -
9093   - 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];
9094 9145 var viewid = $scope.GetwindowStoreData(windowviewid,'voId')
9095 9146 var selectedViewId = $scope.bodyViews[event.currentTarget.title];
9096 9147  
... ... @@ -9124,7 +9175,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9124 9175 if ($rootScope.isOpenResourceBtnClicked) {
9125 9176  
9126 9177 var multiViewInfo = $rootScope.multiViewInfo;
9127   - var windowviewid = event.target.parentElement.parentElement.id.split('_')[1];
  9178 + //var windowviewid = event.target.parentElement.parentElement.id.split('_')[1];
9128 9179 $rootScope.multiViewCounter = windowviewid;
9129 9180 $scope.setScopeVariables();
9130 9181 }
... ... @@ -9185,15 +9236,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9185 9236 if (canDivChildCount > 0) {
9186 9237 canDiv.innerHTML = '';
9187 9238 }
9188   -
9189   - if ($rootScope.isCallFromOtherModule) {
9190   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
9191   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
9192   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
9193   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
9194   -
9195   - }
9196   -
  9239 +
9197 9240 $scope.SetwindowStoreData(windowviewid,'viewOrientationId',selectedViewId);
9198 9241 var genderId = $scope.GetwindowStoreData(windowviewid,'genderId');
9199 9242  
... ... @@ -9333,7 +9376,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9333 9376 $scope.loadNavigatorForSelectedBodyView = function (currentBodyViewId, windowviewid) {
9334 9377  
9335 9378 var NavigatorData=$scope.GetwindowStoreData(windowviewid,'NavigatorData');
9336   - $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 +
9337 9392 if (NavigatorData != null || NavigatorData != undefined) {
9338 9393 var navdtlOrient = new jinqJs()
9339 9394 .from(NavigatorData.Navigtor.ViewOrientation)
... ... @@ -9345,7 +9400,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9345 9400  
9346 9401 var navOrientationdata = new jinqJs()
9347 9402 .from(navdtlOrient[0].ImageInfo)
9348   - .where("_Ethnicity == " + $rootScope.globalSetting.ethnicity)
  9403 + .where("_Ethnicity == " + skinTone)
9349 9404 .select();
9350 9405  
9351 9406 if (navOrientationdata != null || navOrientationdata != undefined) {
... ... @@ -9356,7 +9411,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9356 9411 var navImageModesty;
9357 9412  
9358 9413 angular.forEach(navigatorImage, function (value, key) {
9359   - if (value._HaveModesty === $rootScope.globalSetting.modesty) {
  9414 + if (value._HaveModesty === ModestyValue) {
9360 9415 navImageModesty = value._ImageName;
9361 9416 }
9362 9417 })
... ... @@ -9367,7 +9422,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9367 9422 }
9368 9423  
9369 9424 var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId');
9370   - 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;
9371 9426 }
9372 9427 }
9373 9428  
... ... @@ -9428,19 +9483,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9428 9483  
9429 9484 $scope.HighlightBodyByBodySystem = function (event) {
9430 9485  
9431   - 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 +
9432 9489 var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId');
9433 9490 $scope.SetwindowStoreData(windowviewid,'isExtract',false);
9434 9491 $("#structureDropdownDA_" + windowviewid).toggle();
9435 9492 $scope.DisableUI();
9436   -
9437   - if ($rootScope.isCallFromOtherModule) {
9438   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
9439   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
9440   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
9441   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
9442   - }
9443   -
  9493 +
9444 9494 $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false);
9445 9495 $rootScope.CloseListManager();
9446 9496  
... ... @@ -9516,7 +9566,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9516 9566 var viewtarget_highlightbody = angular.element(event.currentTarget);
9517 9567 var title_highlightbody = viewtarget_highlightbody.attr('title');
9518 9568  
9519   - $scope.removeBodySyetemSelectionClass(title_highlightbody);
  9569 + $scope.removeBodySyetemSelectionClass(windowviewid,title_highlightbody);
9520 9570  
9521 9571 //Highlight button should be active
9522 9572 $("#btnHighLight_" + windowviewid).addClass("btn-primary");
... ... @@ -9543,7 +9593,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9543 9593 $scope.removeCurrentHighlightedBodySystem = function (windowviewid) {
9544 9594 var grayImageDataList=$scope.GetwindowStoreData(windowviewid,'grayImageDataList');
9545 9595 for (var i = 0; i < grayImageDataList.length; i++) {
9546   - var grayCanvasID = 'imageCanvas' + parseInt(i + 1) + "|" + windowviewid;
  9596 + var grayCanvasID = 'imageCanvas' + parseInt(i + 1) + "_" + windowviewid;
9547 9597 var grayCanvas = document.getElementById(grayCanvasID);
9548 9598  
9549 9599 if (grayCanvas != null) {
... ... @@ -9557,220 +9607,63 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9557 9607 }
9558 9608 }
9559 9609  
9560   - $scope.removeBodySyetemSelectionClass = function (title_highlightbody) {
9561   - if (title_highlightbody == "CurrentStructure") {
9562   - $scope.CurrentStructure = "active";
9563   - $scope.Cardiovascular = "";
9564   - $scope.Digestive = "";
9565   - $scope.Endocrine = "";
9566   - $scope.Immune = "";
9567   - $scope.Integumentary = "";
9568   - $scope.Lymphatic = "";
9569   - $scope.Muscular = "";
9570   - $scope.Nervous = "";
9571   - $scope.Reproductive = "";
9572   - $scope.Respiratory = "";
9573   - $scope.Skeletal = "";
9574   - $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");
9575 9628 }
9576 9629 else if (title_highlightbody == "Cardiovascular") {
9577   - $scope.CurrentStructure = "";
9578   - $scope.Cardiovascular = "active";
9579   - $scope.Digestive = "";
9580   - $scope.Endocrine = "";
9581   - $scope.Immune = "";
9582   - $scope.Integumentary = "";
9583   - $scope.Lymphatic = "";
9584   - $scope.Muscular = "";
9585   - $scope.Nervous = "";
9586   - $scope.Reproductive = "";
9587   - $scope.Respiratory = "";
9588   - $scope.Skeletal = "";
9589   - $scope.Urinary = "";
  9630 + $('#Cardiovascular_'+windowviewid).addClass("active");
9590 9631 }
9591 9632  
9592 9633 else if (title_highlightbody == "Digestive") {
9593   - $scope.CurrentStructure = "";
9594   - $scope.Cardiovascular = "";
9595   - $scope.Digestive = "active";
9596   - $scope.Endocrine = "";
9597   - $scope.Immune = "";
9598   - $scope.Integumentary = "";
9599   - $scope.Lymphatic = "";
9600   - $scope.Muscular = "";
9601   - $scope.Nervous = "";
9602   - $scope.Reproductive = "";
9603   - $scope.Respiratory = "";
9604   - $scope.Skeletal = "";
9605   - $scope.Urinary = "";
  9634 + $('#Digestive_'+windowviewid).addClass("active");
9606 9635 }
9607 9636  
9608 9637 else if (title_highlightbody == "Endocrine") {
9609   - $scope.CurrentStructure = "";
9610   - $scope.Cardiovascular = "";
9611   - $scope.Digestive = "";
9612   - $scope.Endocrine = "active";
9613   - $scope.Immune = "";
9614   - $scope.Integumentary = "";
9615   - $scope.Lymphatic = "";
9616   - $scope.Muscular = "";
9617   - $scope.Nervous = "";
9618   - $scope.Reproductive = "";
9619   - $scope.Respiratory = "";
9620   - $scope.Skeletal = "";
9621   - $scope.Urinary = "";
  9638 + $('#Endocrine_'+windowviewid).addClass("active");
9622 9639 }
9623 9640 else if (title_highlightbody == "Immune") {
9624   -
9625   - $scope.CurrentStructure = "";
9626   - $scope.Cardiovascular = "";
9627   - $scope.Digestive = "";
9628   - $scope.Endocrine = "";
9629   - $scope.Immune = "active";
9630   - $scope.Integumentary = "";
9631   - $scope.Lymphatic = "";
9632   - $scope.Muscular = "";
9633   - $scope.Nervous = "";
9634   - $scope.Reproductive = "";
9635   - $scope.Respiratory = "";
9636   - $scope.Skeletal = "";
9637   - $scope.Urinary = "";
  9641 + $('#Immune_'+windowviewid).addClass("active");
9638 9642 }
9639 9643 else if (title_highlightbody == "Integumentary") {
9640   - $scope.CurrentStructure = "";
9641   - $scope.Cardiovascular = "";
9642   - $scope.Digestive = "";
9643   - $scope.Endocrine = "";
9644   - $scope.Immune = "";
9645   - $scope.Integumentary = "active";
9646   - $scope.Lymphatic = "";
9647   - $scope.Muscular = "";
9648   - $scope.Nervous = "";
9649   - $scope.Reproductive = "";
9650   - $scope.Respiratory = "";
9651   - $scope.Skeletal = "";
9652   - $scope.Urinary = "";
  9644 + $('#Integumentary_'+windowviewid).addClass("active");
9653 9645 }
9654 9646 else if (title_highlightbody == "Lymphatic") {
9655   - $scope.CurrentStructure = "";
9656   - $scope.Cardiovascular = "";
9657   - $scope.Digestive = "";
9658   - $scope.Endocrine = "";
9659   - $scope.Immune = "";
9660   - $scope.Integumentary = "";
9661   - $scope.Lymphatic = "active";
9662   - $scope.Muscular = "";
9663   - $scope.Nervous = "";
9664   - $scope.Reproductive = "";
9665   - $scope.Respiratory = "";
9666   - $scope.Skeletal = "";
9667   - $scope.Urinary = "";
  9647 + $('#Lymphatic_'+windowviewid).addClass("active");
9668 9648 }
9669 9649 else if (title_highlightbody == "Muscular") {
9670   - $scope.CurrentStructure = "";
9671   - $scope.Cardiovascular = "";
9672   - $scope.Digestive = "";
9673   - $scope.Endocrine = "";
9674   - $scope.Immune = "";
9675   - $scope.Integumentary = "";
9676   - $scope.Lymphatic = "";
9677   - $scope.Muscular = "active";
9678   - $scope.Nervous = "";
9679   - $scope.Reproductive = "";
9680   - $scope.Respiratory = "";
9681   - $scope.Skeletal = "";
9682   - $scope.Urinary = "";
  9650 + $('#Muscular_'+windowviewid).addClass("active");
9683 9651 }
9684 9652 else if (title_highlightbody == "Nervous") {
9685   - $scope.CurrentStructure = "";
9686   - $scope.Cardiovascular = "";
9687   - $scope.Digestive = "";
9688   - $scope.Endocrine = "";
9689   - $scope.Immune = "";
9690   - $scope.Integumentary = "";
9691   - $scope.Lymphatic = "";
9692   - $scope.Muscular = "";
9693   - $scope.Nervous = "active";
9694   - $scope.Reproductive = "";
9695   - $scope.Respiratory = "";
9696   - $scope.Skeletal = "";
9697   - $scope.Urinary = "";
  9653 + $('#Nervous_'+windowviewid).addClass("active");
9698 9654 }
9699 9655 else if (title_highlightbody == "Reproductive") {
9700   - $scope.CurrentStructure = "";
9701   - $scope.Cardiovascular = "";
9702   - $scope.Digestive = "";
9703   - $scope.Endocrine = "";
9704   - $scope.Immune = "";
9705   - $scope.Integumentary = "";
9706   - $scope.Lymphatic = "";
9707   - $scope.Muscular = "";
9708   - $scope.Nervous = "";
9709   - $scope.Reproductive = "active";
9710   - $scope.Respiratory = "";
9711   - $scope.Skeletal = "";
9712   - $scope.Urinary = "";
  9656 + $('#Reproductive_'+windowviewid).addClass("active");
9713 9657 }
9714 9658 else if (title_highlightbody == "Respiratory") {
9715   - $scope.CurrentStructure = "";
9716   - $scope.Cardiovascular = "";
9717   - $scope.Digestive = "";
9718   - $scope.Endocrine = "";
9719   - $scope.Immune = "";
9720   - $scope.Integumentary = "";
9721   - $scope.Lymphatic = "";
9722   - $scope.Muscular = "";
9723   - $scope.Nervous = "";
9724   - $scope.Reproductive = "";
9725   - $scope.Respiratory = "active";
9726   - $scope.Skeletal = "";
9727   - $scope.Urinary = "";
  9659 + $('#Respiratory_'+windowviewid).addClass("active");
9728 9660 }
9729 9661 else if (title_highlightbody == "Skeletal") {
9730   - $scope.CurrentStructure = "";
9731   - $scope.Cardiovascular = "";
9732   - $scope.Digestive = "";
9733   - $scope.Endocrine = "";
9734   - $scope.Immune = "";
9735   - $scope.Integumentary = "";
9736   - $scope.Lymphatic = "";
9737   - $scope.Muscular = "";
9738   - $scope.Nervous = "";
9739   - $scope.Reproductive = "";
9740   - $scope.Respiratory = "";
9741   - $scope.Skeletal = "active";
9742   - $scope.Urinary = "";
  9662 + $('#Skeletal_'+windowviewid).addClass("active");
9743 9663 }
9744 9664 else if (title_highlightbody == "Urinary") {
9745   - $scope.CurrentStructure = "";
9746   - $scope.Cardiovascular = "";
9747   - $scope.Digestive = "";
9748   - $scope.Endocrine = "";
9749   - $scope.Immune = "";
9750   - $scope.Integumentary = "";
9751   - $scope.Lymphatic = "";
9752   - $scope.Muscular = "";
9753   - $scope.Nervous = "";
9754   - $scope.Reproductive = "";
9755   - $scope.Respiratory = "";
9756   - $scope.Skeletal = "";
9757   - $scope.Urinary = "active";
9758   - }
9759   - else {
9760   - $scope.CurrentStructure = "";
9761   - $scope.Cardiovascular = "";
9762   - $scope.Digestive = "";
9763   - $scope.Endocrine = "";
9764   - $scope.Immune = "";
9765   - $scope.Integumentary = "";
9766   - $scope.Lymphatic = "";
9767   - $scope.Muscular = "";
9768   - $scope.Nervous = "";
9769   - $scope.Reproductive = "";
9770   - $scope.Respiratory = "";
9771   - $scope.Skeletal = "";
9772   - $scope.Urinary = "";
9773   - }
  9665 + $('#Urinary_'+windowviewid).addClass("active");
  9666 + }
9774 9667 }
9775 9668  
9776 9669 $scope.ShowSearch = function (windowviewid) {
... ... @@ -9861,9 +9754,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9861 9754  
9862 9755  
9863 9756 $scope.HideSearch = function () {
9864   -
9865   - var windowviewid = (event.currentTarget.id).split("_")[1];
9866   -
  9757 + var len= (event.currentTarget.id).split("_").length;
  9758 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
  9759 +
9867 9760 $timeout(function () {
9868 9761 $("#termlistfilter_" + windowviewid).css("display", "none");
9869 9762  
... ... @@ -9872,9 +9765,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9872 9765 }
9873 9766  
9874 9767 $scope.jumpToTerm = function (event) {
9875   -
9876   - var windowviewid = (event.target.parentElement.parentElement.id).split("_")[1];
9877   -
  9768 + var len= (event.target.parentElement.parentElement.id).split("_").length;
  9769 + var windowviewid = (event.target.parentElement.parentElement.id).split("_")[len-1];
  9770 +
9878 9771 $rootScope.isTermClicked = true;
9879 9772 var currenttermidTxt=$('#' + event.currentTarget.id).text();
9880 9773  
... ... @@ -9886,14 +9779,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9886 9779 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
9887 9780 $('#termList option[value="' + currenttermidTxt + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
9888 9781  
9889   -
9890   - if ($rootScope.isCallFromOtherModule) {
9891   - $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
9892   - $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
9893   - $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
9894   - $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
9895   - }
9896   -
9897 9782 $rootScope.isLoading = true;
9898 9783  
9899 9784 $('#spinner').css('visibility', 'visible');
... ... @@ -9940,7 +9825,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9940 9825 //Function to set the vertical and horizontal scroll position of CanvasDiv as per the Navigator
9941 9826 $scope.ScrollCanvasDiv = function (event) {
9942 9827  
9943   - 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 +
9944 9831 var x = $("#" + event.target.id).position();
9945 9832 var can = $("#canvasDivDA_" + windowviewid);
9946 9833 var canheight = can[0].scrollHeight;
... ... @@ -10155,7 +10042,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10155 10042 $scope.SetwindowStoreData(windowviewid,'isHighlightBodyByBodySystem',false);
10156 10043 $scope.SetwindowStoreData(windowviewid,'isbodySystemHighlight',false);
10157 10044  
10158   - $scope.removeBodySyetemSelectionClass("");
  10045 + $scope.removeBodySyetemSelectionClass(windowviewid,"");
10159 10046 //1.
10160 10047 $scope.SetwindowStoreData(windowviewid,'actualTermNumber',actualTermNumber);
10161 10048 console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + actualTermNumber)
... ... @@ -10574,7 +10461,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10574 10461  
10575 10462 $scope.LayerChangeBasedOnKeyPressed = function (e) {
10576 10463  
10577   - 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 +
10578 10467 // 'x' button is displaying inside the input box in IE browser.
10579 10468 if (e.keyCode == 38) {
10580 10469  
... ... @@ -10614,7 +10503,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10614 10503  
10615 10504 $scope.LayerValueChangeBasedOnKeyUp = function (e) {
10616 10505  
10617   - 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 +
10618 10509 var totalayer=$scope.GetwindowStoreData(windowviewid,'totalLayers');
10619 10510 if (e.keyCode == 13) {
10620 10511  
... ... @@ -10671,9 +10562,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10671 10562 }
10672 10563  
10673 10564 $scope.showFilteredTerms = function () {
10674   - var targetid = event.target.id;
10675   - var windowviewid = targetid.split('_')[1];
10676   -
  10565 + var len= (event.target.id).split("_").length;
  10566 + var windowviewid = (event.target.id).split("_")[len-1];
  10567 +
10677 10568 if ($('#searchListDiv_' + windowviewid).html() != "") {
10678 10569 $('#searchListDiv_' + windowviewid).empty();
10679 10570 }
... ... @@ -10701,8 +10592,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10701 10592 }, 100);
10702 10593 };
10703 10594 $scope.ApplySearch = function () {
10704   -
10705   - 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 +
10706 10598 $rootScope.isLoading = false;
10707 10599 $('#spinner').css('visibility', 'hidden');
10708 10600  
... ... @@ -10774,8 +10666,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10774 10666 }
10775 10667 $scope.closeSerachTermListPopUp = function () {
10776 10668  
10777   - var windowviewid = (event.target.parentElement.parentElement.parentElement.id).split("_")[1];
10778   -
  10669 + var len= (event.target.parentElement.parentElement.parentElement.id).split("_").length;
  10670 + var windowviewid = (event.target.parentElement.parentElement.parentElement.id).split("_")[len-1];
  10671 +
10779 10672 $('#searchedTermListPopUp_' + windowviewid).css('display', 'none');
10780 10673 $('#searchedTermListPopUp_' + windowviewid).css("visibility", "hidden");
10781 10674  
... ... @@ -10822,7 +10715,8 @@ function OnSearch(event) {
10822 10715 console.log('Show Search is called outside ');
10823 10716 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10824 10717 scope.$apply(function () {
10825   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10718 + var len= (event.currentTarget.id).split("_").length;
  10719 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10826 10720 scope.ShowSearch(windowviewid);
10827 10721 });
10828 10722 }
... ... @@ -10855,7 +10749,8 @@ function OnEnableExtract() {
10855 10749 console.log('OnEnableExtract is called outside ');
10856 10750 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10857 10751 scope.$apply(function () {
10858   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10752 + var len= (event.currentTarget.id).split("_").length;
  10753 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10859 10754 scope.enableExtract('true',windowviewid);
10860 10755 });
10861 10756 }
... ... @@ -10865,7 +10760,8 @@ function onTboxCreation() {
10865 10760 console.log('OnEnableExtract is called outside ');
10866 10761 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10867 10762 scope.$apply(function () {
10868   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10763 + var len= (event.currentTarget.id).split("_").length;
  10764 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10869 10765 scope.createTransparencyBox(windowviewid);
10870 10766 });
10871 10767 }
... ... @@ -10874,7 +10770,8 @@ function onTboxClose() {
10874 10770 console.log('onTboxClose is called outside ');
10875 10771 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10876 10772 scope.$apply(function () {
10877   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10773 + var len= (event.currentTarget.id).split("_").length;
  10774 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10878 10775 scope.CloseTransparencyBox(windowviewid);
10879 10776 });
10880 10777 }
... ... @@ -10884,7 +10781,8 @@ function OnEnableNormalMode() {
10884 10781  
10885 10782 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10886 10783 scope.$apply(function () {
10887   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10784 + var len= (event.currentTarget.id).split("_").length;
  10785 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10888 10786 scope.enableNormalMode(windowviewid);
10889 10787 });
10890 10788 }
... ... @@ -10893,7 +10791,8 @@ function OnEnableHighlight() {
10893 10791 console.log('OnEnableHighlight is called outside ');
10894 10792 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10895 10793 scope.$apply(function () {
10896   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10794 + var len= (event.currentTarget.id).split("_").length;
  10795 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10897 10796 scope.enableHighlight(windowviewid);
10898 10797 });
10899 10798 }
... ... @@ -10902,7 +10801,8 @@ function OnIdentifyClick() {
10902 10801 console.log('OnIdentifyClick is called outside ');
10903 10802 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10904 10803 scope.$apply(function () {
10905   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10804 + var len= (event.currentTarget.id).split("_").length;
  10805 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10906 10806 scope.IdentifyClick(windowviewid);
10907 10807 });
10908 10808 }
... ... @@ -10910,7 +10810,8 @@ function OnIdentifyClick() {
10910 10810 function OnZoom(event) {
10911 10811 var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10912 10812 scope.DisableUI();
10913   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10813 + var len= (event.currentTarget.id).split("_").length;
  10814 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10914 10815  
10915 10816 if ($(".btn-annotation").hasClass("activebtncolor")) //Bug #14928
10916 10817 $(".btn-annotation").removeClass("activebtncolor");
... ... @@ -10937,7 +10838,8 @@ function onListManagerTermSelection(id, isTermListOptionClicked) {
10937 10838  
10938 10839 function genderChange(event) {
10939 10840 event.stopPropagation();
10940   - var windowviewid = (event.currentTarget.id).split("_")[1];
  10841 + var len= (event.currentTarget.id).split("_").length;
  10842 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
10941 10843  
10942 10844 $("#structureDropdownDA_" + windowviewid).css("display", "none");
10943 10845 $("#viewChangeIDDA_" + windowviewid).css("display", "none");
... ... @@ -10952,8 +10854,9 @@ function genderChange(event) {
10952 10854  
10953 10855 function viewChange(event) {
10954 10856 event.stopPropagation();
10955   - var windowviewid = (event.currentTarget.id).split("_")[1];
10956   -
  10857 + var len= (event.currentTarget.id).split("_").length;
  10858 + var windowviewid = (event.currentTarget.id).split("_")[len-1];
  10859 +
10957 10860 $("#structureDropdownDA_" + windowviewid).css("display", "none");
10958 10861 $("#genderChangeIdDA_" + windowviewid).css("display", "none");
10959 10862 $("#viewChangeIDDA_" + windowviewid).toggle();
... ... @@ -10967,7 +10870,9 @@ function viewChange(event) {
10967 10870  
10968 10871 //body highlight options functinality
10969 10872 function LoadBodySystemData(event) {
10970   - 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 +
10971 10876 event.stopPropagation();
10972 10877 $("#structureDropdownDA_" + windowviewid).toggle();
10973 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;
... ...