diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index ba1b6cb..e1d51b0 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -23,7 +23,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.bgartData; $scope.drawnBodyRegions; //view specific constants - $rootScope.voId; + //TODO + //$rootScope.voId; + + $rootScope.voId = 1; $scope.layerNumber; $scope.daCounter = 1; $scope.bagartDetails; @@ -304,10 +307,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } }; - - - + $scope.openView = function ($event) { + alert('openView is called in AA') + debugger; $rootScope.MenuModuleName = "DA"; //alert($rootScope.MenuModuleName); @@ -405,6 +408,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //load json data for body view $scope.loadDissectibleAnatomyData = function () { + alert('AA: loadDissectibleAnatomyData is called'); + $rootScope.ClearIframe(); //load common data @@ -446,46 +451,43 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - - //da-body-views functions - $scope.openBodyView = function () { //0. we will initially append container to load body //check if localstorage has any settings - //var curentEthnicity = localStorage.getItem("globalEthnicity"); - //if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { - // $rootScope.globalSetting.ethnicity = curentEthnicity; - //} + var curentEthnicity = localStorage.getItem("globalEthnicity"); + if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { + $rootScope.globalSetting.ethnicity = curentEthnicity; + } - //var curentmodesty = localStorage.getItem("globalModesty"); - //if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) { - // $rootScope.globalSetting.modesty = curentmodesty - //} + var curentmodesty = localStorage.getItem("globalModesty"); + if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) { + $rootScope.globalSetting.modesty = curentmodesty + } //0.1 - //var currentBodyViewId = localStorage.getItem("currentBodyViewId"); + var currentBodyViewId = localStorage.getItem("currentBodyViewId"); - //$scope.loadSearchDataForBodyView(); + $scope.loadSearchDataForBodyView(); - //console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId); + console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId); - //var openViews; - //if ($rootScope.openViews != null || $rootScope.openViews != undefined) { - // if ($rootScope.openViews.length > 0) { - // openViews = new jinqJs() - // .from($rootScope.openViews) - // .where("BodyViewId == " + currentBodyViewId) - // .select(); - // } - //} + var openViews; + if ($rootScope.openViews != null || $rootScope.openViews != undefined) { + if ($rootScope.openViews.length > 0) { + openViews = new jinqJs() + .from($rootScope.openViews) + .where("BodyViewId == " + currentBodyViewId) + .select(); + } + } // 0.2 getting corresponding body view title //var counter = 1; - //var tittle = localStorage.getItem("currentViewTitleFromJson"); - //localStorage.setItem("currentViewTitle", tittle); + var tittle = localStorage.getItem("currentViewTitleFromJson"); + localStorage.setItem("currentViewTitle", tittle); //WILL BE USED WHEN MULTI VIEWOPEN FUNCTIONALITY IS IMPELMNETD //if (openViews != null && openViews != undefined) { @@ -509,12 +511,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo id: 'daImagePanel', selector: '.daBodyView', theme: 'success', - currentController: 'TileListViewController', - parentSlug: 'tile-view-list', + currentController: 'DAController', + parentSlug: 'da-view-list', ajax: { - url: 'app/views/aa/atlas-anatomy-detail.html' + url: 'app/views/da/da-view.html' }, - title: "abc", + title: localStorage.getItem("currentViewTitle"), position: { top: 70, @@ -527,15 +529,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo console.log('jsPanel loaded daImagePanel exist= ' + document.getElementById('daImagePanel')) //0.1 - //$rootScope.currentSlug = 'da-body-view'; + $rootScope.currentSlug = 'da-body-view'; //0.2 - //$rootScope.openViews.push( - // { - // "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, - // "slug": $rootScope.currentSlug - // } - // ); + $rootScope.openViews.push( + { + "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, + "slug": $rootScope.currentSlug + } + ); //0.3 var daBodyviewElement = angular.element(document.getElementById("daBodyview")); @@ -553,7 +555,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //1. load navigator man first console.log('before LoadBodyViewNavigatorImage call') - // $scope.LoadBodyViewNavigatorImage(); + $scope.LoadBodyViewNavigatorImage(); //$scope.loadSearchDataForBodyView(); @@ -563,8 +565,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //2. - //console.log('currentBodyViewId just before sending: ' + currentBodyViewId); - // $scope.loadBodyViewData(currentBodyViewId); + console.log('currentBodyViewId just before sending: ' + currentBodyViewId); + $scope.loadBodyViewData(currentBodyViewId); //2. load bodyRegion data $rootScope.isLoading = true; @@ -577,6 +579,136 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo }, 250); } + //da-body-views functions + + //$scope.openBodyView = function () { + + // //0. we will initially append container to load body + + // //check if localstorage has any settings + // //var curentEthnicity = localStorage.getItem("globalEthnicity"); + // //if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { + // // $rootScope.globalSetting.ethnicity = curentEthnicity; + // //} + + // //var curentmodesty = localStorage.getItem("globalModesty"); + // //if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) { + // // $rootScope.globalSetting.modesty = curentmodesty + // //} + + // //0.1 + // //var currentBodyViewId = localStorage.getItem("currentBodyViewId"); + + // //$scope.loadSearchDataForBodyView(); + + + // //console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId); + + // //var openViews; + // //if ($rootScope.openViews != null || $rootScope.openViews != undefined) { + // // if ($rootScope.openViews.length > 0) { + // // openViews = new jinqJs() + // // .from($rootScope.openViews) + // // .where("BodyViewId == " + currentBodyViewId) + // // .select(); + // // } + // //} + + // // 0.2 getting corresponding body view title + // //var counter = 1; + // //var tittle = localStorage.getItem("currentViewTitleFromJson"); + // //localStorage.setItem("currentViewTitle", tittle); + + // //WILL BE USED WHEN MULTI VIEWOPEN FUNCTIONALITY IS IMPELMNETD + // //if (openViews != null && openViews != undefined) { + // // angular.forEach(openViews, function (value, key) { + + // // if (value.bodyView == tittle) { + // // tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; + // // $rootScope.currentActiveViewTitle = tittle; + // // localStorage.setItem("currentViewTitle", tittle); + // // } + + // // }); + // //} + // //else { + // // localStorage.setItem("currentViewTitle", tittle); + // //} + + // //0.3 + + // $.jsPanel({ + // id: 'daImagePanel', + // selector: '.daBodyView', + // theme: 'success', + // currentController: 'TileListViewController', + // parentSlug: 'tile-view-list', + // ajax: { + // url: 'app/views/aa/atlas-anatomy-detail.html' + // }, + // title: "abc", + + // position: { + // top: 70, + // left: 1, + // }, + + // size: { width: $(window).outerWidth() - 10, height: $(window).outerHeight() - 110 }, + + // }); + + // console.log('jsPanel loaded daImagePanel exist= ' + document.getElementById('daImagePanel')) + // //0.1 + // //$rootScope.currentSlug = 'da-body-view'; + + // //0.2 + // //$rootScope.openViews.push( + // // { + // // "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, + // // "slug": $rootScope.currentSlug + // // } + // // ); + + // //0.3 + // var daBodyviewElement = angular.element(document.getElementById("daBodyview")); + + // $timeout(function () { + // $compile(daBodyviewElement.contents())($scope); + + // console.log('html is compiled' + document.getElementById('daView')) + // if (document.getElementById('daView') != null) { + + // //0.4 added some stylesheets + // $('#daBodyview').css("height", $(window).outerHeight()); + + // $('#daBodyview').css("width", $(window).outerWidth()); + + // //1. load navigator man first + // console.log('before LoadBodyViewNavigatorImage call') + // // $scope.LoadBodyViewNavigatorImage(); + + // //$scope.loadSearchDataForBodyView(); + + // $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); + + // $scope.layerNumber = 0; + + // //2. + + // //console.log('currentBodyViewId just before sending: ' + currentBodyViewId); + // // $scope.loadBodyViewData(currentBodyViewId); + + // //2. load bodyRegion data + // $rootScope.isLoading = true; + // $rootScope.voId = localStorage.getItem("currentBodyViewId"); + + // $('#daBodyview').css("height", $(window).outerHeight()); + + // $('#daBodyview').css("width", $(window).outerWidth()); + // } + // }, 250); + //} + angular.element(document).ready(function (e) { $("#daImagePanel").resize(function () { $("#canvasDiv").scrollLeft($rootScope.CanvasDivLeftPosition); @@ -618,10 +750,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //console.log('for bodyRegionId = ' + bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")) + //searchWorker.postMessage({ + // 'currentBodyViewId': currentBodyViewId, + //}) + searchWorker.postMessage({ - 'currentBodyViewId': currentBodyViewId, + 'currentBodyViewId': 1, }) + searchWorker.onmessage = function (e) { //console.log('callback searchWorker , time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); @@ -804,7 +941,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.viewOrientationId = 6; } - $scope.CalculateImageCordinates($rootScope.viewOrientationId); + //TODO + //$scope.CalculateImageCordinates($rootScope.viewOrientationId); + $scope.CalculateImageCordinates(1); }; @@ -1199,7 +1338,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($rootScope.viewOrientationId == 3 && bodyRegionId == 1) { console.log('$rootScope.voId: ' + $rootScope.voId); if (bodyRegion == bodyRegionId && bodyRegionSkinTone == 'W') { - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/W/" + SelectedLayerData.BodyRegion[z].Image._ImageName; + //TODO + //return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/W/" + SelectedLayerData.BodyRegion[z].Image._ImageName; + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + 1 + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/W/" + SelectedLayerData.BodyRegion[z].Image._ImageName; } } @@ -1207,7 +1348,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (bodyRegion == bodyRegionId && bodyRegionSkinTone == $scope.skinTone) { - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; + //TODO + //return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" +1 + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; } } } @@ -5639,7 +5782,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.enableHighlight = function () { - + alert('hi highlight'); // $("#btnExtract").removeClass("disabled"); $("#btnTranparency").removeClass("disabled"); // $rootScope.isTransparencyBoxActivated = false; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html index 565aa4d..c603caa 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html @@ -161,7 +161,7 @@
- +