Commit 9e63270864a2ec3f1768efd50c61cc144d14d3ff

Authored by Birendra Kumar
1 parent 67f053ee

partially updated open resource for DA

400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... ... @@ -1365,6 +1365,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1365 1365  
1366 1366 }
1367 1367 else { //Added Code by sandeep for user story-52696
  1368 + $("#viwerSelect").empty();
1368 1369 var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']");
1369 1370 if (modulePanel != undefined && modulePanel != null) {
1370 1371 // $('#viwerSelect').append('<option selected value="' + 0 + '">' + "Select Viewer" + '</option>');
... ... @@ -1398,60 +1399,39 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1398 1399  
1399 1400  
1400 1401 $scope.loadModuleWithCB = function (moduleName) {
1401   - if (moduleName == "DISSECTIBLE_ANATOMY") {
1402   - var DAData = ModuleService.getModuleData(moduleName);
1403   -
1404   - if (DAData != undefined && DAData.length > 0) {
1405   - $scope.loadDissectibleAnatomyModule();
1406   - }
1407   -
1408   - }
1409   - else if (moduleName == "ATLAS_ANATOMY") {
1410   - var AAData = ModuleService.getModuleData(moduleName);
1411   -
1412   - if (AAData != undefined && AAData.length > 0) {
1413   - $scope.loadAtlasAnatomyModule();
1414   - }
1415   -
1416   - }
1417   - else if (moduleName == "CLINICAL_ILLUSTRATIONS") {
1418   - var CIData = ModuleService.getModuleData(moduleName);
1419   -
1420   - if (CIData != undefined && CIData.length > 0) {
1421   - $scope.loadClinicalIllustrationModule();
1422   - }
1423   -
1424   - }
1425   - else if (moduleName == "CLINICAL_ANIMATIONS") {
1426   - var CAData = ModuleService.getModuleData(moduleName);
1427   -
1428   - if (CAData != undefined && CAData.length > 0) {
1429   - $scope.loadClinicalAnimationModule();
1430   - }
  1402 + switch (moduleName) {
  1403 + case "DISSECTIBLE_ANATOMY":
  1404 + $scope.loadDissectibleAnatomyModule(moduleName);
  1405 + break;
  1406 + case "ATLAS_ANATOMY":
  1407 + $scope.loadAtlasAnatomyModule(moduleName);
  1408 + break;
  1409 + case "CLINICAL_ILLUSTRATIONS":
  1410 + $scope.loadClinicalIllustrationModule(moduleName);
  1411 + break;
  1412 + case "CLINICAL_ANIMATIONS":
  1413 + $scope.loadClinicalAnimationModule(moduleName);
  1414 + break;
  1415 + case "THREE_D_ANATOMY":
  1416 + $scope.load3DAnatomyModule(moduleName);
  1417 + break;
1431 1418 }
1432   - else if (moduleName == "THREE_D_ANATOMY") {
1433   - var ThreeDData = ModuleService.getModuleData(moduleName);
1434 1419  
1435   - if (ThreeDData != undefined && ThreeDData.length > 0) {
1436   - $scope.load3DAnatomyModule();
1437   - }
1438   - }
1439   -
1440 1420 }
1441   - $scope.load3DAnatomyModule = function () {
  1421 + $scope.load3DAnatomyModule = function (moduleName) {
1442 1422 $rootScope.isCallFromOtherModule = true;
1443 1423 $('#parentcustomDiv').append($('<div id="theeDCustomModuleDiv' + $scope.Slidenumber + '"></div>'));
1444 1424 $e = $('#theeDCustomModuleDiv' + $scope.Slidenumber).append("<threed-anatomy-directive></threed-anatomy-directive>");
1445 1425 $compile($e)($scope);
1446 1426 }
1447   - $scope.loadClinicalAnimationModule = function () {
  1427 + $scope.loadClinicalAnimationModule = function (moduleName) {
1448 1428 $rootScope.isCallFromOtherModule = true;
1449 1429 $('#parentcustomDiv').append($('<div id="caCustomModuleDiv' + $scope.Slidenumber + '"></div>'));
1450 1430 $e = $('#caCustomModuleDiv' + $scope.Slidenumber).append("<clinical-animation-directive></clinical-animation-directive>");
1451 1431 $compile($e)($scope);
1452 1432 }
1453 1433  
1454   - $scope.loadClinicalIllustrationModule = function () {
  1434 + $scope.loadClinicalIllustrationModule = function (moduleName) {
1455 1435 $rootScope.isCallFromOtherModule = true;
1456 1436 //slide number to terminate last load module on prev slide
1457 1437 // aaCustomModuleDiv new div create for new slide load
... ... @@ -1460,25 +1440,42 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1460 1440 $compile($e)($scope);
1461 1441 }
1462 1442  
1463   - $scope.loadAtlasAnatomyModule = function () {
  1443 + $scope.loadAtlasAnatomyModule = function (moduleName) {
1464 1444 $rootScope.isCallFromOtherModule = true;
  1445 +
1465 1446 //slide number to terminate last load module on prev slide
1466 1447 // aaCustomModuleDiv new div create for new slide load
1467 1448 $('#parentcustomDiv').append($('<div id="aaCustomModuleDiv' + $scope.Slidenumber + '"></div>'));
1468 1449 $e = $('#aaCustomModuleDiv' + $scope.Slidenumber).append("<atlas-anatomy-directive></atlas-anatomy-directive>");
1469 1450 $compile($e)($scope);
1470 1451 }
1471   - $scope.loadDissectibleAnatomyModule = function () {
1472   - $rootScope.isCallFromOtherModule = true;
  1452 + $scope.loadDissectibleAnatomyModule = function (moduleName) {
  1453 + var DAData = ModuleService.getModuleData(moduleName);
1473 1454  
1474   - //slide number to terminate last load module on prev slide
1475   - // daCustomModuleDiv new div create for new slide load
1476   - $('#parentcustomDiv').append($('<div id="daCustomModuleDiv' + $scope.Slidenumber + '"></div>'));
  1455 + if (DAData != undefined && DAData.length > 0) {
  1456 + $rootScope.isCallFromOtherModule = true;
1477 1457  
1478   - $e = $('#daCustomModuleDiv' + $scope.Slidenumber).append("<da-directive></da-directive>");
  1458 + var daSectionExist = document.getElementById('daCustomModuleDiv' + $scope.Slidenumber);
  1459 +
  1460 + if (daSectionExist==null)
  1461 + {
  1462 + $('#parentcustomDiv').append($('<div id="daCustomModuleDiv' + $scope.Slidenumber + '"></div>'));
1479 1463  
1480   - $compile($e)($scope);
  1464 + $e = $('#daCustomModuleDiv' + $scope.Slidenumber).append("<da-directive></da-directive>");
  1465 +
  1466 + $compile($e)($scope);
1481 1467  
  1468 + }
  1469 + else
  1470 + {
  1471 + // open new da panel on same slide by open resource
  1472 + $rootScope.openDABodyViewMain();
  1473 + }
  1474 +
  1475 +
  1476 + }
  1477 +
  1478 +
1482 1479 }
1483 1480  
1484 1481 //Added code by sandeep for user story-52696
... ... @@ -1493,16 +1490,17 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1493 1490  
1494 1491 //open resoruce on slide
1495 1492 $scope.loadResourceOnCurrentSlide = function (newWindowData) {
1496   -
1497   - //var windowData = JSON.parse(newWindowData);
  1493 +
1498 1494 var newwindowid = 0;
1499   -
1500   -
  1495 +
1501 1496 var ExistData = ModuleService.getModuleData(newWindowData.mType);
1502 1497  
1503 1498 if (ExistData != undefined && ExistData.length > 0) {
1504 1499  
1505 1500 newwindowid = newwindowid + ExistData.length;
  1501 +
  1502 + // clear all module data before open new module in cb
  1503 + ModuleService.ClearWinDataByModule(newWindowData.mType);
1506 1504 }
1507 1505 var isFound = jQuery.inArray(newWindowData.mType, $scope.LoadModuleName)
1508 1506 if (isFound == -1) {
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -493,19 +493,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
493 493 $rootScope.isLoading = true;
494 494 $('#spinner').css('visibility', 'visible');
495 495  
496   - // var u = $location.url();
  496 + // open module bu openresource
497 497 var isopenResourceRequest = sessionStorage.getItem('isModuleOpenByOpenResource');
498 498  
499 499 if (isopenResourceRequest == "true") {
500   - // $rootScope.MULTI_VIEW_ID = $rootScope.MULTI_VIEW_ID + 1;
501   - //$rootScope.multiViewInfoIndex = 0;
502   - //$rootScope.multiViewInfo.push({ "Target": $event.currentTarget, "id": $rootScope.MULTI_VIEW_ID, "bodyViewID": $event.currentTarget.id, "bodyName": $event.currentTarget.textContent });
503   - //// $rootScope.multiSearchData = [];
504   - //localStorage.setItem("multiViewInfo", JSON.stringify($rootScope.multiViewInfo));
505   - //console.log($rootScope.multiViewInfo);
506   - //$location.url('/curriculum-builder-detail');
507   - // $(document, parent.window.document).trigger('myCustomTrigger');
508   -
  500 +
509 501 // create json object
510 502  
511 503 var userEthnicity;
... ... @@ -525,7 +517,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
525 517 else {
526 518 userModestysettings = $rootScope.globalSetting.modesty;
527 519 }
528   -
  520 + //set default module data
529 521 var DaopenData= {
530 522 "id": $event.currentTarget.id,
531 523 "layerNumber": 1,
... ... @@ -539,11 +531,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
539 531  
540 532 } ;
541 533  
542   - parent.AIAModuleOpenResourceInfo(DaopenData);
543   -
544   - parent.closeIFrame();
545   -
  534 + window.parent.AIAModuleOpenResourceInfo(DaopenData);
546 535  
  536 + window.parent.closeIFrame();
  537 +
547 538 }
548 539 else {
549 540 $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'currentViewTitle',$event.currentTarget.textContent);
... ... @@ -561,16 +552,17 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
561 552  
562 553 // clear data set by curriculum builder
563 554 $rootScope.isCallFromOtherModule = undefined;
564   - $rootScope.isOpenResourceBtnClicked = undefined;
565   -
  555 +
566 556 $rootScope.MULTI_VIEW_ID += 1
567 557  
  558 + var windowviewid = $rootScope.MULTI_VIEW_ID;
  559 +
568 560 if ($rootScope.refreshcheck == null) {
569 561 $location.path('/');
570 562 }
571 563 $scope.ScopeVariablesDeclare();
572 564  
573   - $scope.initializeDAWindowData($rootScope.MULTI_VIEW_ID,true,undefined);
  565 + $scope.initializeDAWindowData(windowviewid, true, undefined);
574 566  
575 567 //get current path
576 568 var currentURL = $location.path();
... ... @@ -622,7 +614,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
622 614 }
623 615  
624 616  
625   - $scope.openBodyViewMain = function () {
  617 + $rootScope.openDABodyViewMain = function () {
626 618 $scope.ScopeVariablesDeclare();
627 619 if ($rootScope.isCallFromOtherModule) {
628 620 $scope.DAModuleData = ModuleService.getModuleData("DISSECTIBLE_ANATOMY");
... ... @@ -679,11 +671,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
679 671  
680 672 $scope.openBodyView = function (damoduledata) {
681 673 $scope.daOpenInOtherModules = damoduledata;
  674 + var windowviewid = $rootScope.MULTI_VIEW_ID;
682 675  
683 676 if ($rootScope.isCallFromOtherModule) {
684 677 $rootScope.MULTI_VIEW_ID += 1;
685   - var windowviewid= $rootScope.MULTI_VIEW_ID;
686   -
  678 + windowviewid = $rootScope.MULTI_VIEW_ID;
687 679 $scope.initializeDAWindowData(windowviewid,false,$scope.daOpenInOtherModules.currentWindowId);
688 680  
689 681 //$scope.daOpenInOtherModules = ModuleService.getModuleData("DISSECTIBLE_ANATOMY");
... ... @@ -742,32 +734,17 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
742 734  
743 735 }
744 736  
745   - }
746   - else if ($rootScope.isOpenResourceBtnClicked == true) {
747   - $rootScope.MULTI_VIEW_ID = $rootScope.multiViewInfo[$rootScope.multiViewInfoIndex].id;
748   - $rootScope.multiViewCounter = $rootScope.MULTI_VIEW_ID;
749   -
750   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'voId',$rootScope.multiViewInfo[$rootScope.multiViewInfoIndex].bodyViewID);
751   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'currentViewTitle',$rootScope.multiViewInfo[$rootScope.multiViewInfoIndex].bodyName);
752   -
753   - $scope.jsPanelID = 'daImagePanel' + '_' + $rootScope.multiViewCounter;
754   - $scope.viewID = 'daViewDA' + '_' + $rootScope.multiViewCounter;
755   - console.log('$location.url = ' + $location.url());
756   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'parentSlugName',($location.url()).replace('/', ''));
757   -
758   - //'clinical-illustrations'; //
759   - $scope.loadBodyView($rootScope.MULTI_VIEW_ID);
760   -
761   - }
762   - else {
  737 + }
  738 + else
  739 + {
763 740  
764   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'voId',$rootScope.getLocalStorageValue("currentBodyViewId"));
  741 + $scope.SetwindowStoreData(windowviewid, 'voId', $rootScope.getLocalStorageValue("currentBodyViewId"));
765 742  
766   - $scope.jsPanelID = 'daImagePanel' + '_' + $rootScope.MULTI_VIEW_ID;
767   - $scope.viewID = 'daViewDA' + '_' + $rootScope.MULTI_VIEW_ID;
768   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'parentSlugName','da-view-list');
  743 + $scope.jsPanelID = 'daImagePanel' + '_' + windowviewid;
  744 + $scope.viewID = 'daViewDA' + '_' + windowviewid;
  745 + $scope.SetwindowStoreData(windowviewid, 'parentSlugName', 'da-view-list');
769 746  
770   - $scope.loadBodyView($rootScope.MULTI_VIEW_ID);
  747 + $scope.loadBodyView(windowviewid);
771 748 }
772 749  
773 750 }
... ... @@ -822,13 +799,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
822 799 $rootScope.loadSearchData(windowviewid);
823 800  
824 801  
825   - if ($rootScope.isOpenResourceBtnClicked == true) {
826   -
827   - $rootScope.jsPanelWidth = $(window).outerWidth() - 310;
828   - $rootScope.jsPanelHeight = $(window).outerHeight() - 110;
829   - $rootScope.jsPanelLeft = 302;
830   - }
831   - else if ($rootScope.isCallFromOtherModule) {
  802 + if ($rootScope.isCallFromOtherModule) {
832 803 // open JS panel for curriculum with define cornonate in CB jason
833 804 $rootScope.jsPanelWidth = $scope.daOpenInOtherModules.size.width;//1000;
834 805 $rootScope.jsPanelHeight = $scope.daOpenInOtherModules.size.height;
... ... @@ -929,14 +900,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
929 900 $scope.IdMale = "IdMale";
930 901 $scope.IdFemale = "IdFemale";
931 902  
932   - //if ($rootScope.isOpenResourceBtnClicked || $rootScope.isCallFromOtherModule) {
933 903  
934 904 $scope.setControlIDs();
935 905  
936   - // use for isOpenResourceBtnClicked
937   - // $scope.setScopeVariables();
938   - // }
939   -
940 906 if ($rootScope.isCallFromOtherModule) {
941 907 $scope.JsPanelclick(windowviewid);
942 908 }
... ... @@ -956,12 +922,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
956 922  
957 923 $scope.removeBodySyetemSelectionClass(windowviewid,'Current Structure');
958 924  
959   - // console.log('html is compiled ' + document.getElementById('daView'))
960   - //if ($('#' + $scope.jsPanelID).offset().top == 0)
961   - // $('#' + $scope.jsPanelID).css("top", '70px');
962   -
963   - //if ($('#' + $scope.jsPanelID).offset().left == 0)
964   - // $('#' + $scope.jsPanelID).css("left", '1px');
965 925  
966 926 }, 350);
967 927 }
... ... @@ -1006,12 +966,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1006 966  
1007 967 $('#daBodyview').css("width", $(window).outerWidth());
1008 968  
1009   - if ($rootScope.isOpenResourceBtnClicked) {
1010   - //var multiv = JSON.parse($rootScope.getLocalStorageValue("multiViewInfo"));
1011   -
1012   - }
1013   - else
1014   - $scope.SetwindowStoreData(windowviewid,'voId',currentBodyViewId);
  969 + $scope.SetwindowStoreData(windowviewid,'voId',currentBodyViewId);
1015 970 //1. load navigator man first
1016 971 console.log('before LoadBodyViewNavigatorImage call')
1017 972 $scope.LoadBodyViewNavigatorImage(currentBodyViewId, windowviewid);
... ... @@ -1151,8 +1106,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1151 1106  
1152 1107 $scope.setControlIDs = function () {
1153 1108  
1154   - //if ($rootScope.isOpenResourceBtnClicked == true || $rootScope.isCallFromOtherModule == true) {
1155   -
1156 1109 $("#daView").attr("id", "daViewDA_" + $rootScope.MULTI_VIEW_ID);
1157 1110 $scope.daViewID = "daViewDA_" + $rootScope.MULTI_VIEW_ID;
1158 1111  
... ... @@ -1292,60 +1245,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1292 1245  
1293 1246 }
1294 1247  
1295   - $scope.setScopeVariables = function () {
1296   - $scope.daViewID = "daViewDA_" + $rootScope.multiViewCounter;
1297   - $scope.btnIdentifyID = "btnIdentify_" + $rootScope.multiViewCounter;
1298   - $scope.btnZoomID = "btnZoom_" + $rootScope.multiViewCounter;
1299   - $scope.btnTranparencyID = "btnTranparency_" + $rootScope.multiViewCounter;
1300   - $scope.btnNormalModeID = "btnNormalMode_" + $rootScope.multiViewCounter;
1301   - $scope.btnExtractID = "btnExtract_" + $rootScope.multiViewCounter;
1302   - $scope.btnHighLightID = "btnHighLight_" + $rootScope.multiViewCounter;
1303   - $scope.genderChangeID = "genderChangeId_" + $rootScope.multiViewCounter;
1304   - $scope.structureDropdownID = "structureDropdown_" + $rootScope.multiViewCounter;
1305   - $scope.viewID = "daViewDA_" + $rootScope.multiViewCounter;
1306   - $scope.btnStrutureBoxID = "btnStrutureBox_" + $rootScope.multiViewCounter;
1307   - $scope.typedTermNameID = "typedTermName_" + $rootScope.multiViewCounter;
1308   - $scope.searchListDivID = "searchListDiv_" + $rootScope.multiViewCounter;
1309   - $scope.btnDATermSearchID = "btnDATermSearch_" + $rootScope.multiViewCounter;
1310   - $scope.navigatorBtnID = "navigatorBtn_" + $rootScope.multiViewCounter;
1311   - $scope.transparencyScaleID = "transparencyScale_" + $rootScope.multiViewCounter;
1312   - $scope.btnTBoxCloseID = "btnTBoxClose_" + $rootScope.multiViewCounter;
1313   - $scope.canvasDivID = "canvasDivDA_" + $rootScope.multiViewCounter;
1314   -
1315   - $scope.dropdownMenu3ID = "dropdownMenu3_" + $rootScope.multiViewCounter;
1316   - $scope.dropdownMenu2ID = "dropdownMenu2_" + $rootScope.multiViewCounter;
1317   - $scope.navigatorDivID = "navigatorDiv_" + $rootScope.multiViewCounter;
1318   - $scope.navDivID = "navDiv_" + $rootScope.multiViewCounter;
1319   - $scope.navimgID = "navimg_" + $rootScope.multiViewCounter;
1320   - $scope.draggableID = "draggable_" + $rootScope.multiViewCounter;
1321   -
1322   -
1323   - $scope.txtLayerNumberID = "txtLayerNumberDA_" + $rootScope.multiViewCounter;
1324   - $scope.layerChangeSliderID = "layerChangeSliderDA_" + $rootScope.multiViewCounter;
1325   - $scope.leftToolBarID = "leftToolBarDA_" + $rootScope.multiViewCounter;
1326   - // $scope.transparencyScaleID = "transparencyScaleDA_" + $rootScope.multiViewCounter;
1327   - $scope.canvasPaintID = "canvasPaintDA_" + $rootScope.multiViewCounter;
1328   - $scope.canvasID = "canvasDA_" + $rootScope.multiViewCounter;
1329   - $scope.zoomValueID = "zoomValueDA_" + $rootScope.multiViewCounter;
1330   - $scope.jsPanelID = 'daImagePanel_' + $rootScope.multiViewCounter
1331   - ////set default zoom value;
1332   -
1333   - if (!$scope.GetwindowStoreData(windowviewid,'isViewChange')) {
1334   - var viewDataFromMultiViewInfo = new jinqJs()
1335   - .from($rootScope.multiViewInfo)
1336   - .where('id == ' + $rootScope.multiViewCounter)
1337   - .select();
1338   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'voId',viewDataFromMultiViewInfo[0].bodyViewID);
1339   -
1340   - $scope.SetwindowStoreData(windowviewid,'viewOrientationId',$scope.GetwindowStoreData($rootScope.MULTI_VIEW_ID,'voId'));
1341   - $scope.setViewOrientationId($rootScope.MULTI_VIEW_ID);
1342   -
1343   - $scope.viewID = 'daViewDA' + '_' + $rootScope.multiViewCounter;
1344   -
1345   - // $scope.loadView();
1346   - }
1347   - }
1348   -
1349 1248 angular.element(document).ready(function (e) {
1350 1249  
1351 1250 var $ua = navigator.userAgent;
... ... @@ -1427,6 +1326,23 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1427 1326 $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
1428 1327 //$(document).on("click", " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
1429 1328  
  1329 + var panelid = $(event.target).parent().parent().parent().parent().attr('id');
  1330 +
  1331 + var len = (panelid).split("_").length;
  1332 + var windowviewid = (panelid).split("_")[len - 1];
  1333 +
  1334 + // remove old stored data after close panel
  1335 + for (var index = 0 ; index < $rootScope.DaWindowData.length; index++) {
  1336 +
  1337 + if ($rootScope.DaWindowData[index].multiwinid == windowviewid) {
  1338 +
  1339 + if (index != -1) {
  1340 + // remove module which one is loaded
  1341 + $scope.DaWindowData.splice(index, 1);
  1342 + }
  1343 + }
  1344 + }
  1345 +
1430 1346 $rootScope.selectedBodySystemName = 'All';
1431 1347 $rootScope.selectedBodySystemId = 0;
1432 1348 $rootScope.searchSelectedText = '';
... ... @@ -1472,21 +1388,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1472 1388 $scope.SetwindowStoreData(windowviewid, 'vocabTermDataArray', null);
1473 1389 var languageArray = $rootScope.lexiconLanguageArray;
1474 1390 console.log('loadSearchDataForBodyView');
1475   - var currentBodyViewId;
1476   - var currentViewID;
1477   - if ($rootScope.isOpenResourceBtnClicked) {
1478   - var viewDataFromMultiViewInfo = new jinqJs()
1479   - .from($rootScope.multiViewInfo)
1480   - .where('id == ' + $rootScope.multiViewCounter)
1481   - .select();
1482   -
1483   -
1484   - currentBodyViewId = viewDataFromMultiViewInfo[0].bodyViewID;
1485   - currentViewID = viewDataFromMultiViewInfo[0].id;
1486   -
1487   - }
1488   - else
1489   - currentBodyViewId = $scope.GetwindowStoreData(windowviewid,'voId');
  1391 +
  1392 + var currentBodyViewId = $scope.GetwindowStoreData(windowviewid, 'voId');
1490 1393  
1491 1394 for (var i = 0; i <= languageArray.length - 1; i++) {
1492 1395 var searchWorker = new Worker('search-wp.js');
... ... @@ -1511,55 +1414,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1511 1414  
1512 1415 console.log("$scope.BodyViewIDs" + e.data.bodyViewID);
1513 1416 $scope.vocabTempTermArray = [];
1514   - if ($rootScope.isOpenResourceBtnClicked) {
1515   - var vocabTermDataArray = $scope.GetwindowStoreData(windowviewid, 'vocabTermDataArray');
1516   - if (vocabTermDataArray.length == 0) {
1517   - $scope.vocabTempTermArray.push({ "viewID": e.data.bodyViewID, "currentBodyViewId": currentViewID, "language": e.data.language, "VocabTermData": e.data.VocabTermData, "vocabTermTxt": e.data.vocabTermTxt });
1518   - }
1519   - else {
1520   - var dataForCurrentView = new jinqJs()
1521   - .from($scope.vocabTempTermArray)
1522   - .where("viewID == " + e.data.bodyViewID)
1523   - .select();
1524   - if (dataForCurrentView != undefined && dataForCurrentView.length > 0) {
1525   - var dataForCurrentLang = new jinqJs()
1526   - .from(dataForCurrentView[0])
1527   - .where("language == " + e.data.language)
1528   - .select();
1529   -
1530   - if (dataForCurrentLang != undefined && dataForCurrentLang.length > 0) {
1531   -
1532   - }
1533   - else {
1534   - $scope.vocabTempTermArray.push({ "viewID": e.data.bodyViewID, "currentBodyViewId": currentViewID, "language": e.data.language, "VocabTermData": e.data.VocabTermData, "vocabTermTxt": e.data.vocabTermTxt });
1535   -
1536   - }
1537   - }
1538   - else {
1539   - $scope.vocabTempTermArray.push({ "viewID": e.data.bodyViewID, "currentBodyViewId": currentViewID, "language": e.data.language, "VocabTermData": e.data.VocabTermData, "vocabTermTxt": e.data.vocabTermTxt });
1540   -
1541   - }
1542   -
1543   - }
1544   - }
1545   - else {
1546   - $scope.vocabTempTermArray.push({ "language": e.data.language, "VocabTermData": e.data.VocabTermData, "vocabTermTxt": e.data.vocabTermTxt });
1547   - }
1548   -
1549   - if ($rootScope.isOpenResourceBtnClicked) {
  1417 +
  1418 + $scope.vocabTempTermArray.push({ "language": e.data.language, "VocabTermData": e.data.VocabTermData, "vocabTermTxt": e.data.vocabTermTxt });
1550 1419  
1551   - for (var i = 0; i <= $scope.vocabTempTermArray.length - 1; i++) {
1552   -
1553   - $scope.vocabTempTermArray[i].vocabTermTxt = new jinqJs()
1554   - .from($scope.vocabTempTermArray[i].vocabTermTxt)
1555   - .distinct('_TermText', '_ActualTermNumber')
1556   - .orderBy([{ field: '_TermText', sort: 'asc' }])
1557   - .select('_ActualTermNumber', '_TermText', '_cdId');
1558   -
1559   - }
1560   -
1561   - }
1562   - else {
1563 1420 for (var i = 0; i <= $rootScope.lexiconLanguageArray.length - 1; i++) {
1564 1421  
1565 1422 $scope.vocabTempTermArray[i].vocabTermTxt = new jinqJs()
... ... @@ -1567,9 +1424,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1567 1424 .distinct('_TermText', '_ActualTermNumber')
1568 1425 .orderBy([{ field: '_TermText', sort: 'asc' }])
1569 1426 .select('_ActualTermNumber', '_TermText', '_cdId');
1570   - }
1571   - }
1572   -
  1427 + }
1573 1428  
1574 1429 if ($scope.vocabTempTermArray.length == $rootScope.lexiconLanguageArray.length) {
1575 1430 $("#setting-spinner").css("display", "none");
... ... @@ -1693,11 +1548,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1693 1548  
1694 1549 if(ModestyValue=="Y")
1695 1550 {
1696   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'isModestyOn',true);
  1551 + $scope.SetwindowStoreData(windowviewid, 'isModestyOn', true);
1697 1552 }
1698 1553 else
1699 1554 {
1700   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'isModestyOn',false);
  1555 + $scope.SetwindowStoreData(windowviewid, 'isModestyOn', false);
1701 1556 }
1702 1557  
1703 1558 var navigatorManData = new jinqJs()
... ... @@ -2081,14 +1936,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2081 1936  
2082 1937 }
2083 1938  
2084   - if ($rootScope.isOpenResourceBtnClicked) {
2085   -
2086   - }
2087   - else {
2088 1939 $scope.ColoredImageSRC = [];
2089 1940 $scope.SetwindowStoreData(windowviewid,'ColoredImageSRC',[]);
2090   - }
2091   -
  1941 +
2092 1942 $scope.SetwindowStoreData(windowviewid,'updatedGrayDataList',[]);
2093 1943 $scope.SetwindowStoreData(windowviewid,'updatedGrayMRDataList',[]);
2094 1944  
... ... @@ -2328,21 +2178,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2328 2178 }
2329 2179  
2330 2180  
2331   - if ($rootScope.isOpenResourceBtnClicked) {
2332   - $('#draggable_' + $rootScope.MULTI_VIEW_ID).css('width', dragdivw);
2333   - $('#draggable_' + $rootScope.MULTI_VIEW_ID).css('height', dragdivh);
2334   - $('#draggable_' + $rootScope.MULTI_VIEW_ID).css("left", dragdivleft);
2335   - $('#draggable_' + $rootScope.MULTI_VIEW_ID).css("top", dragdivtop);
2336   - }
2337   - else {
2338   - $('#draggable_' +windowviewid).css('width', dragdivw);
2339   - $('#draggable_' + windowviewid).css('height', dragdivh);
2340   - $('#draggable_' + windowviewid).css("left", dragdivleft);
2341   - $('#draggable_' + windowviewid).css("top", dragdivtop);
2342   -
2343   - }
2344   -
2345   -
  2181 + $('#draggable_' + windowviewid).css('width', dragdivw);
  2182 + $('#draggable_' + windowviewid).css('height', dragdivh);
  2183 + $('#draggable_' + windowviewid).css("left", dragdivleft);
  2184 + $('#draggable_' + windowviewid).css("top", dragdivtop);
  2185 +
2346 2186 }
2347 2187  
2348 2188  
... ... @@ -2548,36 +2388,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2548 2388 FlipedImgCanvas.style.left = x + "px";
2549 2389 FlipedImgCanvas.style.top = y + "px";
2550 2390  
2551   -
2552   -
2553   - if (isMaskImage == 'Y') {
2554   - if ($rootScope.isOpenResourceBtnClicked) {
2555   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci' + "_" + windowviewid;
2556   - }
2557   - else {
2558   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci'+ "_" + windowviewid;
2559   -
2560   - }
2561   -
2562   - FlipedImgCanvas.style.visibility = 'hidden';
2563   -
  2391 + if (isMaskImage == 'Y') {
  2392 + FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci' + "_" + windowviewid;
  2393 + FlipedImgCanvas.style.visibility = 'hidden';
2564 2394 }
2565   - else {
2566   -
2567   - if ($rootScope.isOpenResourceBtnClicked) {
2568   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
2569   - }
2570   - else {
2571   - FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
2572   -
2573   - }
2574   -
  2395 + else
  2396 + {
  2397 + FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
  2398 +
2575 2399 if ($scope.GetwindowStoreData(windowviewid,'isExtract') == true) {
2576 2400 FlipedImgCanvas.style.visibility = 'visible'
2577 2401 }
2578   - else {
2579   -
2580   - }
  2402 +
2581 2403 }
2582 2404  
2583 2405  
... ... @@ -2847,23 +2669,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2847 2669  
2848 2670 if ($scope.ColoredImageSRC.length < totalCanvas) {
2849 2671  
2850   -
2851   - if ($rootScope.isOpenResourceBtnClicked) {
2852   -
2853   - $scope.ColoredImageSRC.push(
2854   - {
2855   - "viewID": $rootScope.multiViewCounter,
2856   - "bodyRegionId": bodyRegionId, "SRC": src,
2857   - "Height": h,
2858   - "Width": w,
2859   - "x": x,
2860   - "y": y,
2861   - "haveMirror": 'true'
2862   - }
2863   - );
2864   -
2865   - }
2866   - else {
2867 2672 $scope.ColoredImageSRC.push(
2868 2673 {
2869 2674 "bodyRegionId": bodyRegionId, "SRC": src,
... ... @@ -2872,23 +2677,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2872 2677 "x": x,
2873 2678 "y": y,
2874 2679 "haveMirror": 'true'
2875   - }
2876   -
2877   - );
2878   - }
  2680 + } );
2879 2681  
2880 2682 }
2881 2683  
2882 2684 var imageCanvas;
2883 2685  
2884   - if ($rootScope.multiViewCounter != undefined) {
2885 2686 imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid);
2886   - }
2887   - else {
2888   - imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid);
2889   - }
2890   -
2891   -
  2687 +
