Commit f6a824abd670d30846b20facf5686ce92e5d95a2

Authored by Amrita Vishnoi
1 parent 26c18336

Able to send data to the service

150-DOCUMENTATION/AIA_DailyScrum.xlsx 0 → 100644
No preview for this file type
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -7,6 +7,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod @@ -7,6 +7,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod
7 var CLINICAL_ILLUSTRATION ='Clinical Illustrations'; 7 var CLINICAL_ILLUSTRATION ='Clinical Illustrations';
8 var CLINICAL_ANIMATION='Clinical Animations'; 8 var CLINICAL_ANIMATION='Clinical Animations';
9 9
  10 + var moduleData = [];
10 11
11 $scope.AllBodyRegion = []; 12 $scope.AllBodyRegion = [];
12 $scope.AllBodySystem = []; 13 $scope.AllBodySystem = [];
@@ -64,11 +65,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod @@ -64,11 +65,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod
64 //$('#grid-view').empty(); 65 //$('#grid-view').empty();
65 angular.forEach($scope.data, function (value, key) 66 angular.forEach($scope.data, function (value, key)
66 { 67 {
  68 + var obj = {};
  69 + obj.moduleId = value._Id;
  70 + //moduleData.push(value._Id);
  71 +
67 $scope.ImageName = value._TileImageName; 72 $scope.ImageName = value._TileImageName;
68 $scope.imagePath = "~/../content/images/aa/thumbnails/" + value._TileImageName; 73 $scope.imagePath = "~/../content/images/aa/thumbnails/" + value._TileImageName;
69 $scope.TileViewId = value._Id; 74 $scope.TileViewId = value._Id;
70 75
71 - var $el = $('<div id="' + value._Id + '" class="col-sm-3 col-md-3" title = "' + value._Title + '" data-ng-click="openModuleItem($event)">' 76 + var $el = $('<div id="' + value._Id + '" class="col-sm-3 col-md-3" title = "' + value._Title + '" data-ng-click="openModuleItem($event.data.value=' + value._Id + ')">'
72 + '<div class="thumbnail" >' 77 + '<div class="thumbnail" >'
73 + '<img class="tinyImg" id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' 78 + '<img class="tinyImg" id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >'
74 + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); 79 + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view');
@@ -100,18 +105,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod @@ -100,18 +105,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod
100 $("html,body").scrollTop(0); 105 $("html,body").scrollTop(0);
101 } 106 }
102 107
103 - $scope.openModuleItem = function (event) { 108 + $scope.openModuleItem = function (moduleDataDetail) {
104 109
105 alert('call on TileViewListController'); 110 alert('call on TileViewListController');
106 111
107 var moduleDetails = []; 112 var moduleDetails = [];
108 - moduleDetails.push($scope.moduleId); 113 + moduleDetails.push(event.moduleId);
109 moduleDetails.push($scope.imageName); 114 moduleDetails.push($scope.imageName);
110 moduleDetails.push($scope.imagePath); 115 moduleDetails.push($scope.imagePath);
111 moduleDetails.push($scope.iileViewId); 116 moduleDetails.push($scope.iileViewId);
  117 +
  118 + ModuleService.SaveOpenedModules(moduleDetails);
112 119
113 - var isSaved= ModuleService.SaveOpenedModules(moduleDetails);  
114 - alert(isSaved); 120 + //var isSaved= ModuleService.SaveOpenedModules(moduleDetails);
  121 + //alert(isSaved);
115 122
116 } 123 }
117 124
400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
@@ -9,15 +9,18 @@ AIA.factory(&#39;ModuleService&#39;, function () @@ -9,15 +9,18 @@ AIA.factory(&#39;ModuleService&#39;, function ()
9 return { 9 return {
10 SaveOpenedModules: function (moduleDetails) 10 SaveOpenedModules: function (moduleDetails)
11 { 11 {
12 - var moduleId = moduleDetails.moduleId;  
13 - OpenedModuleList.push(moduleId);  
14 - OpenedModuleList.tileViewId = moduleDetails.TileViewId;  
15 - OpenedModuleList.tileImageName = moduleDetails.imageName;  
16 - OpenedModuleList.tileImageSRC = moduleDetails.imagePath; 12 + //var moduleId = moduleDetails.moduleId;
  13 + //OpenedModuleList.push(moduleId);
  14 + //OpenedModuleList.tileViewId = moduleDetails.TileViewId;
  15 + //OpenedModuleList.tileImageName = moduleDetails.imageName;
  16 + //OpenedModuleList.tileImageSRC = moduleDetails.imagePath;
17 17
18 if (moduleId == ATLAS_ANATOMY) 18 if (moduleId == ATLAS_ANATOMY)
19 { 19 {
20 - console.log('AA is called') 20 + console.log('AA is called');
  21 +
  22 +
  23 +
21 } 24 }
22 else if(moduleId == CLINICAL_ANIMATION) 25 else if(moduleId == CLINICAL_ANIMATION)
23 { 26 {
@@ -29,7 +32,7 @@ AIA.factory(&#39;ModuleService&#39;, function () @@ -29,7 +32,7 @@ AIA.factory(&#39;ModuleService&#39;, function ()
29 } 32 }
30 33
31 console.log('called service'); 34 console.log('called service');
32 - return true; 35 + //return true;
33 } 36 }
34 }; 37 };
35 }); 38 });
36 \ No newline at end of file 39 \ No newline at end of file