diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
index 86a7570..56826e8 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
@@ -1057,7 +1057,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
var allwindowData = windowsInSelectedSlide.window;
var windowData;
var imageSourc;
- var windowId = 0;
+ var DawindowId = 0;
+ var AtlasWindowId = 0;
//check for multiple windows, if Array.isArray==true
if (allwindowData != undefined && Array.isArray(allwindowData)) {
@@ -1079,14 +1080,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
windowData = JSON.parse(allwindowData[i])
if (windowData.mType == "DISSECTIBLE_ANATOMY") {
- ModuleService.setModuleData(JSON.parse(allwindowData[i]), windowId);
-
+ ModuleService.setModuleData(JSON.parse(allwindowData[i]), DawindowId);
+ DawindowId = DawindowId + 1;
}
else if (windowData.mType == "ATLAS_ANATOMY") {
- ModuleService.setModuleData(JSON.parse(allwindowData[i]), windowId);
-
+ ModuleService.setModuleData(JSON.parse(allwindowData[i]), AtlasWindowId);
+ AtlasWindowId = AtlasWindowId + 1;
}
- windowId = windowId + 1;
+
}
}
}
@@ -1099,11 +1100,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
$scope.openImagePanel();
}
else if (windowData.mType == "DISSECTIBLE_ANATOMY") {
- ModuleService.setModuleData(JSON.parse(allwindowData), windowId);
+ ModuleService.setModuleData(JSON.parse(allwindowData), DawindowId);
}
else if (windowData.mType == "ATLAS_ANATOMY") {
- ModuleService.setModuleData(JSON.parse(allwindowData), windowId);
+ ModuleService.setModuleData(JSON.parse(allwindowData), AtlasWindowId);
}
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index e8aeced..1a0834c 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -8,7 +8,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// common field data
$rootScope.path = "~/../content/images/speeachBubbleClose.png";
$rootScope.modestyCanvasZindex = 12100;
- $scope.CurrentStructure = "active";
$scope.IsSearchVisible;
$scope.bodyViews = {
'Anterior': '1',
@@ -116,6 +115,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
'previousHighlightList':[],
'MaskCanvasData':[],
'isModestyOn':true,
+ 'ModestyValue':'Y',
'curentEthnicity':'W',
'modestyImageInfo':[],
'ColoredImageSRC':[],
@@ -208,6 +208,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
'previousHighlightList':[],
'MaskCanvasData':[],
'isModestyOn':true,
+ 'ModestyValue':'Y',
'curentEthnicity':'W',
'modestyImageInfo':[],
'ColoredImageSRC':[],
@@ -253,7 +254,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
}
}
-
+ $rootScope.GetDaWindowId=function()
+ {
+ // handle for single window
+ if($rootScope.DaWindowData.length>0)
+ {
+ for(var x=0 ;x < $rootScope.DaWindowData.length;x++){
+
+ return $rootScope.DaWindowData[x].multiwinid;
+ }
+ }
+ else return 0;
+ }
$scope.setGenderNameById = function (BodyViewId,windowviewid) {
if (BodyViewId == '1' | BodyViewId == '2' | BodyViewId == '3' | BodyViewId == '4' | BodyViewId == '9' | BodyViewId == '10') {
@@ -377,7 +389,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
userModestysettings = curentmodesty;
}
else {
- userModestysettings = $rootScope.globalSetting.modesty;
+ userModestysettings = $rootScope.globalSetting.modesty;
}
if(curentmodesty=="Y")
{
@@ -388,6 +400,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.SetwindowStoreData(windowviewid,'isModestyOn',false);
}
+ $scope.SetwindowStoreData(windowviewid,'ModestyValue',userModestysettings);
+
var thumbnailImage;
if ((value._id == 1) || (value._id == 3) || (value._id == 5) || (value._id == 6) || (value._id == 7) || (value._id == 11))
thumbnailImage = ((value._thumbnailImage).replace('.jpg', '_' + userEthnicity + userModestysettings)) + '.jpg';
@@ -597,51 +611,45 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.openBodyView = function (damoduledata) {
$scope.daOpenInOtherModules = damoduledata;
- if ($rootScope.isCallFromOtherModule != undefined) {
+ if ($rootScope.isCallFromOtherModule) {
$rootScope.MULTI_VIEW_ID += 1;
+ var windowviewid= $rootScope.MULTI_VIEW_ID;
- $scope.initializeWindowData($rootScope.MULTI_VIEW_ID,false,$scope.daOpenInOtherModules.currentWindowId);
+ $scope.initializeWindowData(windowviewid,false,$scope.daOpenInOtherModules.currentWindowId);
- }
-
- // alert($rootScope.MULTI_VIEW_ID);
-
- if ($rootScope.isCallFromOtherModule) {
//$scope.daOpenInOtherModules = ModuleService.getModuleData("DISSECTIBLE_ANATOMY");
if ($scope.daOpenInOtherModules != undefined) {
- $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'voId',$scope.daOpenInOtherModules.currentBodyViewId);
- $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'currentViewTitle',$scope.daOpenInOtherModules.windowTitle);
+ $scope.SetwindowStoreData(windowviewid,'voId',$scope.daOpenInOtherModules.currentBodyViewId);
+ $scope.SetwindowStoreData(windowviewid,'currentViewTitle',$scope.daOpenInOtherModules.windowTitle);
- $scope.jsPanelID = 'daImagePanel' + '_' + $rootScope.MULTI_VIEW_ID;
- $scope.viewID = 'daViewDA_' + $rootScope.MULTI_VIEW_ID;
+ $scope.jsPanelID = 'daImagePanel' + '_' + windowviewid;
+ $scope.viewID = 'daViewDA_' + windowviewid;
console.log('$location.url = ' + $location.url())
- // replace current modesty by CB jason
var skinValue=$scope.daOpenInOtherModules.skinId;
- localStorage.setItem("globalEthnicity",skinValue );
- $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'curentEthnicity',skinValue);
+ // localStorage.setItem("globalEthnicity",skinValue );
+ $scope.SetwindowStoreData(windowviewid,'curentEthnicity',skinValue);
- // replace current modesty by CB jason
var modestyValue=$scope.daOpenInOtherModules.isModestyOn;
- localStorage.setItem("globalModesty", modestyValue);
-
+ // localStorage.setItem("globalModesty", modestyValue);
+ $scope.SetwindowStoreData(windowviewid,'ModestyValue',modestyValue);
if(modestyValue=="Y")
{
- $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'isModestyOn',true);
+ $scope.SetwindowStoreData(windowviewid,'isModestyOn',true);
}
else
{
- $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'isModestyOn',false);
+ $scope.SetwindowStoreData(windowviewid,'isModestyOn',false);
}
- $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'zoomInOut',$scope.daOpenInOtherModules.zoom);
+ $scope.SetwindowStoreData(windowviewid,'zoomInOut',$scope.daOpenInOtherModules.zoom);
//// one layer down as compare to current running on production
- $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'layerNumber',$scope.daOpenInOtherModules.layerNumber-1);
+ $scope.SetwindowStoreData(windowviewid,'layerNumber',$scope.daOpenInOtherModules.layerNumber-1);
- $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'parentSlugName',($location.url()).replace('/', ''));
+ $scope.SetwindowStoreData(windowviewid,'parentSlugName',($location.url()).replace('/', ''));
//'clinical-illustrations'; //
if ( $scope.BodyViewData == null || $scope.BodyViewData == undefined) {
@@ -656,12 +664,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.BodyViewData = data;
- $scope.loadBodyView($rootScope.MULTI_VIEW_ID);
+ $scope.loadBodyView(windowviewid);
})
})
}
else {
- $scope.loadBodyView($rootScope.MULTI_VIEW_ID);
+ $scope.loadBodyView(windowviewid);
}
}
@@ -690,8 +698,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.jsPanelID = 'daImagePanel' + '_' + $rootScope.MULTI_VIEW_ID;
$scope.viewID = 'daViewDA' + '_' + $rootScope.MULTI_VIEW_ID;
$scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'parentSlugName','da-view-list');
- // $rootScope.DaWindowData.find(v => v.multiwinid == $rootScope.MULTI_VIEW_ID).parentSlugName = 'da-view-list';
-
+
$scope.loadBodyView($rootScope.MULTI_VIEW_ID);
}
@@ -709,16 +716,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//0. we will initially append container to load body
//check if localstorage has any settings
+ if (!$rootScope.isCallFromOtherModule) {
var curentEthnicity = $rootScope.getLocalStorageValue("globalEthnicity");
- if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) {
- $rootScope.globalSetting.ethnicity = curentEthnicity;
- $scope.SetwindowStoreData(windowviewid,'curentEthnicity',curentEthnicity);
- }
-
- var curentmodesty = $rootScope.getLocalStorageValue("globalModesty");
- if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
- $rootScope.globalSetting.modesty = curentmodesty
+ if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) {
+ $rootScope.globalSetting.ethnicity = curentEthnicity;
+ }
}
+ if (!$rootScope.isCallFromOtherModule) {
+ var curentmodesty = $rootScope.getLocalStorageValue("globalModesty");
+ if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
+ $rootScope.globalSetting.modesty = curentmodesty
+ }
+ }
+
//0.1
@@ -867,6 +877,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.setActiveview(windowviewid,viewtitlename);
+ $scope.removeBodySyetemSelectionClass(windowviewid,'Current Structure');
+
// console.log('html is compiled ' + document.getElementById('daView'))
if ($('#' + $scope.jsPanelID).offset().top == 0)
$('#' + $scope.jsPanelID).css("top", '70px');
@@ -967,8 +979,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
value: 0,
slide: function (event, ui) {
var targetid = event.target.id;
- var windviewid = targetid.split('_')[1];
-
+ var len= (targetid).split("_").length;
+ var windviewid = (targetid).split("_")[len-1];
+
var layerNum = $scope.GetwindowStoreData(windviewid,'totalLayers');
// var daViewScope = angular.element(document.getElementsByClassName("daBodyView")).scope();
@@ -979,7 +992,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
stop: function (event, ui) {
var targetid = event.target.id;
- var windviewid = targetid.split('_')[1];
+ var len= (targetid).split("_").length;
+ var windviewid = (targetid).split("_")[len-1];
+
var la;
var rootScope = angular.element(document.getElementById("bo")).scope();
rootScope.$apply(function () {
@@ -1027,7 +1042,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
stop: function (event, ui) {
//alert('trans changed')
var targetid = event.target.id;
- var windviewid = targetid.split('_')[1];
+ var len= (targetid).split("_").length;
+ var windviewid = (targetid).split("_")[len-1];
var scope = angular.element(document.getElementById("daViewDA_" + windviewid)).scope();
scope.$apply(function () {
scope.onTransparencyChange(event, ui);
@@ -1151,12 +1167,28 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$("#IdFemale").attr("id", "IdFemale_" + $rootScope.MULTI_VIEW_ID);
+ // bodyview id
$("#Anterior").attr("id", "Anterior_" + $rootScope.MULTI_VIEW_ID);
$("#Lateral").attr("id", "Lateral_" + $rootScope.MULTI_VIEW_ID);
$("#Medial").attr("id", "Medial_" + $rootScope.MULTI_VIEW_ID);
$("#Posterior").attr("id", "Posterior_" + $rootScope.MULTI_VIEW_ID);
$("#LateralArm").attr("id", "LateralArm_" + $rootScope.MULTI_VIEW_ID);
$("#MedialArm").attr("id", "MedialArm_" + $rootScope.MULTI_VIEW_ID);
+
+ // bodyview id
+ $("#CurrentStructure").attr("id", "CurrentStructure_" + $rootScope.MULTI_VIEW_ID);
+ $("#Cardiovascular").attr("id", "Cardiovascular_" + $rootScope.MULTI_VIEW_ID);
+ $("#Digestive").attr("id", "Digestive_" + $rootScope.MULTI_VIEW_ID);
+ $("#Endocrine").attr("id", "Endocrine_" + $rootScope.MULTI_VIEW_ID);
+ $("#Immune").attr("id", "Immune_" + $rootScope.MULTI_VIEW_ID);
+ $("#Integumentary").attr("id", "Integumentary_" + $rootScope.MULTI_VIEW_ID);
+ $("#Lymphatic").attr("id", "Lymphatic_" + $rootScope.MULTI_VIEW_ID);
+ $("#Muscular").attr("id", "Muscular_" + $rootScope.MULTI_VIEW_ID);
+ $("#Nervous").attr("id", "Nervous_" + $rootScope.MULTI_VIEW_ID);
+ $("#Reproductive").attr("id", "Reproductive_" + $rootScope.MULTI_VIEW_ID);
+ $("#Respiratory").attr("id", "Respiratory_" + $rootScope.MULTI_VIEW_ID);
+ $("#Skeletal").attr("id", "Skeletal_" + $rootScope.MULTI_VIEW_ID);
+ $("#Urinary").attr("id", "Urinary_" + $rootScope.MULTI_VIEW_ID);
var $all = $("#da-input_" + $rootScope.MULTI_VIEW_ID).prepend('')
$compile($all)($scope);
@@ -1295,8 +1327,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
});
}
- $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
- // $(document).on("click", " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
+ // $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
+ $(document).on("click", " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
$rootScope.selectedBodySystemName = 'All';
$rootScope.selectedBodySystemId = 0;
@@ -1310,7 +1342,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$("#" + $scope.jsPanelID).resize(function (event) {
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
var CanvasDivLeftPosition=$scope.GetwindowStoreData(windowviewid,'CanvasDivLeftPosition');
var CanvasDivTopPosition=$scope.GetwindowStoreData(windowviewid,'CanvasDivTopPosition');
$('#canvasDivDA_' + windowviewid).scrollLeft(CanvasDivLeftPosition);
@@ -1551,8 +1584,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
.success(function (data) {
$scope.SetwindowStoreData(windowviewid,'NavigatorData',data);
+ if (!$rootScope.isCallFromOtherModule) {
+ $scope.SetwindowStoreData(windowviewid,'curentEthnicity',$rootScope.globalSetting.ethnicity);
+
+ }
var skinTone=$scope.GetwindowStoreData(windowviewid,'curentEthnicity');
-
+
+ if (!$rootScope.isCallFromOtherModule) {
+ $scope.SetwindowStoreData(windowviewid,'ModestyValue',$rootScope.globalSetting.modesty);
+
+ }
+ var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue');
+
var navigatorManData = new jinqJs()
.from(data.Navigtor.ViewOrientation)
.where("_ViewOrientationId == " + currentBodyViewId)
@@ -1579,7 +1622,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if ((navigatorImage != null || navigatorImage != undefined) && (navigatorImage.length > 0)) {
angular.forEach(navigatorImage, function (value, key) {
- if (value._HaveModesty === $rootScope.globalSetting.modesty) {
+ if (value._HaveModesty === ModestyValue) {
navImageModesty = value._ImageName;
}
})
@@ -1776,12 +1819,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$('#layerChangeSliderDA_' + windowviewid).slider("option", "value", sliderVal);
- $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX);
- $('#canvasDivDA_' + windowviewid).scrollTop($scope.daOpenInOtherModules.canvasVScrollX);
-
- $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
- $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
-
$timeout(function () {
$('#sppeachBubble_'+windowviewid).css('display', 'none');
@@ -1857,7 +1894,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.BodyRegionCordinatesData = []; // create an empty array
$scope.SetwindowStoreData(windowviewid,'BodyRegionCordinatesData',[]);
$('#daBodyview').css('width', '100%');
- var canvasDIvHeight = parseInt($('#daImagePanel_' + windowviewid).outerHeight()) - 104;
+
+ if ($rootScope.isCallFromOtherModule) {
+ var canvasDIvHeight = parseInt($('#daImagePanel_' + windowviewid).outerHeight()) - 124;
+ }
+ else
+ {
+ var canvasDIvHeight = parseInt($('#daImagePanel_' + windowviewid).outerHeight()) - 104;
+ }
$('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight);
$('#leftToolBarDA_' + windowviewid).css('height', $('#daImagePanel_' + windowviewid).outerHeight())
@@ -2060,7 +2104,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var nlayer=$scope.GetwindowStoreData(windowviewid,'layerNumber');
if ((parseInt(dtlOfSktn[0]._lns) <= parseInt(nlayer)) && (parseInt(dtlOfSktn[0]._lne) > parseInt(nlayer)) && (dtlOfSktn[0]._isfr == 'Y')) {
$rootScope.isLayerLessSeven = true; // using at home
- if (($rootScope.globalSetting.modesty == 'Y')) {
+ var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue');
+ if ((ModestyValue == 'Y')) {
$('.modestyImg_'+windowviewid).css('visibility', 'visible');
}
@@ -2096,7 +2141,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//set scrollbars on canvas and hide loading label
$('#daLoaderLabel').css('visibility', 'hidden')
- $('#canvasDivDA_' + windowviewid).css('overflow', 'scroll')
+ $('#canvasDivDA_' + windowviewid).css('overflow', 'scroll');
+
if (isiOSSafari) {
$('#canvasDivDA_' + windowviewid).scrollLeft($('#canvasDivDA_' + windowviewid).width() + 150)
@@ -2105,7 +2151,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$('#canvasDivDA_' + windowviewid).scrollLeft($('#canvasDivDA_' + windowviewid).width() / 2)
}
- $('#canvasDivDA_' + windowviewid).scrollTop(50)
+ $('#canvasDivDA_' + windowviewid).scrollTop(50);
var sliderVal = parseInt($scope.GetwindowStoreData(windowviewid,'totalLayers')) - parseInt($scope.GetwindowStoreData(windowviewid,'layerNumber'));
@@ -2225,6 +2271,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.userInput = parseInt(lNumber);
+ if (!$rootScope.isCallFromOtherModule) {
+ $scope.SetwindowStoreData(windowviewid,'curentEthnicity',$rootScope.globalSetting.ethnicity);
+
+ }
var skinTone=$scope.GetwindowStoreData(windowviewid,'curentEthnicity');
@@ -2311,6 +2361,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var zoomValue=$scope.GetwindowStoreData(windowviewid,'zoomInOut');
//filter bodyRegion data basd on skintone
+ if (!$rootScope.isCallFromOtherModule) {
+ $scope.SetwindowStoreData(windowviewid,'curentEthnicity',$rootScope.globalSetting.ethnicity);
+
+ }
var skinTone=$scope.GetwindowStoreData(windowviewid,'curentEthnicity');
$scope.bagartDetailsOnSktn = new jinqJs()
.from($scope.bagartBodyRegionDetails)
@@ -2355,10 +2409,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if (isMaskImage == 'Y') {
if ($rootScope.isOpenResourceBtnClicked) {
- FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci' + '|' + windowviewid;
+ FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci' + "_" + windowviewid;
}
else {
- FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci'+ '|' + windowviewid;
+ FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci'+ "_" + windowviewid;
}
@@ -2368,10 +2422,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
else {
if ($rootScope.isOpenResourceBtnClicked) {
- FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + '|' + windowviewid;
+ FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
}
else {
- FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + '|' + windowviewid;
+ FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
}
@@ -2386,8 +2440,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
FlipedImgCanvas.addEventListener('click', function (evt) {
-
- var windowviewid = (evt.currentTarget.id).split("|")[1];
+ var len= (evt.currentTarget.id).split("_").length;
+ var windowviewid = (evt.currentTarget.id).split("_")[len-1];
var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
$scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
//to get correct data on multihighlight highlight
@@ -2409,10 +2463,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
- // clear CB term data on mouse click
- $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
- $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
-
//get mouse coordinate of mirror image click
var mousePos = $scope.getMousePos(evt.pageX,evt.pageY,windowviewid);
@@ -2485,7 +2535,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
for (var i = 0; i < $scope.machedIcolorInBodyRegion.length; i++) {
var bodyRegionId = $scope.machedIcolorInBodyRegion[i];
- var grayCanvasID = 'imageCanvas' + bodyRegionId + "|" + windowviewid;
+ var grayCanvasID = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
var grayCanvas = document.getElementById(grayCanvasID);
var grayCanvasContext = grayCanvas.getContext("2d");
@@ -2499,7 +2549,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId');
if (bodyVid == "1" || bodyVid == "4" || bodyVid == "5" || bodyVid == "8") {
if (bodyRegionId == 4 || bodyRegionId == 5 || bodyRegionId == 6) {
- var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "|" + windowviewid;
+ var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
var grayCanvasMR = document.getElementById(grayCanvasID);
var grayCanvasContextMR = grayCanvasMR.getContext("2d");
@@ -2688,10 +2738,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var imageCanvas;
if ($rootScope.multiViewCounter != undefined) {
- imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + '|' + windowviewid);
+ imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid);
}
else {
- imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + '|' + windowviewid);
+ imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid);
}
@@ -2728,8 +2778,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.SetwindowStoreData(windowviewid,'coloredImageCanvasList',$scope.coloredImageCanvasList);
$scope.SetwindowStoreData(windowviewid,'coloredImageMRCanvasList',$scope.coloredImageMRCanvasList);
// set color image data
- $scope.SetwindowStoreData(windowviewid,'ColoredImageSRC',$scope.ColoredImageSRC);
+ $scope.SetwindowStoreData(windowviewid, 'ColoredImageSRC', $scope.ColoredImageSRC);
+ // Scroll canvas based on CB data
+ var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
+ if (isHighlightBodyWithCBTermData == true) {
+ $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX);
+ $('#canvasDivDA_' + windowviewid).scrollTop($scope.daOpenInOtherModules.canvasVScrollX);
+
+ $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
+ $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
+ }
+
if ($rootScope.isOpenResourceBtnClicked && $rootScope.isTermClicked == false) {
$scope.EnableUI();
if (($rootScope.multiViewInfoIndex + 1) < $rootScope.multiViewInfo.length) {
@@ -2769,7 +2829,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.highLightBody(windowviewid);
}
else {
- var isHighlightBodyWithCBTermData=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData');
+ var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
if (isHighlightBodyWithCBTermData == true) {
$scope.ShowCBDataBodyView(windowviewid);
}
@@ -2842,19 +2902,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if (isMaskImage == 'Y') {
imgCanvas.style.visibility = 'hidden';
if ($rootScope.isOpenResourceBtnClicked) {
- imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + '|' + windowviewid;
+ imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
}
else {
- imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + '|' + windowviewid;
+ imgCanvas.id = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
}
}
else {
if ($rootScope.isOpenResourceBtnClicked) {
- imgCanvas.id = 'imageCanvas' + bodyRegionId + '|' + windowviewid;
+ imgCanvas.id = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
}
else {
- imgCanvas.id = 'imageCanvas' + bodyRegionId + '|' + windowviewid;
+ imgCanvas.id = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
}
@@ -2883,8 +2943,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
imgCanvas.addEventListener('click', function (evt) {
- var windowviewid = (evt.currentTarget.id).split("|")[1];
-
+ var len= (evt.currentTarget.id).split("_").length;
+ var windowviewid = (evt.currentTarget.id).split("_")[len-1];
var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
$scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
if ($scope.isLayerChange == true) {
@@ -2906,10 +2966,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
- // clear CB term data on mouse click
- $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
- $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
-
+
var annotationText;
var context = imgCanvas.getContext("2d");
@@ -2921,7 +2978,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
maskCanvasId = canvasId;
}
else {
- maskCanvasId = canvasId.split("|")[0] + '_mci' + "|" + windowviewid;
+ maskCanvasId = canvasId.split("_")[0] + '_mci' + "_" + windowviewid;
}
var maskCanvas = document.getElementById(maskCanvasId);
var maskCanvasContext = maskCanvas.getContext("2d");
@@ -2950,8 +3007,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//
else if (maskCanvasId.match('modestyImg') && RGBColor == '000000') {
- bodyRegionId = maskCanvasId.split("|")[0].slice(-1);
- maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + "|" + windowviewid;
+ bodyRegionId = maskCanvasId.split("_")[0].slice(-1);
+ maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
var maskCanvas = document.getElementById(maskCanvasId);
var maskCanvasContext = maskCanvas.getContext("2d");
@@ -2983,7 +3040,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
for (var i = 0; i < $scope.machedIcolorInBodyRegion.length; i++) {
var bodyRegionId = $scope.machedIcolorInBodyRegion[i];
- var grayCanvasID = 'imageCanvas' + bodyRegionId + "|" + windowviewid;
+ var grayCanvasID = 'imageCanvas' + bodyRegionId + "_" + windowviewid;
var grayCanvas = document.getElementById(grayCanvasID);
var grayImageDataList=$scope.GetwindowStoreData(windowviewid,'grayImageDataList');
var grayCanvasContext = grayCanvas.getContext("2d");
@@ -2995,7 +3052,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// for unhighlight the mirrored body region
if (bodyVid == "1" || bodyVid == "4" || bodyVid == "5" || bodyVid == "8") {
if (bodyRegionId == 4 || bodyRegionId == 5 || bodyRegionId == 6) {
- var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "|" + windowviewid;
+ var grayCanvasID = 'imageCanvas' + bodyRegionId + '_MR' + "_" + windowviewid;
var grayCanvasMR = document.getElementById(grayCanvasID);
var grayImageMRDataList=$scope.GetwindowStoreData(windowviewid,'grayImageMRDataList');
var grayCanvasContextMR = grayCanvasMR.getContext("2d");
@@ -3180,10 +3237,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var imageCanvas;
if ($rootScope.multiViewCounter != undefined) {
- imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '|' + windowviewid);
+ imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + "_" + windowviewid);
}
else {
- imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '|' + windowviewid);
+ imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + "_" + windowviewid);
}
if (imageCanvas != null || imageCanvas != undefined) {
@@ -3217,11 +3274,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if (isEligibleForHighlight == true) {
$scope.SetwindowStoreData(windowviewid,'coloredImageMRCanvasList',$scope.coloredImageMRCanvasList);
- $scope.SetwindowStoreData(windowviewid,'coloredImageCanvasList',$scope.coloredImageCanvasList);
-
+ $scope.SetwindowStoreData(windowviewid,'coloredImageCanvasList',$scope.coloredImageCanvasList);
// set color image data
- $scope.SetwindowStoreData(windowviewid,'ColoredImageSRC',$scope.ColoredImageSRC);
-
+ $scope.SetwindowStoreData(windowviewid, 'ColoredImageSRC', $scope.ColoredImageSRC);
+ // Scroll canvas based on CB data
+ var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
+ if (isHighlightBodyWithCBTermData == true) {
+ $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX);
+ $('#canvasDivDA_' + windowviewid).scrollTop($scope.daOpenInOtherModules.canvasVScrollX);
+
+ $scope.SetwindowStoreData(windowviewid, 'CanvasDivTopPosition', $("#canvasDivDA_" + windowviewid).scrollTop());
+ $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft());
+ }
+
if ($rootScope.isOpenResourceBtnClicked && $rootScope.isTermClicked == false) {
$scope.EnableUI();
if (($rootScope.multiViewInfoIndex + 1) < $rootScope.multiViewInfo.length) {
@@ -3267,7 +3332,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
else {
- var isHighlightBodyWithCBTermData=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData');
+ var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
if (isHighlightBodyWithCBTermData == true) {
$scope.ShowCBDataBodyView(windowviewid);
}
@@ -3326,12 +3391,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
/// $scope.TermList = $scope.getTermNumberList(actualterm);
// $scope.termCoordinate = $scope.getTermCoordinate(actualterm);
-
- $('#canvasDivDA_' + windowviewid).scrollLeft($scope.daOpenInOtherModules.canvasHScrollX);
- $('#canvasDivDA_' + windowviewid).scrollTop($scope.daOpenInOtherModules.canvasVScrollX);
-
- $scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',$("#canvasDivDA_" + windowviewid).scrollTop());
- $scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',$("#canvasDivDA_" + windowviewid).scrollLeft());
+
var CurriculumTermData=$scope.GetwindowStoreData(windowviewid,'CurriculumTermData');
for (var i = 0; i < CurriculumTermData.length; i++) {
$scope.MultiLanguageAnnationArray = [];
@@ -3348,8 +3408,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
}
+
+ $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false);
+ $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []);
+ $scope.SetwindowStoreData(windowviewid, 'AllTerms', []);
+ $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
// finish CB window load
- $rootScope.CBWindowLoadComplete=true;
+ $rootScope.CBWindowLoadComplete = true;
+
}
$scope.highLightBodyBasedOnIcolor = function (RGBColor,windowviewid) {
@@ -4013,7 +4079,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var whiteImageMRDataList=$scope.GetwindowStoreData(windowviewid,'whiteImageMRDataList');
for (var i = 0; i < grayImageDataList.length; i++) {
- var grayCanvasID = 'imageCanvas' + parseInt(i + 1) + "|" + windowviewid;
+ var grayCanvasID = 'imageCanvas' + parseInt(i + 1) + "_" + windowviewid;
var grayCanvas = document.getElementById(grayCanvasID);
if (grayCanvas != null) {
@@ -4030,7 +4096,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
}
for (var i = 4; i <= grayImageMRDataList.length; i++) {
- var grayCanvasMRID = 'imageCanvas' + i + '_MR' + "|" + windowviewid;
+ var grayCanvasMRID = 'imageCanvas' + i + '_MR' + "_" + windowviewid;
var grayCanvasMR = document.getElementById(grayCanvasMRID);
if (grayCanvasMR != null) {
@@ -4055,7 +4121,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if (TermExistInBodyRegionId != undefined) {
if (prevBRID != TermExistInBodyRegionId) {
- var grayCanvasID = 'imageCanvas' + TermExistInBodyRegionId + "|" + windowviewid;
+ var grayCanvasID = 'imageCanvas' + TermExistInBodyRegionId + "_" + windowviewid;
var grayCanvas = document.getElementById(grayCanvasID);
if (grayCanvas != null) {
@@ -4079,7 +4145,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var gData = grayCanvasContext.getImageData(0, 0, canvasWidth, canvasHeight);
//for mirror images
- var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "|" + windowviewid;
+ var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "_" + windowviewid;
var grayCanvasMR = document.getElementById(grayCanvasMRID);
var grayCanvasMRX;
var grayCanvasMRY;
@@ -4090,7 +4156,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if (TermExistInBodyRegionId == 4 || TermExistInBodyRegionId == 5 || TermExistInBodyRegionId == 6) {
- var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "|" + windowviewid;
+ var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "_" + windowviewid;
var grayCanvasMR = document.getElementById(grayCanvasMRID);
grayCanvasMRX = grayCanvasMR.style.left;
grayCanvasMRY = grayCanvasMR.style.top;
@@ -4103,7 +4169,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
FlipedImgCanvas.style.left = canvasX + "px";
FlipedImgCanvas.style.top = canvasY + "px";
FlipedImgCanvas.style.visibility = 'hidden';
- FlipedImgCanvas.id = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "|" + windowviewid;
+ FlipedImgCanvas.id = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "_" + windowviewid;
//remove previous canavs
$('#' + grayCanvasMRID).remove();
@@ -4149,7 +4215,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
})
//for non mirrored bpdy regions
- var grayCanvasID = 'imageCanvas' + TermExistInBodyRegionId + "|" + windowviewid;
+ var grayCanvasID = 'imageCanvas' + TermExistInBodyRegionId + "_" + windowviewid;
var grayCanvas = document.getElementById(grayCanvasID);
if (grayCanvas != null) {
@@ -4163,7 +4229,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//for mirror body regions
if (TermExistInBodyRegionId == 4 || TermExistInBodyRegionId == 5 || TermExistInBodyRegionId == 6) {
- var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "|" + windowviewid;
+ var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR' + "_" + windowviewid;
var grayCanvasMR = document.getElementById(grayCanvasMRID);
@@ -4431,15 +4497,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.isLayerChange = true;
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
-
- if ($rootScope.isCallFromOtherModule) {
- $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
- $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
- $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
- $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
- }
- //1.
-
+
var canvasDiv = document.getElementById("canvasDivDA_" + windowviewid);
$scope.imageVerticalScrollPosition = canvasDiv.scrollTop;
$scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft;
@@ -4758,7 +4816,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
$('.appendDragg').draggable({
drag: function (evt) {
- var windid = (evt.target.id).split("_")[1];
+ var len= (evt.target.id).split("_").length;
+ var windid = (evt.target.id).split("_")[len-1];
$(this).prev('div').css("display", "none");
var bor_id = $(this).next('div').attr('id');
var sub_id1 = $(this).attr('id');
@@ -4804,7 +4863,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$('#sppeachBubble_'+windowviewid).draggable(
{
drag: function (evt) {
- var windid = (evt.target.id).split("_")[1];
+ var len= (evt.target.id).split("_").length;
+ var windid = (evt.target.id).split("_")[len-1];
$('#dot_'+windid).css("visibility", "hidden");
var canvasDiv = document.getElementById('canvasDivDA_' + windid)
@@ -4814,7 +4874,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
},
});
$('#crossDiv_'+windowviewid).on('click', function (evt) {
- var windid = (evt.target.id).split("_")[1];
+ var len= (evt.target.id).split("_").length;
+ var windid = (evt.target.id).split("_")[len-1];
$('#sppeachBubble_'+windid).remove();
$('#bord_'+windowviewid).remove();
$('#dot_'+windid).remove();
@@ -4837,7 +4898,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.SetwindowStoreData(windowviewid,'speachBubbleArrayAnnotation',$scope.speechList1);
$('.appendDragg_annotation').draggable({
drag: function (evt) {
- var windid = (evt.target.id).split("_")[2];
+ var len= (evt.target.id).split("_").length;
+ var windid = (evt.target.id).split("_")[len-1];
$(this).prev('div').css("display", "none");
var bor_id_anno = $(this).next('div').attr('id');
var sub_id1_anno = $(this).attr('id');
@@ -4875,7 +4937,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$('#sppeachBubble_annotation_'+windowviewid).draggable(
{
drag: function (evt) {
- var windid = (evt.target.id).split("_")[2];
+ var len= (evt.target.id).split("_").length;
+ var windid = (evt.target.id).split("_")[len-1];
$('#dot_annotation_'+windid).remove();
var canvasDiv = document.getElementById('canvasDivDA_' + windid);
var verticalScrollPosition = canvasDiv.scrollTop;
@@ -4884,7 +4947,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
},
});
$('.crossDiv_annotation_'+windowviewid).on('click', function (evt) {
- var windid = (evt.target.className).split("_")[2];
+ var len= (evt.target.className).split("_").length;
+ var windid = (evt.target.className).split("_")[len-1];
$('#sppeachBubble_annotation_'+windid).remove();
$('#bord_annotation_'+windid).remove();
$('#dot_annotation_'+windid).remove();
@@ -5378,14 +5442,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.createTransparencyBox = function (windowviewid) {
$scope.SetwindowStoreData(windowviewid,'isTransparencyBtnClicked',true);
-
- if ($rootScope.isCallFromOtherModule) {
- $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
- $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
- $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
- $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
- }
-
+
//do not create TBOX if in extarct mode otherwise create
if ($scope.GetwindowStoreData(windowviewid,'isExtract') == false) {
@@ -5446,9 +5503,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
function mouseDownListener(e) {
-
- var windowviewid = (e.currentTarget.id).split("_")[1];
-
+ var len= (e.currentTarget.id).split("_").length;
+ var windowviewid = (e.currentTarget.id).split("_")[len-1];
+
e.preventDefault();
//to prevent screen scroll on ipad while drawing TB
e.preventDefault();
@@ -5519,7 +5576,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
function mouseMoveListener(e) {
- var windowviewid = (e.currentTarget.id).split("_")[1];
+ var len= (e.currentTarget.id).split("_").length;
+ var windowviewid = (e.currentTarget.id).split("_")[len-1];
e.preventDefault();
//to prevent screen scroll on ipad while drawing TB
e.preventDefault();
@@ -5550,7 +5608,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
function mouseUpListener(e) {
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (e.currentTarget.id).split("_").length;
+ var windowviewid = (e.currentTarget.id).split("_")[len-1];
e.preventDefault();
//to prevent screen scroll on ipad while drawing TB
@@ -6711,7 +6770,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.setSelectedBodyRegionData(windowviewid);
if ($rootScope.isMirrorBodyRegion == "No") {
- var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_mci" + "|" + windowviewid;
+ var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_mci" + "_" + windowviewid;
var maskCanvas = document.getElementById(maskCanvasId);
var maskCanvasContext = maskCanvas.getContext("2d");
@@ -6723,7 +6782,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
else {
- var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_MR_mci"+ "|" + windowviewid;
+ var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_MR_mci"+ "_" + windowviewid;
var maskoffsetval = $('#' + maskCanvasId).offset();
var mirrorCanvasX = maskoffsetval.left;
var mirrorImageCanvas = document.getElementById(maskCanvasId);
@@ -7037,7 +7096,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
function TransparencyCanvasClickListener(evt) {
- var windowviewid = (evt.currentTarget.id).split("_")[1];
+ var len= (evt.currentTarget.id).split("_").length;
+ var windowviewid = (evt.currentTarget.id).split("_")[len-1];
var pixelData;
var pixelDataTrans;
var mousePos = $scope.getMousePos(evt.pageX,evt.pageY,windowviewid);
@@ -7107,7 +7167,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var mirrorCanvasX = x;
var mirrorCanvasWidth = width;
- var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "|" + windowviewid;
+ var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "_" + windowviewid;
var clickedCanavs = document.getElementById(clickedCanvasMaskId);
var maskCanvasId = 'transparencyTempCanvasMask_' + clickedBodyRegion + '_mci' + "_" + windowviewid;
@@ -7177,7 +7237,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
else {
- var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "|" + windowviewid;
+ var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "_" + windowviewid;
var maskCanvas = document.getElementById(clickedCanvasMaskId);
var maskCanvasContext = maskCanvas.getContext("2d");
@@ -7209,8 +7269,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
function OnClickModestyTransCanvas(evt) {
-
- var windowviewid = (evt.currentTarget.id).split("_")[2];
+ var len= (evt.target.id).split("_").length;
+ var windowviewid = (evt.target.id).split("_")[len-1];
var tCanvasLeft = $(".ui-wrapper").css("left");
var tCanvasLeftAftrSplit = tCanvasLeft.split("p");
@@ -7258,7 +7318,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var bodyRegionId = canvasId.split("_")[1].slice(-1);
- var maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + '|' + windowviewid;
+ var maskCanvasId = 'imageCanvas' + bodyRegionId + '_mci' + "_" + windowviewid;
var maskCanvas = document.getElementById(maskCanvasId);
var maskCanvasContext = maskCanvas.getContext("2d");
@@ -7302,8 +7362,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
function getAnnotationAndCraeteSpeechBubble(mirrorCanvasX, mirrorCanvasWidth, mousePos, maskCanvasContexttrans, clickedBodyRegion, x, y, evt) {
- var windowviewid = (evt.target.id).split("_")[1];
-
+ var len= (evt.target.id).split("_").length;
+ var windowviewid = (evt.target.id).split("_")[len-1];
+
var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid);
var verticalScrollPosition = canvasDiv.scrollTop;
var horizontlScrollPosition = canvasDiv.scrollLeft;
@@ -7315,7 +7376,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var actulalX = mirrorXOnNormalImage
var actualY = mousePos.y + verticalScrollPosition
- var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + '|' + windowviewid;
+ var clickedCanvasMaskId = 'imageCanvas' + clickedBodyRegion + '_mci' + "_" + windowviewid;
var maskCanvas = document.getElementById(clickedCanvasMaskId);
var maskCanvasContext = maskCanvas.getContext("2d");
var imgX = Math.round(actulalX - parseInt((x).replace('px', '')));
@@ -7448,8 +7509,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.onTransparencyChange = function (ev, ui) {
- var targetid = ev.target.id;
- var windowviewid = targetid.split('_')[1];
+ var len= (ev.target.id).split("_").length;
+ var windowviewid = (ev.target.id).split("_")[len-1];
$scope.SetwindowStoreData(windowviewid,'transNumber',ui.value);
@@ -7716,7 +7777,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.enableZoom = function (event) {
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
if ($rootScope.isOpenResourceBtnClicked) {
@@ -7726,12 +7788,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.setScopeVariables();
}
}
- if ($rootScope.isCallFromOtherModule) {
- $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
- $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
- $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
- $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
- }
$("#OnIdentify").removeClass("annotationtoolbartab");
$("#DrawMode").removeClass("annotationtoolbartab");
@@ -7863,12 +7919,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var maskId;
if ($rootScope.isOpenResourceBtnClicked) {
- id = 'imageCanvas' + i + '|' + windowviewid;
- maskId = 'imageCanvas' + i + '_mci' + '|' + windowviewid;
+ id = 'imageCanvas' + i + "_" + windowviewid;
+ maskId = 'imageCanvas' + i + '_mci' + "_" + windowviewid;
}
else {
- id = 'imageCanvas' + i + '|' + windowviewid;
- maskId = 'imageCanvas' + i + '_mci'+'|'+ windowviewid;
+ id = 'imageCanvas' + i + "_" + windowviewid;
+ maskId = 'imageCanvas' + i + '_mci'+"_"+ windowviewid;
}
@@ -7885,12 +7941,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if (i == 4 || i == 5 || i == 6) {
if ($rootScope.isOpenResourceBtnClicked) {
- id = 'imageCanvas' + i + '_MR' + '|' + windowviewid;
- maskId = 'imageCanvas' + i + '_MR_mci' + '|' + windowviewid;
+ id = 'imageCanvas' + i + '_MR' + "_" + windowviewid;
+ maskId = 'imageCanvas' + i + '_MR_mci' + "_" + windowviewid;
}
else {
- id = 'imageCanvas' + i + '_MR'+'|'+ windowviewid;
- maskId = 'imageCanvas' + i + '_MR_mci'+'|'+ windowviewid;
+ id = 'imageCanvas' + i + '_MR'+"_"+ windowviewid;
+ maskId = 'imageCanvas' + i + '_MR_mci'+"_"+ windowviewid;
}
@@ -7908,8 +7964,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) {
for (var j = 0; j < modestyCanvases.length; j++) {
- var len= (modestyCanvases[j].id).split("|").length;
- var winid = (modestyCanvases[j].id).split("|")[len-1];
+ var len= (modestyCanvases[j].id).split("_").length;
+ var winid = (modestyCanvases[j].id).split("_")[len-1];
if(winid==windowviewid)
{
modestyCanvases[j].parentNode.removeChild(modestyCanvases[j]);
@@ -7941,13 +7997,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
else {
- if ($rootScope.isCallFromOtherModule) {
- $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
- $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
- $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
- $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
- }
-
+
$scope.SetwindowStoreData(windowviewid,'isHighLight',true);
$scope.SetwindowStoreData(windowviewid,'isNormalMode',false);
$scope.SetwindowStoreData(windowviewid,'isZoomed',false);
@@ -8035,13 +8085,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if ($scope.GetwindowStoreData(windowviewid,'isNormalMode') == true) {
}
- else {
- if ($rootScope.isCallFromOtherModule) {
- $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
- $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
- $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
- $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
- }
+ else {
//1.
$scope.flushCanvas(windowviewid);
@@ -8098,8 +8142,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//// #7972 Mozilla Firefox> Incorrect navigation
$("#canvasDiv").scroll(function (event) {
- var windowviewid = (event.currentTarget.id).split("_")[1];
-
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
+
$scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',$('#canvasDivDA_' + windowviewid).scrollLeft());
$scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',$('#canvasDivDA_' + windowviewid).scrollTop());
@@ -8110,14 +8155,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.DisableUI();
console.log('isCalledFromButton= ' + isCalledFromButton);
-
- if ($rootScope.isCallFromOtherModule) {
- $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
- $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
- $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
- $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
- }
-
+
$scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',$('#canvasDivDA_' + windowviewid).scrollLeft());
$scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',$('#canvasDivDA_' + windowviewid).scrollTop());
@@ -8215,8 +8253,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.enableShowHideStructureBox = function (event) {
//if listanager is visisble then close it
- var windowviewid = (event.currentTarget.id).split("_")[1];
-
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
+
$scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false);
$rootScope.CloseListManager();
var btnStrutureBoxname = document.getElementById("btnStrutureBox_" + windowviewid).name;
@@ -8308,18 +8347,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var id;
if (value.haveMirror == 'true') {
if ($rootScope.multiViewCounter != undefined) {
- id = 'imageCanvas' + value.bodyRegionId + '_MR' + '|' + windowviewid;
+ id = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid;
}
else {
- id = 'imageCanvas' + value.bodyRegionId + '_MR' + '|' + windowviewid;
+ id = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid;
}
}
else {
if ($rootScope.multiViewCounter != undefined) {
- id = 'imageCanvas' + value.bodyRegionId + '|' + windowviewid;
+ id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
}
else {
- id = 'imageCanvas' + value.bodyRegionId + '|' + windowviewid;
+ id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
}
}
@@ -8496,7 +8535,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if (AllTerms != undefined && AllTerms.length > 0) {
$scope.HighlightBodyByTermList(AllTerms,windowviewid);
}
- else {
+ else
+ {
+ // If CB window data has no terms
+ var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData');
+ if (isHighlightBodyWithCBTermData == true) {
+ $scope.SetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData', false);
+ $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []);
+ $scope.SetwindowStoreData(windowviewid, 'AllTerms', []);
+ $scope.SetwindowStoreData(windowviewid, 'CurriculumTermData', []);
+ // finish CB window load
+ $rootScope.CBWindowLoadComplete = true;
+ }
+
$scope.EnableUI();
}
}, 500);
@@ -8564,18 +8615,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var id;
if (value.haveMirror == 'true') {
if ($rootScope.multiViewCounter != undefined) {
- id = 'imageCanvas' + value.bodyRegionId + '_MR' + '|' + windowviewid;
+ id = 'imageCanvas' + value.bodyRegionId + '_MR' + "_" + windowviewid;
}
else {
- id = 'imageCanvas' + value.bodyRegionId + '_MR'+'|' + windowviewid;;
+ id = 'imageCanvas' + value.bodyRegionId + '_MR'+"_" + windowviewid;;
}
}
else {
if ($rootScope.multiViewCounter != undefined) {
- id = 'imageCanvas' + value.bodyRegionId + '|' + windowviewid;
+ id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
}
else {
- id = 'imageCanvas' + value.bodyRegionId + '|' + windowviewid;
+ id = 'imageCanvas' + value.bodyRegionId + "_" + windowviewid;
}
}
@@ -8826,8 +8877,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.OnGenderChange = function (event) {
- var windowviewid = (event.target.parentElement.parentElement.id).split("_")[1];
-
+ var len= (event.target.parentElement.parentElement.id).split("_").length;
+ var windowviewid = (event.target.parentElement.parentElement.id).split("_")[len-1];
+
var genderId = $scope.GetwindowStoreData(windowviewid,'genderId');
if (genderId == event.currentTarget.title) {
return;
@@ -8888,14 +8940,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$("#btnHighLight_" + windowviewid).addClass("btn-primary");
}
-
- if ($rootScope.isCallFromOtherModule) {
- $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
- $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
- $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
- $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
- }
-
+
var currentBodyViewId = $scope.correspondingBodyViewIds[$scope.GetwindowStoreData(windowviewid,'voId')];
@@ -9095,8 +9140,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
$scope.OnViewChange = function (event) {
-
- var windowviewid = (event.target.parentElement.parentElement.id).split('_')[1];
+ var len= (event.target.parentElement.parentElement.id).split("_").length;
+ var windowviewid = (event.target.parentElement.parentElement.id).split("_")[len-1];
var viewid = $scope.GetwindowStoreData(windowviewid,'voId')
var selectedViewId = $scope.bodyViews[event.currentTarget.title];
@@ -9130,7 +9175,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if ($rootScope.isOpenResourceBtnClicked) {
var multiViewInfo = $rootScope.multiViewInfo;
- var windowviewid = event.target.parentElement.parentElement.id.split('_')[1];
+ //var windowviewid = event.target.parentElement.parentElement.id.split('_')[1];
$rootScope.multiViewCounter = windowviewid;
$scope.setScopeVariables();
}
@@ -9191,15 +9236,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
if (canDivChildCount > 0) {
canDiv.innerHTML = '';
}
-
- if ($rootScope.isCallFromOtherModule) {
- $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
- $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
- $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
- $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
-
- }
-
+
$scope.SetwindowStoreData(windowviewid,'viewOrientationId',selectedViewId);
var genderId = $scope.GetwindowStoreData(windowviewid,'genderId');
@@ -9339,7 +9376,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.loadNavigatorForSelectedBodyView = function (currentBodyViewId, windowviewid) {
var NavigatorData=$scope.GetwindowStoreData(windowviewid,'NavigatorData');
- $scope.SetwindowStoreData(windowviewid,'curentEthnicity',$rootScope.globalSetting.ethnicity);
+
+ if (!$rootScope.isCallFromOtherModule) {
+ $scope.SetwindowStoreData(windowviewid,'ModestyValue',$rootScope.globalSetting.modesty);
+
+ }
+ var ModestyValue=$scope.GetwindowStoreData(windowviewid,'ModestyValue');
+
+ if (!$rootScope.isCallFromOtherModule) {
+ $scope.SetwindowStoreData(windowviewid,'curentEthnicity',$rootScope.globalSetting.ethnicity);
+
+ }
+ var skinTone=$scope.GetwindowStoreData(windowviewid,'curentEthnicity');
+
if (NavigatorData != null || NavigatorData != undefined) {
var navdtlOrient = new jinqJs()
.from(NavigatorData.Navigtor.ViewOrientation)
@@ -9351,7 +9400,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var navOrientationdata = new jinqJs()
.from(navdtlOrient[0].ImageInfo)
- .where("_Ethnicity == " + $rootScope.globalSetting.ethnicity)
+ .where("_Ethnicity == " + skinTone)
.select();
if (navOrientationdata != null || navOrientationdata != undefined) {
@@ -9362,7 +9411,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var navImageModesty;
angular.forEach(navigatorImage, function (value, key) {
- if (value._HaveModesty === $rootScope.globalSetting.modesty) {
+ if (value._HaveModesty === ModestyValue) {
navImageModesty = value._ImageName;
}
})
@@ -9373,7 +9422,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId');
- document.getElementById("navimg_" + windowviewid).src = '~/../content/images/DA/ethnicity/body-views/' + bodyVid + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty;
+ document.getElementById("navimg_" + windowviewid).src = '~/../content/images/DA/ethnicity/body-views/' + bodyVid + '/' + skinTone + '/navigator_images/' + navImageModesty;
}
}
@@ -9434,19 +9483,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.HighlightBodyByBodySystem = function (event) {
- var windowviewid = (event.target.parentElement.parentElement.id).split("_")[1];
+ var len= (event.target.parentElement.parentElement.id).split("_").length;
+ var windowviewid = (event.target.parentElement.parentElement.id).split("_")[len-1];
+
var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId');
$scope.SetwindowStoreData(windowviewid,'isExtract',false);
$("#structureDropdownDA_" + windowviewid).toggle();
$scope.DisableUI();
-
- if ($rootScope.isCallFromOtherModule) {
- $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
- $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
- $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
- $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
- }
-
+
$scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false);
$rootScope.CloseListManager();
@@ -9522,7 +9566,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var viewtarget_highlightbody = angular.element(event.currentTarget);
var title_highlightbody = viewtarget_highlightbody.attr('title');
- $scope.removeBodySyetemSelectionClass(title_highlightbody);
+ $scope.removeBodySyetemSelectionClass(windowviewid,title_highlightbody);
//Highlight button should be active
$("#btnHighLight_" + windowviewid).addClass("btn-primary");
@@ -9549,7 +9593,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.removeCurrentHighlightedBodySystem = function (windowviewid) {
var grayImageDataList=$scope.GetwindowStoreData(windowviewid,'grayImageDataList');
for (var i = 0; i < grayImageDataList.length; i++) {
- var grayCanvasID = 'imageCanvas' + parseInt(i + 1) + "|" + windowviewid;
+ var grayCanvasID = 'imageCanvas' + parseInt(i + 1) + "_" + windowviewid;
var grayCanvas = document.getElementById(grayCanvasID);
if (grayCanvas != null) {
@@ -9563,220 +9607,63 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
}
- $scope.removeBodySyetemSelectionClass = function (title_highlightbody) {
- if (title_highlightbody == "CurrentStructure") {
- $scope.CurrentStructure = "active";
- $scope.Cardiovascular = "";
- $scope.Digestive = "";
- $scope.Endocrine = "";
- $scope.Immune = "";
- $scope.Integumentary = "";
- $scope.Lymphatic = "";
- $scope.Muscular = "";
- $scope.Nervous = "";
- $scope.Reproductive = "";
- $scope.Respiratory = "";
- $scope.Skeletal = "";
- $scope.Urinary = "";
+ $scope.removeBodySyetemSelectionClass = function (windowviewid,title_highlightbody) {
+
+ $('#CurrentStructure_'+windowviewid).removeClass("active");
+ $('#Cardiovascular_'+windowviewid).removeClass("active");
+ $('#Digestive_'+windowviewid).removeClass("active");
+ $('#Endocrine_'+windowviewid).removeClass("active");
+ $('#Immune_'+windowviewid).removeClass("active");
+ $('#Integumentary_'+windowviewid).removeClass("active");
+ $('#Lymphatic_'+windowviewid).removeClass("active");
+ $('#Muscular_'+windowviewid).removeClass("active");
+ $('#Nervous_'+windowviewid).removeClass("active");
+ $('#Reproductive_'+windowviewid).removeClass("active");
+ $('#Respiratory_'+windowviewid).removeClass("active");
+ $('#Skeletal_'+windowviewid).removeClass("active");
+ $('#Urinary_'+windowviewid).removeClass("active");
+
+ if (title_highlightbody == "Current Structure") {
+ $('#CurrentStructure_'+windowviewid).addClass("active");
}
else if (title_highlightbody == "Cardiovascular") {
- $scope.CurrentStructure = "";
- $scope.Cardiovascular = "active";
- $scope.Digestive = "";
- $scope.Endocrine = "";
- $scope.Immune = "";
- $scope.Integumentary = "";
- $scope.Lymphatic = "";
- $scope.Muscular = "";
- $scope.Nervous = "";
- $scope.Reproductive = "";
- $scope.Respiratory = "";
- $scope.Skeletal = "";
- $scope.Urinary = "";
+ $('#Cardiovascular_'+windowviewid).addClass("active");
}
else if (title_highlightbody == "Digestive") {
- $scope.CurrentStructure = "";
- $scope.Cardiovascular = "";
- $scope.Digestive = "active";
- $scope.Endocrine = "";
- $scope.Immune = "";
- $scope.Integumentary = "";
- $scope.Lymphatic = "";
- $scope.Muscular = "";
- $scope.Nervous = "";
- $scope.Reproductive = "";
- $scope.Respiratory = "";
- $scope.Skeletal = "";
- $scope.Urinary = "";
+ $('#Digestive_'+windowviewid).addClass("active");
}
else if (title_highlightbody == "Endocrine") {
- $scope.CurrentStructure = "";
- $scope.Cardiovascular = "";
- $scope.Digestive = "";
- $scope.Endocrine = "active";
- $scope.Immune = "";
- $scope.Integumentary = "";
- $scope.Lymphatic = "";
- $scope.Muscular = "";
- $scope.Nervous = "";
- $scope.Reproductive = "";
- $scope.Respiratory = "";
- $scope.Skeletal = "";
- $scope.Urinary = "";
+ $('#Endocrine_'+windowviewid).addClass("active");
}
else if (title_highlightbody == "Immune") {
-
- $scope.CurrentStructure = "";
- $scope.Cardiovascular = "";
- $scope.Digestive = "";
- $scope.Endocrine = "";
- $scope.Immune = "active";
- $scope.Integumentary = "";
- $scope.Lymphatic = "";
- $scope.Muscular = "";
- $scope.Nervous = "";
- $scope.Reproductive = "";
- $scope.Respiratory = "";
- $scope.Skeletal = "";
- $scope.Urinary = "";
+ $('#Immune_'+windowviewid).addClass("active");
}
else if (title_highlightbody == "Integumentary") {
- $scope.CurrentStructure = "";
- $scope.Cardiovascular = "";
- $scope.Digestive = "";
- $scope.Endocrine = "";
- $scope.Immune = "";
- $scope.Integumentary = "active";
- $scope.Lymphatic = "";
- $scope.Muscular = "";
- $scope.Nervous = "";
- $scope.Reproductive = "";
- $scope.Respiratory = "";
- $scope.Skeletal = "";
- $scope.Urinary = "";
+ $('#Integumentary_'+windowviewid).addClass("active");
}
else if (title_highlightbody == "Lymphatic") {
- $scope.CurrentStructure = "";
- $scope.Cardiovascular = "";
- $scope.Digestive = "";
- $scope.Endocrine = "";
- $scope.Immune = "";
- $scope.Integumentary = "";
- $scope.Lymphatic = "active";
- $scope.Muscular = "";
- $scope.Nervous = "";
- $scope.Reproductive = "";
- $scope.Respiratory = "";
- $scope.Skeletal = "";
- $scope.Urinary = "";
+ $('#Lymphatic_'+windowviewid).addClass("active");
}
else if (title_highlightbody == "Muscular") {
- $scope.CurrentStructure = "";
- $scope.Cardiovascular = "";
- $scope.Digestive = "";
- $scope.Endocrine = "";
- $scope.Immune = "";
- $scope.Integumentary = "";
- $scope.Lymphatic = "";
- $scope.Muscular = "active";
- $scope.Nervous = "";
- $scope.Reproductive = "";
- $scope.Respiratory = "";
- $scope.Skeletal = "";
- $scope.Urinary = "";
+ $('#Muscular_'+windowviewid).addClass("active");
}
else if (title_highlightbody == "Nervous") {
- $scope.CurrentStructure = "";
- $scope.Cardiovascular = "";
- $scope.Digestive = "";
- $scope.Endocrine = "";
- $scope.Immune = "";
- $scope.Integumentary = "";
- $scope.Lymphatic = "";
- $scope.Muscular = "";
- $scope.Nervous = "active";
- $scope.Reproductive = "";
- $scope.Respiratory = "";
- $scope.Skeletal = "";
- $scope.Urinary = "";
+ $('#Nervous_'+windowviewid).addClass("active");
}
else if (title_highlightbody == "Reproductive") {
- $scope.CurrentStructure = "";
- $scope.Cardiovascular = "";
- $scope.Digestive = "";
- $scope.Endocrine = "";
- $scope.Immune = "";
- $scope.Integumentary = "";
- $scope.Lymphatic = "";
- $scope.Muscular = "";
- $scope.Nervous = "";
- $scope.Reproductive = "active";
- $scope.Respiratory = "";
- $scope.Skeletal = "";
- $scope.Urinary = "";
+ $('#Reproductive_'+windowviewid).addClass("active");
}
else if (title_highlightbody == "Respiratory") {
- $scope.CurrentStructure = "";
- $scope.Cardiovascular = "";
- $scope.Digestive = "";
- $scope.Endocrine = "";
- $scope.Immune = "";
- $scope.Integumentary = "";
- $scope.Lymphatic = "";
- $scope.Muscular = "";
- $scope.Nervous = "";
- $scope.Reproductive = "";
- $scope.Respiratory = "active";
- $scope.Skeletal = "";
- $scope.Urinary = "";
+ $('#Respiratory_'+windowviewid).addClass("active");
}
else if (title_highlightbody == "Skeletal") {
- $scope.CurrentStructure = "";
- $scope.Cardiovascular = "";
- $scope.Digestive = "";
- $scope.Endocrine = "";
- $scope.Immune = "";
- $scope.Integumentary = "";
- $scope.Lymphatic = "";
- $scope.Muscular = "";
- $scope.Nervous = "";
- $scope.Reproductive = "";
- $scope.Respiratory = "";
- $scope.Skeletal = "active";
- $scope.Urinary = "";
+ $('#Skeletal_'+windowviewid).addClass("active");
}
else if (title_highlightbody == "Urinary") {
- $scope.CurrentStructure = "";
- $scope.Cardiovascular = "";
- $scope.Digestive = "";
- $scope.Endocrine = "";
- $scope.Immune = "";
- $scope.Integumentary = "";
- $scope.Lymphatic = "";
- $scope.Muscular = "";
- $scope.Nervous = "";
- $scope.Reproductive = "";
- $scope.Respiratory = "";
- $scope.Skeletal = "";
- $scope.Urinary = "active";
- }
- else {
- $scope.CurrentStructure = "";
- $scope.Cardiovascular = "";
- $scope.Digestive = "";
- $scope.Endocrine = "";
- $scope.Immune = "";
- $scope.Integumentary = "";
- $scope.Lymphatic = "";
- $scope.Muscular = "";
- $scope.Nervous = "";
- $scope.Reproductive = "";
- $scope.Respiratory = "";
- $scope.Skeletal = "";
- $scope.Urinary = "";
- }
+ $('#Urinary_'+windowviewid).addClass("active");
+ }
}
$scope.ShowSearch = function (windowviewid) {
@@ -9867,9 +9754,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.HideSearch = function () {
-
- var windowviewid = (event.currentTarget.id).split("_")[1];
-
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
+
$timeout(function () {
$("#termlistfilter_" + windowviewid).css("display", "none");
@@ -9878,9 +9765,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
$scope.jumpToTerm = function (event) {
-
- var windowviewid = (event.target.parentElement.parentElement.id).split("_")[1];
-
+ var len= (event.target.parentElement.parentElement.id).split("_").length;
+ var windowviewid = (event.target.parentElement.parentElement.id).split("_")[len-1];
+
$rootScope.isTermClicked = true;
var currenttermidTxt=$('#' + event.currentTarget.id).text();
@@ -9892,14 +9779,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
$('#termList option[value="' + currenttermidTxt + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
-
- if ($rootScope.isCallFromOtherModule) {
- $scope.SetwindowStoreData(windowviewid,'isHighlightBodyWithCBTermData',false);
- $scope.SetwindowStoreData(windowviewid,'fullTermlist',[]);
- $scope.SetwindowStoreData(windowviewid,'AllTerms',[]);
- $scope.SetwindowStoreData(windowviewid,'CurriculumTermData',[]);
- }
-
$rootScope.isLoading = true;
$('#spinner').css('visibility', 'visible');
@@ -9946,7 +9825,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//Function to set the vertical and horizontal scroll position of CanvasDiv as per the Navigator
$scope.ScrollCanvasDiv = function (event) {
- var windowviewid = (event.target.id).split("_")[1];
+ var len= (event.target.id).split("_").length;
+ var windowviewid = (event.target.id).split("_")[len-1];
+
var x = $("#" + event.target.id).position();
var can = $("#canvasDivDA_" + windowviewid);
var canheight = can[0].scrollHeight;
@@ -10161,7 +10042,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.SetwindowStoreData(windowviewid,'isHighlightBodyByBodySystem',false);
$scope.SetwindowStoreData(windowviewid,'isbodySystemHighlight',false);
- $scope.removeBodySyetemSelectionClass("");
+ $scope.removeBodySyetemSelectionClass(windowviewid,"");
//1.
$scope.SetwindowStoreData(windowviewid,'actualTermNumber',actualTermNumber);
console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + actualTermNumber)
@@ -10580,7 +10461,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.LayerChangeBasedOnKeyPressed = function (e) {
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
+
// 'x' button is displaying inside the input box in IE browser.
if (e.keyCode == 38) {
@@ -10620,7 +10503,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.LayerValueChangeBasedOnKeyUp = function (e) {
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
+
var totalayer=$scope.GetwindowStoreData(windowviewid,'totalLayers');
if (e.keyCode == 13) {
@@ -10677,9 +10562,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
$scope.showFilteredTerms = function () {
- var targetid = event.target.id;
- var windowviewid = targetid.split('_')[1];
-
+ var len= (event.target.id).split("_").length;
+ var windowviewid = (event.target.id).split("_")[len-1];
+
if ($('#searchListDiv_' + windowviewid).html() != "") {
$('#searchListDiv_' + windowviewid).empty();
}
@@ -10707,8 +10592,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}, 100);
};
$scope.ApplySearch = function () {
-
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
+
$rootScope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
@@ -10780,8 +10666,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
$scope.closeSerachTermListPopUp = function () {
- var windowviewid = (event.target.parentElement.parentElement.parentElement.id).split("_")[1];
-
+ var len= (event.target.parentElement.parentElement.parentElement.id).split("_").length;
+ var windowviewid = (event.target.parentElement.parentElement.parentElement.id).split("_")[len-1];
+
$('#searchedTermListPopUp_' + windowviewid).css('display', 'none');
$('#searchedTermListPopUp_' + windowviewid).css("visibility", "hidden");
@@ -10828,7 +10715,8 @@ function OnSearch(event) {
console.log('Show Search is called outside ');
var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
scope.$apply(function () {
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
scope.ShowSearch(windowviewid);
});
}
@@ -10861,7 +10749,8 @@ function OnEnableExtract() {
console.log('OnEnableExtract is called outside ');
var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
scope.$apply(function () {
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
scope.enableExtract('true',windowviewid);
});
}
@@ -10871,7 +10760,8 @@ function onTboxCreation() {
console.log('OnEnableExtract is called outside ');
var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
scope.$apply(function () {
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
scope.createTransparencyBox(windowviewid);
});
}
@@ -10880,7 +10770,8 @@ function onTboxClose() {
console.log('onTboxClose is called outside ');
var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
scope.$apply(function () {
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
scope.CloseTransparencyBox(windowviewid);
});
}
@@ -10890,7 +10781,8 @@ function OnEnableNormalMode() {
var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
scope.$apply(function () {
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
scope.enableNormalMode(windowviewid);
});
}
@@ -10899,7 +10791,8 @@ function OnEnableHighlight() {
console.log('OnEnableHighlight is called outside ');
var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
scope.$apply(function () {
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
scope.enableHighlight(windowviewid);
});
}
@@ -10908,7 +10801,8 @@ function OnIdentifyClick() {
console.log('OnIdentifyClick is called outside ');
var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
scope.$apply(function () {
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
scope.IdentifyClick(windowviewid);
});
}
@@ -10916,7 +10810,8 @@ function OnIdentifyClick() {
function OnZoom(event) {
var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
scope.DisableUI();
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
if ($(".btn-annotation").hasClass("activebtncolor")) //Bug #14928
$(".btn-annotation").removeClass("activebtncolor");
@@ -10943,7 +10838,8 @@ function onListManagerTermSelection(id, isTermListOptionClicked) {
function genderChange(event) {
event.stopPropagation();
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
$("#structureDropdownDA_" + windowviewid).css("display", "none");
$("#viewChangeIDDA_" + windowviewid).css("display", "none");
@@ -10958,8 +10854,9 @@ function genderChange(event) {
function viewChange(event) {
event.stopPropagation();
- var windowviewid = (event.currentTarget.id).split("_")[1];
-
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
+
$("#structureDropdownDA_" + windowviewid).css("display", "none");
$("#genderChangeIdDA_" + windowviewid).css("display", "none");
$("#viewChangeIDDA_" + windowviewid).toggle();
@@ -10973,7 +10870,9 @@ function viewChange(event) {
//body highlight options functinality
function LoadBodySystemData(event) {
- var windowviewid = (event.currentTarget.id).split("_")[1];
+ var len= (event.currentTarget.id).split("_").length;
+ var windowviewid = (event.currentTarget.id).split("_")[len-1];
+
event.stopPropagation();
$("#structureDropdownDA_" + windowviewid).toggle();
$("#genderChangeIdDA_" + windowviewid).css("display", "none");
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index 34ab41d..3d12ea4 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -1246,6 +1246,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
$rootScope.OpenPitures = "OpenPitures";
$rootScope.newCurriculum = "newCurriculum";
$rootScope.openCurriculum = "openCurriculum";
+ $rootScope.saveCurriculam = "saveCurriculam";
$rootScope.PrintPreview = "";
$rootScope.exportImage = "";
$rootScope.PrintViewer = "";
@@ -1261,6 +1262,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
$rootScope.OpenPitures = "OpenPitures";
$rootScope.newCurriculum = "newCurriculum";
$rootScope.openCurriculum = "openCurriculum";
+ $rootScope.saveCurriculam = "saveCurriculam";
$rootScope.PrintPreview = "";
$rootScope.exportImage = "";
$rootScope.PrintViewer = "";
@@ -1275,6 +1277,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
$rootScope.OpenPitures = "OpenPitures";
$rootScope.newCurriculum = "newCurriculum";
$rootScope.openCurriculum = "openCurriculum";
+ $rootScope.saveCurriculam = "saveCurriculam";
$rootScope.PrintPreview = "";
$rootScope.exportImage = "";
$rootScope.PrintViewer = "";
@@ -1414,7 +1417,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
for (var i = 0; i < $rootScope.openViews.length; i++) {
k++;
//if ($rootScope.openViews[i].body - views == title) {
- if ($rootScope.openViews[i].body-views == title) {
+ if ($rootScope.openViews[i].bodyView == title) {
$rootScope.openViews.splice((k - 1), 1);
$rootScope.openViews.push(
@@ -1456,7 +1459,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
if($location.url() == "/da-body-view")
{
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -1690,8 +1694,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -1858,8 +1863,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -1897,9 +1903,10 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasElement;
var canvasPaintElement;
if($location.url() == "/da-body-view")
- {
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ {
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -1929,8 +1936,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -1987,8 +1995,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -2027,8 +2036,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -2104,8 +2114,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -2183,8 +2194,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -2222,8 +2234,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -2260,8 +2273,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -2299,8 +2313,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -2333,8 +2348,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -2423,8 +2439,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
// handling for DA
var canvasPaintElement;
if($location.url() == "/da-body-view")
- {
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
+ {
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
}
else
{
@@ -3516,8 +3533,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasDiv;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasDiv=document.getElementById('canvasDivDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
+ canvasDiv=document.getElementById('canvasDivDA_'+MultiWinId);
}
else
{
@@ -3577,10 +3595,11 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
var canvasDiv;
if($location.url() == "/da-body-view")
- {
- AnnotationCanvas=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
- canvasDiv=document.getElementById('canvasDivDA_'+$rootScope.MULTI_VIEW_ID);
+ {
+ var MultiWinId=$rootScope.GetDaWindowId();
+ AnnotationCanvas=document.getElementById('canvasDA_'+MultiWinId);
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
+ canvasDiv=document.getElementById('canvasDivDA_'+MultiWinId);
}
else
{
@@ -3685,8 +3704,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
// handling for DA
var canvasDiv;
if($location.url() == "/da-body-view")
- {
- canvasDiv=document.getElementById('canvasDivDA_'+$rootScope.MULTI_VIEW_ID);
+ {
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasDiv=document.getElementById('canvasDivDA_'+MultiWinId);
}
else
{
@@ -3779,8 +3799,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
// handling for DA
var canvasElement;
if($location.url() == "/da-body-view")
- {
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
+ {
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
}
else
{
@@ -5019,7 +5040,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var annotationCanvas;
if($location.url() == "/da-body-view")
{
- annotationCanvas=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ annotationCanvas=document.getElementById('canvasDA_'+MultiWinId);
}
else
{
@@ -5062,7 +5084,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasElement;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
}
else
{
@@ -5298,8 +5321,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasPaintElement;
if($location.url() == "/da-body-view")
{
- canvasPaintElement=document.getElementById('canvasPaintDA_'+$rootScope.MULTI_VIEW_ID);
- $("#btnTranparency_" + $rootScope.MULTI_VIEW_ID).removeAttr('disabled', 'disabled');
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasPaintElement=document.getElementById('canvasPaintDA_'+MultiWinId);
+ $("#btnTranparency_" + MultiWinId).removeAttr('disabled', 'disabled');
}
else
{
@@ -5484,8 +5508,12 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
$rootScope.UpdateAndCloseSetting = function (setting) {
$rootScope.UpdateSetting(setting);
- if ($rootScope.MenuModuleName == "DA" || $rootScope.MenuModuleName == "AA") {
- $rootScope.loadSearchData($rootScope.MULTI_VIEW_ID);
+ if ($rootScope.MenuModuleName == "DA") {
+ var MultiWinId=$rootScope.GetDaWindowId();
+ $rootScope.loadSearchData(MultiWinId);
+ }
+ if ($rootScope.MenuModuleName == "AA") {
+ $rootScope.loadSearchData();
}
$rootScope.isApplyBtnClicked = false;
//$timeout(function () {
@@ -5626,13 +5654,14 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
$rootScope.globalSetting.ethnicity = $rootScope.getLocalStorageValue("globalEthnicity");
- if ($('.modestyImg_'+$rootScope.MULTI_VIEW_ID) != null) {
+ var MultiWinId=$rootScope.GetDaWindowId();
+ if ($('.modestyImg_'+MultiWinId) != null) {
if (($rootScope.globalSetting.modesty == 'Y')) {
- $('.modestyImg_'+$rootScope.MULTI_VIEW_ID).css('visibility', 'visible');
+ $('.modestyImg_'+MultiWinId).css('visibility', 'visible');
}
else {
- $('.modestyImg_'+$rootScope.MULTI_VIEW_ID).css('visibility', 'hidden');
+ $('.modestyImg_'+MultiWinId).css('visibility', 'hidden');
}
}
@@ -5647,14 +5676,14 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
}
if ($rootScope.isLayerLessSeven == true) {
if (($rootScope.globalSetting.modesty == 'Y')) {
- $('.modestyImg_'+$rootScope.MULTI_VIEW_ID).css('visibility', 'visible');
+ $('.modestyImg_'+MultiWinId).css('visibility', 'visible');
}
}
else {
- $('.modestyImg_'+$rootScope.MULTI_VIEW_ID).css('visibility', 'hidden');
+ $('.modestyImg_'+MultiWinId).css('visibility', 'hidden');
}
if ($rootScope.isTBLayerLessSeven == true) {
if (($rootScope.globalSetting.modesty == 'Y')) {
@@ -5688,16 +5717,6 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
};
-
-
-
-
-
-
-
-
-
-
$rootScope.reloadChildController = function () {
var len = $rootScope.openModules.length;
@@ -5746,13 +5765,13 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
}
};
-
-
$rootScope.ShowPrintWindow = function () { // Print Active Viewer
+
var canvasDivElement;
if($location.url() == "/da-body-view")
- {
- canvasDivElement=document.getElementById('canvasDivDA_'+$rootScope.MULTI_VIEW_ID);
+ {
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasDivElement=document.getElementById('canvasDivDA_'+MultiWinId);
}
else
{
@@ -5791,7 +5810,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasDivElement;
if($location.url() == "/da-body-view")
{
- canvasDivElement=document.getElementById('canvasDivDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasDivElement=document.getElementById('canvasDivDA_'+MultiWinId);
}
else
{
@@ -5815,7 +5835,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
OpenJSPanel(); // open jsPanel here
if ($('#jsPanel-1').length > 0) {
- $('.jsPanel-btn-norm').attr('style', 'display: block');
+ // $('.jsPanel-btn-norm').attr('style', 'display: block');
}
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
}
- $('#fileMenuAnchor').parent().addClass('disableFileMenu');
- if ($('#daImagePanel').length > 0) {
- console.log('close')
-
- }
+ $('#fileMenuAnchor').parent().addClass('disableFileMenu');
}
});
@@ -5896,7 +5912,17 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
};
function OpenJSPanel() {
- $("#daImagePanel").css({ "pointer-events": "none", "opacity": ".5" });
+ // handling for DA
+ var daImagePanelElement;
+ if($location.url() == "/da-body-view")
+ {
+ var MultiWinId=$rootScope.GetDaWindowId();
+ daImagePanelElement=document.getElementById('daImagePanel_'+MultiWinId);
+ var daImagePanel=daImagePanelElement.id;
+
+ $("#"+daImagePanel).css({ "pointer-events": "none", "opacity": ".5" });
+ }
+
$("#ciImagePanel").css({ "pointer-events": "none", "opacity": ".5" });
$("#aiImagePanel").css({ "pointer-events": "none", "opacity": ".5" });
$("#ImagePanel").css({ "pointer-events": "none", "opacity": ".5" });
@@ -6003,7 +6029,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasDivElement;
if($location.url() == "/da-body-view")
{
- canvasDivElement=document.getElementById('canvasDivDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasDivElement=document.getElementById('canvasDivDA_'+MultiWinId);
}
else
{
@@ -6052,7 +6079,18 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
}
$(document).on('click', '#jsPanel-1 .jsglyph-remove', function () {
- $("#daImagePanel").css({ "pointer-events": "auto", "opacity": "1" });
+ // handling for DA
+ var daImagePanelElement;
+ if($location.url() == "/da-body-view")
+ {
+ var MultiWinId=$rootScope.GetDaWindowId();
+ daImagePanelElement=document.getElementById('daImagePanel_'+MultiWinId);
+ var daImagePanel=daImagePanelElement.id;
+
+ $("#"+daImagePanel).css({ "pointer-events": "auto", "opacity": "1" });
+
+ }
+
$("#ciImagePanel").css({ "pointer-events": "auto", "opacity": "1" });
$("#aiImagePanel").css({ "pointer-events": "auto", "opacity": "1" });
$("#ImagePanel").css({ "pointer-events": "auto", "opacity": "1" });
@@ -6153,7 +6191,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
var canvasElement;
if($location.url() == "/da-body-view")
{
- canvasElement=document.getElementById('canvasDA_'+$rootScope.MULTI_VIEW_ID);
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasElement=document.getElementById('canvasDA_'+MultiWinId);
}
else
{
@@ -6166,6 +6205,38 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
};
+ $rootScope.SaveImagefile = function () {
+ // handling for DA
+ var canvasDiv;
+ if($location.url() == "/da-body-view")
+ {
+ var MultiWinId=$rootScope.GetDaWindowId();
+ canvasDiv=document.getElementById('canvasDivDA_'+MultiWinId);
+ }
+ else
+ {
+ canvasDiv = document.getElementById('canvasDiv');
+ }
+ var canvasDivId=canvasDiv.id;
+ $("#"+canvasDivId).append("");
+ html2canvas($("#"+canvasDivId), {
+ onrendered: function (canvas) {
+ //theCanvas = canvas;
+ var fileName = document.getElementById("filename").value + '.jpg';
+ if (typeof (fileName) == "undefined" || fileName == ".jpg")
+ fileName = "Untitled.jpg"
+ var dataURL = canvas.toDataURL("image/jpeg");
+ var blob = dataURItoBlob(dataURL);
+ console.log(blob);
+ saveAs(blob, fileName);
+ $("#exportlogo").remove();
+ $("#filename").val("");
+ }
+ });
+ $(".export-image").css("display", "none");
+
+ };
+
}]
);
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
index 91a9a4e..07e461a 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
+++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
@@ -156,7 +156,7 @@