2892 2688 if (imageCanvas != null || imageCanvas != undefined) {
2893 2689 var width = imageCanvas.width;
2894 2690 var ht = imageCanvas.height;
... ... @@ -2933,18 +2729,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2933 2729 $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
2934 2730 $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
2935 2731 }
2936   -
2937   - if ($rootScope.isOpenResourceBtnClicked && $rootScope.isTermClicked == false) {
2938   - $scope.EnableUI();
2939   - if (($rootScope.multiViewInfoIndex + 1) < $rootScope.multiViewInfo.length) {
2940   - $scope.DisableUI();
2941   - $rootScope.intSearch = $rootScope.multiViewInfoIndex;
2942   - $rootScope.multiViewInfoIndex = $rootScope.multiViewInfoIndex + 1;
2943   - $scope.openBodyView();
2944   - }
2945   - }
2946   -
2947   - else {
  2732 +
2948 2733 $scope.DisableUI();
2949 2734 if ($scope.isSearchDataLoaded) {
2950 2735 $rootScope.isLoading = false;
... ... @@ -2984,8 +2769,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2984 2769 $scope.EnableUI();
2985 2770  
2986 2771 }
2987   - }
2988   -
2989 2772 }
2990 2773  
2991 2774 }
... ... @@ -2997,28 +2780,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2997 2780  
2998 2781 var maskImgData = context.getImageData(0, 0, w, h);
2999 2782 var MaskCanvasData = $scope.GetwindowStoreData(windowviewid,'MaskCanvasData');
3000   - if ($rootScope.isOpenResourceBtnClicked) {
3001 2783  
3002 2784 MaskCanvasData.push(
3003 2785 {
3004   - "viewID": $rootScope.multiViewCounter,
3005 2786 "bodyRegionId": bodyRegionId,
3006 2787 "canvasId": FlipedImgCanvas.id,
3007 2788 "maskData": maskImgData,
3008   - }
3009   - );
3010   -
3011   - }
3012   - else {
3013   - MaskCanvasData.push(
3014   - {
3015   - "bodyRegionId": bodyRegionId,
3016   - "canvasId": FlipedImgCanvas.id,
3017   - "maskData": maskImgData,
3018   - }
3019   - );
3020   - }
3021   -
  2789 + } );
  2790 +
