diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 7e48a14..fa00cd1 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -27,15 +27,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo selectedorientation: '', selectedimagetype: '', }; - $scope.loadForModuleById = function (moduleId) { + + $scope.loadForModuleById = function (moduleId) { + $scope.moduleId = moduleId; console.log('loadForModuleById is called') $rootScope.moduleName = Modules[moduleId].Name; - $scope.AllBodyRegion = BodyRegions; $scope.AllBodySystem = BodySystems; + $scope.AllOrientation = ViewOrientations; $scope.AllImageType = ImageTypes; var promise = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName) @@ -43,6 +45,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo function (result) { $scope.moduleLandingData = result; + //console.log(JSON.stringify(result, null, 4)); }, @@ -66,7 +69,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //1.Filter selected module ietem data and get the pushed opened moduile array object $rootScope.OpenedTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); - + $rootScope.bodySystemName = $rootScope.OpenedTileData[2]; + //2. Pick the image name to create a source to open $rootScope.imageName = $rootScope.OpenedTileData[3]; $rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3]; @@ -82,6 +86,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.openModuleItem = function () { var jsContentURL; var moduleItemViewDivId; + + + //1. create a jsPanel and load the module item view if ($rootScope.moduleName == ATLAS_ANATOMY) { @@ -103,7 +110,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo selector: '.aaBodyView', theme: 'success', currentController: 'TileViewListController', - parentSlug: 'tile-view', + parentSlug: 'tile-view-list', ajax: { url: jsContentURL }, @@ -141,6 +148,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); $("#modItemImage").attr('src', $rootScope.OpenItemImagePath); + //0.5 create canvas on the top of image so that I can draw a line over the canvas. var canvas = document.createElement('canvas'); @@ -155,9 +163,29 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //6. Show all pins on AA opened item $scope.showAllPins(); + + //7. Show all system body list in left side + $scope.selectBodySystem(); } }, 1050); } + + $scope.selectBodySystem = function() + { + $rootScope.bodySystemNames = $rootScope.bodySystemName.trim().split(/\s*,\s*/); + var bodySystemListObj = document.getElementById("bodySystemList").getElementsByTagName("a"); + var bodySystemListlength = bodySystemListObj.length; + for (var i = 0; i < bodySystemListlength; i++) { + //var boldTag = lis[i]; + for (var j = 0; j < $rootScope.bodySystemNames.length; j++) { + if ((bodySystemListObj[i].innerHTML) == ($rootScope.bodySystemNames[j])) { + $("#" + i).removeClass("disabled"); + + } + } + + } + } function loadFailure() { console.log('unable to load opened module ietem'); @@ -176,9 +204,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo }); }) - + $scope.showAllPins = function () { - + + var promise = ModuleService.getPinDataForImage($rootScope.imageName) .then( @@ -259,7 +288,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var promise = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName) .then( function (result) { - alert("mukul"); + // alert(JSON.stringify($scope.moduleLandingData)); $scope.moduleLandingData = result; $scope.selectedAAListViewData = new jinqJs() 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 147300a..78e0c5e 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 @@ -1,6 +1,6 @@