From a011cf07e31fd0be0aad87947952cd1105a2bbe1 Mon Sep 17 00:00:00 2001 From: amrita.vishnoi Date: Fri, 16 Dec 2016 16:57:28 +0530 Subject: [PATCH] Integrated jsPanel but still not getting scope is not accessible and also able to get pindata --- 150-DOCUMENTATION/Scrum/AIA_DailyScrum.xlsx | Bin 63471 -> 0 bytes 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 54 +++++++++++++++++++++++++++++++++++++----------------- 400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js | 46 +++++++++++++++++++++------------------------- 400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html | 30 +++++++++++++++++------------- 400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html | 2 +- 400-SOURCECODE/AIAHTML5.Web/content/data/json/aa/aa_pindata/aa_dat_pindata_2862.json | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 400-SOURCECODE/AIAHTML5.Web/libs/jquery/1.11.3/jquery-1.11.3.min.js | 5 ----- 7 files changed, 223 insertions(+), 62 deletions(-) delete mode 100644 400-SOURCECODE/AIAHTML5.Web/libs/jquery/1.11.3/jquery-1.11.3.min.js diff --git a/150-DOCUMENTATION/Scrum/AIA_DailyScrum.xlsx b/150-DOCUMENTATION/Scrum/AIA_DailyScrum.xlsx index 87c1e8e..e35856e 100644 Binary files a/150-DOCUMENTATION/Scrum/AIA_DailyScrum.xlsx and b/150-DOCUMENTATION/Scrum/AIA_DailyScrum.xlsx differ diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index e9b80d0..3cb8fb4 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -18,6 +18,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod $scope.moduleData = []; $rootScope.moduleName; $rootScope.OpenItemImageName; + $rootScope.OpenItemImagePath; $scope.test; @@ -73,7 +74,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod OpendTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); - $rootScope.OpenItemImageName = "../../../content/images/aa/images/" + OpendTileData[3]; + $rootScope.imageName = OpendTileData[3]; + + $rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + OpendTileData[3]; //alert('img Name: ' +$scope.OpenItemImageName); var u = $location.url(); @@ -91,32 +94,23 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod } - $scope.openModuleItem = function (event) + $scope.openModuleItem = function (elSelector) { alert($rootScope.OpenItemImageName); var OpendTileData = []; - // var moduleItemDataToBeSaved = event.target.id; - //OpendTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); - - - ////// debugger; - //var moduleItemDataToBeSaved = event.target.id; - - //var OpendTileData = []; + var url; - //OpendTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); - // alert('img name before page: ' + $rootScope.OpenItemImageName); - var url; + if ($rootScope.moduleName == ATLAS_ANATOMY) + { - - - if ($rootScope.moduleName == ATLAS_ANATOMY) { url = 'app/views/aa/atlas-anatomy-detail.html'; $scope.test = url; + + $scope.showAllPins(); } else if ($rootScope.moduleName == CLINICAL_ANIMATION) { //to do, in next phase of project @@ -137,7 +131,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod url: url }, - title: localStorage.getItem("currentViewTitle"), + title: "AA page view", position: { top: 70, @@ -149,7 +143,33 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod }); + var jsElement = angular.element(document.getElementById("JsPannelContainer")); + + + $timeout(function () { $compile(jsElement.contents())($scope) }, 250); + + + + } + + $scope.showAllPins = function () + { + var promise = ModuleService.getPinDataForImage($rootScope.imageName) + + .then( + function (result) { + $scope.aaPinData = result; + + console.log(JSON.stringify(result, null, 4)); + }, + function (error) { + // handle errors here + console.log(' error: ' + error.statusText); + } + ) + } + }]); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js b/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js index acc8eba..42961be 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js @@ -13,8 +13,11 @@ AIA.service('ModuleService', function($http, DataService) { modName = moduleName; + debugger; if (moduleName == ATLAS_ANATOMY) { jsonPath = '~/../content/data/json/aa/aa_dat_contentlist.json'; + + } else if (moduleName == CLINICAL_ANIMATION) { //to do, in next phase of project @@ -29,7 +32,7 @@ AIA.service('ModuleService', function($http, DataService) { moduleData = new jinqJs() .from(response.data.root.Item) - .orderBy([{field: '_Title', sort: 'asc' }]) + // .orderBy([{field: '_Title', sort: 'asc' }]) .select(); // console.log(JSON.stringify(response, null, 4)); // response.data= moduleData; @@ -72,37 +75,30 @@ AIA.service('ModuleService', function($http, DataService) { return AADataForSelectedItem; } - - - //OpenedModuleItemList.push("imageId: " + moduleDetails[0]); - //OpenedModuleItemList.push("moduleId:" + moduleDetails[1]); - //OpenedModuleItemList.push("moduleName: " + moduleDetails[2]); - - //var moduleId = moduleDetails.moduleId; - //OpenedModuleList.push(moduleId); - //OpenedModuleList.tileViewId = moduleDetails.TileViewId; - //OpenedModuleList.tileImageName = moduleDetails.imageName; - //OpenedModuleList.tileImageSRC = moduleDetails.imagePath; + }, - //moduleData.push($scope.moduleId); - //moduleData.push(value._Id); - //moduleData.push(value._ImageId); - //moduleData.push(value._Title); - //moduleData.push(value._ImageName); - //moduleData.push(value._BodySystem); - //moduleData.push(value._BodyRegion); - //moduleData.push(value._ViewOrientation); - //moduleData.push(value._ImageType); - //moduleData.push(value._TileImageName); + getPinDataForImage: function (imageName) + { + debugger; + + var pindataFileNamePart1 = imageName.replace("aa_img_", ""); + var pinFileNamePart2 = pindataFileNamePart1.replace(".jpg", ""); + var pinDatajsonPath = '~/../content/data/json/aa/aa_pindata/aa_dat_pindata_' + pinFileNamePart2 + '.json'; - console.log('called service'); + return $http.get(pinDatajsonPath, function (response) { - //this.renderModuleItemById(); + var pinData = new jinqJs() + .from(response.data.Root.Item) + .select(); + + return pinData; + }); - }, + } + }; }); 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 01ee552..c8ae6c1 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 @@  -
- {{test}} +
+ @@ -11,7 +11,7 @@
-
+
@@ -47,7 +47,7 @@ -
+ +
-
- +