3022 2791 }
3023 2792 };
3024 2793  
... ... @@ -3045,23 +2814,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3045 2814  
3046 2815 if (isMaskImage == 'Y') {
3047 2816 imgCanvas.style.visibility = 'hidden';
3048   - if ($rootScope.isOpenResourceBtnClicked) {
3049   - imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
3050   - }
3051   - else {
3052   - imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
3053   - }
3054   -
  2817 + imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
3055 2818 }
3056 2819 else {
3057   - if ($rootScope.isOpenResourceBtnClicked) {
3058 2820 imgCanvas.id = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
3059   - }
3060   - else {
3061   - imgCanvas.id = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
3062   - }
3063   -
3064   -
  2821 +
3065 2822 if (bodyRegionId == 3) {
3066 2823 //set z index of hip canavs to fix the issue caused by overlapping of arm canavs on hip canavs.
3067 2824 imgCanvas.style.zIndex = "100";
... ... @@ -3352,45 +3109,22 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3352 3109  
3353 3110 if ($scope.ColoredImageSRC.length < totalCanvas) {
3354 3111  
3355   - if ($rootScope.isOpenResourceBtnClicked) {
3356   -
3357 3112 $scope.ColoredImageSRC.push(
3358 3113 {
3359   - "viewID": $rootScope.multiViewCounter,
3360 3114 "bodyRegionId": bodyRegionId, "SRC": src,
3361 3115 "Height": h,
3362 3116 "Width": w,
3363 3117 "x": x,
3364 3118 "y": y,
3365 3119 "haveMirror": 'false'
3366   - }
3367   - );
3368   -
3369   - }
3370   - else {
3371   - $scope.ColoredImageSRC.push(
3372   - {
3373   - "bodyRegionId": bodyRegionId, "SRC": src,
3374   - "Height": h,
3375   - "Width": w,
3376   - "x": x,
3377   - "y": y,
3378   - "haveMirror": 'false'
3379   - }
3380   -
3381   - );
3382   - }
  3120 + } );
3383 3121  
3384 3122 }
3385 3123  
3386 3124 var imageCanvas;
3387   - if ($rootScope.multiViewCounter != undefined) {
3388   - imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + "_" + windowviewid);
3389   - }
3390   - else {
3391   - imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + "_" + windowviewid);
3392   - }
3393 3125  
  3126 + imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + "_" + windowviewid);
  3127 +
3394 3128 if (imageCanvas != null || imageCanvas != undefined) {
3395 3129 var width = imageCanvas.width;
3396 3130 var ht = imageCanvas.height;
... ... @@ -3434,16 +3168,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3434 3168 $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
3435 3169 $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
3436 3170 }
3437   -
3438   - if ($rootScope.isOpenResourceBtnClicked && $rootScope.isTermClicked == false) {
3439   - $scope.EnableUI();
3440   - if (($rootScope.multiViewInfoIndex + 1) < $rootScope.multiViewInfo.length) {
3441   - $scope.DisableUI();
3442   - $rootScope.multiViewInfoIndex = $rootScope.multiViewInfoIndex + 1;
3443   - $scope.openBodyView();
3444   - }
3445   - }
3446   - else {
  3171 +
3447 3172 $scope.DisableUI();
3448 3173 if ($scope.isSearchDataLoaded) {
3449 3174 $rootScope.isLoading = false;
... ... @@ -3489,7 +3214,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3489 3214 $('#spinner').css('visibility', 'hidden');
3490 3215 $scope.EnableUI();
3491 3216 }
3492   - }
  3217 +
3493 3218 }
3494 3219  
3495 3220 }
... ... @@ -3502,25 +3227,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3502 3227  
3503 3228 var maskImgData = context.getImageData(0, 0, w, h);
3504 3229 var MaskCanvasData = $scope.GetwindowStoreData(windowviewid,'MaskCanvasData');
3505   - if ($rootScope.isOpenResourceBtnClicked) {
3506   - MaskCanvasData.push(
3507   - {
3508   - "viewID": $rootScope.multiViewCounter,
3509   - "bodyRegionId": bodyRegionId,
3510   - "canvasId": imgCanvas.id,
3511   - "maskData": maskImgData,
3512   - }
3513   - );
3514   - }
3515   - else {
  3230 +
3516 3231 MaskCanvasData.push(
3517 3232 {
3518 3233 "bodyRegionId": bodyRegionId,
3519 3234 "canvasId": imgCanvas.id,
3520 3235 "maskData": maskImgData,
3521   - }
3522   - );
3523   - }
  3236 + } );
  3237 +
3524 3238 }
3525 3239  
3526 3240 };
... ... @@ -7805,15 +7519,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7805 7519 var len= (event.currentTarget.id).split("_").length;
7806 7520 var windowviewid = (event.currentTarget.id).split("_")[len-1];
7807 7521  
7808   - if ($rootScope.isOpenResourceBtnClicked) {
7809   -
7810   - var btnId = (event.currentTarget).id;
7811   - if (btnId.indexOf('_') != -1) {
7812   - $rootScope.multiViewCounter = (btnId).split("_")[1];
7813   - $scope.setScopeVariables();
7814   - }
7815   - }
7816   -
7817 7522 $("#OnIdentify").removeClass("annotationtoolbartab");
7818 7523 $("#DrawMode").removeClass("annotationtoolbartab");
7819 7524 $('.btnCursor').removeClass('activebtncolor');
... ... @@ -7856,21 +7561,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7856 7561 //1.
7857 7562  
7858 7563 $scope.flushCanvas(windowviewid);
7859   -
7860   - if ($rootScope.isOpenResourceBtnClicked) {
7861   - var zoomVal = $('#zoomValueDA_' + windowviewid).val();
7862   - if (zoomVal == 25) {
7863   - $scope.SetwindowStoreData(windowviewid,'zoomInOut',75);
7864   - $('#zoomValueDA_' + windowviewid).attr('value', $scope.GetwindowStoreData(windowviewid,'zoomInOut'));
7865   - }
7866   - else {
7867   - $scope.SetwindowStoreData(windowviewid,'zoomInOut',25);
7868   - $('#$zoomValueDA_' + windowviewid).attr('value', $scope.GetwindowStoreData(windowviewid,'zoomInOut'));
7869   -
7870   - }
7871   - }
7872   - else
7873   - {
  7564 +
7874 7565 var zoomVal = $('#zoomValueDA_' +windowviewid).val();
7875 7566 if (zoomVal == 25) {
7876 7567 $scope.SetwindowStoreData(windowviewid,'zoomInOut',75);
... ... @@ -7880,8 +7571,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7880 7571 $scope.SetwindowStoreData(windowviewid,'zoomInOut',25);
7881 7572 $('#zoomValueDA_' + windowviewid).attr('value', $scope.GetwindowStoreData(windowviewid,'zoomInOut'));
7882 7573 }
7883   - }
7884   -
  7574 +
7885 7575 var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId');
7886 7576 $scope.CalculateImageCordinates(viewOrientationId,windowviewid);
7887 7577  
... ... @@ -7939,16 +7629,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7939 7629 var id;
7940 7630 var maskId;
7941 7631  
7942   - if ($rootScope.isOpenResourceBtnClicked) {
7943   - id = 'imageCanvas' + i + "_" + windowviewid;
7944   - maskId = 'imageCanvas' + i + '_mci' + "_" + windowviewid;
7945   - }
7946   - else {
7947 7632 id = 'imageCanvas' + i + "_" + windowviewid;
7948 7633 maskId = 'imageCanvas' + i + '_mci'+"_"+ windowviewid;
7949   - }
7950   -
7951   -
  7634 +
7952 7635 var canvas = document.getElementById(id);
7953 7636 if (canvas != null || canvas != undefined)
7954 7637 document.getElementById('canvasDivDA_' + windowviewid).removeChild(canvas);
... ... @@ -7961,16 +7644,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7961 7644  
7962 7645 if (i == 4 || i == 5 || i == 6) {
7963 7646  
7964   - if ($rootScope.isOpenResourceBtnClicked) {
7965   - id = 'imageCanvas' + i + '_MR' + "_" + windowviewid;
7966   - maskId = 'imageCanvas' + i + '_MR_mci' + "_" + windowviewid;
7967   - }
7968   - else {
7969 7647 id = 'imageCanvas' + i + '_MR'+"_"+ windowviewid;
7970 7648 maskId = 'imageCanvas' + i + '_MR_mci'+"_"+ windowviewid;
7971   - }
7972   -
7973   -
  7649 +
7974 7650 var canvas = document.getElementById(id);
7975 7651 if (canvas != null || canvas != undefined)
7976 7652 document.getElementById('canvasDivDA_' + windowviewid).removeChild(canvas);
... ... @@ -8385,20 +8061,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8385 8061 console.log('ColoredImageSRC length before gray= ' + ColoredImageSRC.length)
8386 8062 var id;
8387 8063 if (value.haveMirror == 'true') {
8388   - if ($rootScope.multiViewCounter != undefined) {
8389   - id = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid;
8390   - }
8391   - else {
8392   - id = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid;
8393   - }
  8064 + id = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid;
  8065 +
8394 8066 }
8395 8067 else {
8396   - if ($rootScope.multiViewCounter != undefined) {
8397   - id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
8398   - }
8399   - else {
8400 8068 id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
8401   - }
8402 8069  
8403 8070 }
8404 8071  
... ... @@ -8653,20 +8320,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8653 8320 angular.forEach(ColoredImageSRC, function (value, key) {
8654 8321 var id;
8655 8322 if (value.haveMirror == 'true') {
8656   - if ($rootScope.multiViewCounter != undefined) {
8657   - id = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid;
8658   - }
8659   - else {
8660   - id = 'imageCanvas' + value.bodyRegionId + '_MR'+"_" + windowviewid;;
8661   - }
  8323 + id = 'imageCanvas' + value.bodyRegionId + '_MR'+"_" + windowviewid;
8662 8324 }
8663 8325 else {
8664   - if ($rootScope.multiViewCounter != undefined) {
8665   - id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
8666   - }
8667   - else {
8668 8326 id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
8669   - }
8670 8327 }
8671 8328  
8672 8329 var imageCanvas = document.getElementById(id);
... ... @@ -9238,12 +8895,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9238 8895 }
9239 8896 })
9240 8897  
9241   -
9242   - if ($rootScope.isOpenResourceBtnClicked && isSameViewClicked) {
9243   -
9244   - }
9245   - else
9246   - {
9247 8898 var previousHighlightList=$scope.GetwindowStoreData(windowviewid,'previousHighlightList');
9248 8899 if (previousHighlightList.length > 0) {
9249 8900  
... ... @@ -9252,13 +8903,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9252 8903  
9253 8904 $scope.DisableUI();
9254 8905 $scope.SetwindowStoreData(windowviewid,'isViewChange',true);
9255   - if ($rootScope.isOpenResourceBtnClicked) {
9256   -
9257   - var multiViewInfo = $rootScope.multiViewInfo;
9258   - //var windowviewid = event.target.parentElement.parentElement.id.split('_')[1];
9259   - $rootScope.multiViewCounter = windowviewid;
9260   - $scope.setScopeVariables();
9261   - }
  8906 +
9262 8907 var canvasDiv = document.getElementById("canvasDivDA_" + windowviewid);
9263 8908 $scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
9264 8909 $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft;
... ... @@ -9407,7 +9052,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9407 9052  
9408 9053 $rootScope.CloseAnnotationTool();
9409 9054 $('#typedTermName_' + windowviewid).val('');
9410   - }
9411 9055  
9412 9056 }
9413 9057  
... ... @@ -9472,11 +9116,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9472 9116  
9473 9117 if(ModestyValue=="Y")
9474 9118 {
9475   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'isModestyOn',true);
  9119 + $scope.SetwindowStoreData(windowviewid, 'isModestyOn', true);
9476 9120 }
9477 9121 else
9478 9122 {
9479   - $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'isModestyOn',false);
  9123 + $scope.SetwindowStoreData(windowviewid, 'isModestyOn', false);
9480 9124 }
9481 9125  
9482 9126 if (!$rootScope.isCallFromOtherModule) {
... ... @@ -9915,13 +9559,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9915 9559 $('#spinner').css('visibility', 'visible');
9916 9560 //1.
9917 9561  
9918   - if ($rootScope.isOpenResourceBtnClicked) {
9919   - $("#typedTermName_" + windowviewid).val(event.currentTarget.innerHTML);
9920   - }
9921   - else {
9922   - $("#typedTermName_" + windowviewid).val(event.currentTarget.innerHTML);
9923   - }
9924   -
  9562 + $("#typedTermName_" + windowviewid).val(event.currentTarget.innerHTML);
  9563 +
9925 9564 //2.
9926 9565 $scope.HighlightBodyOnListManagerSelection(event.currentTarget.id, false, windowviewid);
9927 9566  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -116,10 +116,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
116 116 var isfilloptionChecked = "";
117 117 var isOutlineOptionChecked = "";
118 118  
119   - $rootScope.isOpenResourceBtnClicked = false;
120   - $rootScope.multiViewInfo = [];
121 119 $rootScope.openResource = function () {
122   - // $rootScope.isOpenResourceBtnClicked = true;
123 120 // $rootScope.isTermClicked = false;
124 121 //switch ($location.url()) {
125 122 // case '/curriculum-builder-detail':
... ... @@ -206,23 +203,32 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
206 203 '</style>';
207 204  
208 205 $(header).append(css);
  206 + $(iframe).contents().on("mousedown, mouseup, click", function(){
  207 + alert("Click detected inside iframe.");
  208 + });
209 209 $timeout(function () {
210   - // var elmnt = iframe.contentWindow.document.getElementById("da-view-list");
  210 + var elmnt = iframe.contentWindow.document.getElementById("da-view-list");
211 211 // var location1 = iframe.contentWindow.document.location.href;
212 212  
213   - // $('#' + elmnt.id).trigger('click');
  213 + // $('#' + elmnt.id).trigger('click');
214 214 // $("#" + elmnt.id).css({ "display": "none", "pointer-events": "none", "opacity": ".5" });
215 215 // iframe.setAttribute("src", location + "/da-view-list");
216 216 //window.location.href = location;
217 217 // var currentlocation = iframe.contentWindow.document.location.href;
218 218 // iframe.contentWindow.document.locatiom.replace(currentlocation + "da-view-list");
219   - // document.getElementById("OpenModuleInCB").src = "http://stackoverflow.com";
220   - // location.replace("https://www.w3schools.com")
  219 + // document.getElementById("OpenModuleInCB").src = "http://stackoverflow.com";
  220 + // location.replace(elmnt.href);
  221 +
  222 + // URLUtils.href='/da-body-view';
  223 + // $location.url('/da-body-view');
  224 + // var hrf=iframe.contentWindow.location.href;
  225 + // iframe.contentWindow.location.href=hrf+'da-body-view';
  226 + // iframe.onload = null;
221 227  
222 228 // window.top.location.href = "http://www.example.com";
223   - var myframe = iframe;
  229 + // var myframe = iframe;
224 230  
225   - }, 1000);
  231 + }, 2000);
226 232  
227 233  
228 234 }
... ... @@ -1658,13 +1664,6 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
1658 1664 $('#ImagePanel').remove();
1659 1665  
1660 1666  
1661   -
1662   - if ($rootScope.isOpenResourceBtnClicked == true) {
1663   -
1664   - if ($('#daImagePanel_' + $rootScope.MULTI_VIEW_ID).length > 0)
1665   - $('#daImagePanel_' + $rootScope.MULTI_VIEW_ID).remove();
1666   - }
1667   -
1668 1667 $location.url('/' + slug);
1669 1668  
1670 1669 $rootScope.$broadcast('jsPanelCloseEvent', true);
... ...
400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
... ... @@ -291,6 +291,32 @@ AIA.service(&#39;ModuleService&#39;, function ($http, DataService) {
291 291 moduleDataObj.CAData = [];
292 292 moduleDataObj.ThreeDData = [];
293 293  
294   - }
  294 + },
  295 + ClearWinDataByModule: function (moduleName) {
  296 + if (moduleName == "ATLAS_ANATOMY")
  297 + {
  298 + moduleDataObj.AAData = [];
  299 + }
  300 + else if (moduleName == "DISSECTIBLE_ANATOMY")
  301 + {
  302 + moduleDataObj.DAData = [];
  303 + }
  304 + else if (moduleName == "CLINICAL_ILLUSTRATIONS")
  305 + {
  306 + moduleDataObj.CIData = [];
  307 + }
  308 + else if (moduleName == "CLINICAL_ANIMATIONS")
  309 + {
  310 + moduleDataObj.CAData = [];
  311 + }
  312 + else if (moduleName == "THREE_D_ANATOMY")
  313 + {
  314 + moduleDataObj.ThreeDData = [];
  315 + }
  316 +
  317 + },
  318 +
  319 +
  320 +
295 321 };
296 322 });
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-body-view.html
1 1 <div>
2 2 <div ng-include="aap/widget/MainMenu.html"></div>
3   - <div ng-init="openBodyViewMain()" id="daBodyview" class="daBodyView" ng-controller="DAController"></div>
  3 + <div ng-init="openDABodyViewMain()" id="daBodyview" class="daBodyView" ng-controller="DAController"></div>
4 4 <!--<div >
5 5  
6 6 </div>-->
... ...