diff --git a/150-DOCUMENTATION/Scrum/AIA_DailyScrum.xlsx b/150-DOCUMENTATION/Scrum/AIA_DailyScrum.xlsx
index c85180b..400691d 100644
--- a/150-DOCUMENTATION/Scrum/AIA_DailyScrum.xlsx
+++ b/150-DOCUMENTATION/Scrum/AIA_DailyScrum.xlsx
diff --git a/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj b/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
index 13f420f..1b3c379 100644
--- a/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
+++ b/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
@@ -55,6 +55,7 @@
+
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
index 41bb1cd..997c19b 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -15,7 +15,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod
$scope.AllImageType = [];
$scope.moduleData = [];
- $scope.loadForModuleById = function (moduleId) {
+ $scope.loadForModuleById = function (moduleId) {
$scope.moduleId = moduleId;
@@ -26,115 +26,136 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod
var data = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName);
- alert('returned data: ' + data);
+ // alert(data);
}
+
+ $scope.$on('SendTileDataEvent', function (event, data) {
+
+
+ alert($rootScope.tileHTML);
+
+ })
+
+ // var abc= ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName)
+ // abc.then(
+ // function (result) {
+ // var data = result;
+ // alert('returned data: ' + data);
+
+ // },
+ // function (error) {
+ // alert('returned error: ' + abc);
+ // console.log(' $rootScope.TermNumberData= ' + error.statusText);
+ // }
+ // )
+ //};
- $scope.loadDataForModule = function (moduleName)
- {
-
- //0. load filter static data
-
- $scope.AllBodyRegion = BodyRegions;
- $scope.AllBodySystem = BodySystems;
- $scope.AllOrientation = ViewOrientations;
- $scope.AllImageType = ImageTypes;
-
- //1. load dynamic data for module specific images
- var jsonPath;
- 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
- jsonPath ='~/../content/data/json/ca/ca_dat_contentlist.json';
- }
- else if(moduleName == CLINICAL_ILLUSTRATION)
- {
- //to do, in next phase of project
- jsonPath ='~/../content/data/json/ci/ci_dat_contentlist.json';
- }
-
- var promise = DataService.getJson(jsonPath)
- promise.then(
- function (result) {
- $scope.AtlasAnatomyData = result;
+ //$scope.loadDataForModule = function (moduleName)
+ //{
+
+ // //0. load filter static data
+
+ // $scope.AllBodyRegion = BodyRegions;
+ // $scope.AllBodySystem = BodySystems;
+ // $scope.AllOrientation = ViewOrientations;
+ // $scope.AllImageType = ImageTypes;
+
+ // //1. load dynamic data for module specific images
+ // var jsonPath;
+ // 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
+ // jsonPath ='~/../content/data/json/ca/ca_dat_contentlist.json';
+ // }
+ // else if(moduleName == CLINICAL_ILLUSTRATION)
+ // {
+ // //to do, in next phase of project
+ // jsonPath ='~/../content/data/json/ci/ci_dat_contentlist.json';
+ // }
+
+ // var promise = DataService.getJson(jsonPath)
+ // promise.then(
+ // function (result) {
+ // $scope.AtlasAnatomyData = result;
- $scope.data = new jinqJs()
- .from($scope.AtlasAnatomyData.root.Item)
- .orderBy([{ field: '_Title', sort: 'asc' }])
- .select();
-
- //console.log($scope.selectedCIListViewData);
- //$('#grid-view').empty();
- angular.forEach($scope.data, function (value, key)
- {
- // $rootScope.moduleData = [];
- $scope.moduleData.push({ "id": value._Id, "imageID": value._ImageId, "TileName": value._TileImageName, "DivImageTitle": value._Title });
- // $scope.moduleData.push(value._ImageId);
- // $scope.moduleData.push(value._TileImageName);
+ // $scope.data = new jinqJs()
+ // .from($scope.AtlasAnatomyData.root.Item)
+ // .orderBy([{ field: '_Title', sort: 'asc' }])
+ // .select();
+
+ // //console.log($scope.selectedCIListViewData);
+ // //$('#grid-view').empty();
+ // angular.forEach($scope.data, function (value, key)
+ // {
+ // // $rootScope.moduleData = [];
+ // $scope.moduleData.push({ "id": value._Id, "imageID": value._ImageId, "TileName": value._TileImageName, "DivImageTitle": value._Title });
+ // // $scope.moduleData.push(value._ImageId);
+ // // $scope.moduleData.push(value._TileImageName);
- $scope.ImageName = value._TileImageName;
- $scope.imagePath = "~/../content/images/aa/thumbnails/" + value._TileImageName;
- $scope.TileViewId = value._Id;
+ // $scope.ImageName = value._TileImageName;
+ // $scope.imagePath = "~/../content/images/aa/thumbnails/" + value._TileImageName;
+ // $scope.TileViewId = value._Id;
- var $el = $('
'
- + '
'
- + '
![]()
'
- + '
').appendTo('#grid-view');
+ // var $el = $(''
+ // + '
'
+ // + '
![]()
'
+ // + '
').appendTo('#grid-view');
- $compile($el)($scope);
+ // $compile($el)($scope);
- //$(".sidebar").mCustomScrollbar({
- // autoHideScrollbar: true,
- // //theme:"rounded"
- //});
+ // //$(".sidebar").mCustomScrollbar({
+ // // autoHideScrollbar: true,
+ // // //theme:"rounded"
+ // //});
- });
+ // });
- $scope.scroll();
+ // $scope.scroll();
- },
- function (error) {
- // handle errors here
- console.log(' $scope.IllustrationData = ' + error.statusText);
- }
- );
+ // },
+ // function (error) {
+ // // handle errors here
+ // console.log(' $scope.IllustrationData = ' + error.statusText);
+ // }
+ // );
- }
+ //}
$scope.scroll = function () {
$("html,body").scrollTop(0);
}
- $scope.openModuleItem = function ($event) {
+ //$scope.openModuleItem = function ($event) {
- var moduleItemDataToBeSaved = [];
+ // var moduleItemDataToBeSaved = [];
- for(var i=0;i<=$scope.moduleData.length-1;i++)
- {
+ // for(var i=0;i<=$scope.moduleData.length-1;i++)
+ // {
- if ($scope.moduleData[i].DivImageTitle == event.target.id)
- {
+ // if ($scope.moduleData[i].DivImageTitle == event.target.id)
+ // {
- alert($scope.moduleData[i].imageID);
+ // alert($scope.moduleData[i].imageID);
- moduleItemDataToBeSaved.push($scope.moduleData[i].imageID, $scope.moduleData[i].id,$scope.moduleName);
- }
+ // moduleItemDataToBeSaved.push($scope.moduleData[i].imageID, $scope.moduleData[i].id,$scope.moduleName);
+ // }
- }
+ // }
- ModuleService.SaveOpenedModules(moduleItemDataToBeSaved);
+ // ModuleService.SaveOpenedModules(moduleItemDataToBeSaved);
- //var isSaved= ModuleService.SaveOpenedModules(moduleDetails);
- //alert(isSaved);
+ // //var isSaved= ModuleService.SaveOpenedModules(moduleDetails);
+ // //alert(isSaved);
- }
+ //}
}]);
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js b/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
index b972eee..d079b41 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
@@ -4,17 +4,16 @@ var CLINICAL_ANIMATION = 'Clinical Animations';
var OpenedModuleItemList = [];
var ModDetail = [];
-AIA.factory('ModuleService', function (DataService)
-{
+//module.service( 'Book', [ '$rootScope', function( $rootScope ) {
+AIA.service('ModuleService', ['$rootScope', function ($rootScope, DataService) {
return {
- SaveOpenedModules: function (moduleDetails)
- {
+ SaveOpenedModules: function (moduleDetails) {
ModDetail = moduleDetails;
- OpenedModuleItemList.push("imageId: "+ moduleDetails[0]);
+ OpenedModuleItemList.push("imageId: " + moduleDetails[0]);
OpenedModuleItemList.push("moduleId:" + moduleDetails[1]);
OpenedModuleItemList.push("moduleName: " + moduleDetails[2]);
-
+
//var moduleId = moduleDetails.moduleId;
//OpenedModuleList.push(moduleId);
@@ -32,23 +31,22 @@ AIA.factory('ModuleService', function (DataService)
//moduleData.push(value._ViewOrientation);
//moduleData.push(value._ImageType);
//moduleData.push(value._TileImageName);
-
-
+
+
console.log('called service');
-
- this.renderModuleItemById();
-
+
+ this.renderModuleItemById();
+
},
- renderModuleItemById : function () {
-
+ renderModuleItemById: function () {
+
var jsonFileForOpenModule;
- if (ModDetail[2] == ATLAS_ANATOMY)
- {
- this.loadPinData();
-
+ if (ModDetail[2] == ATLAS_ANATOMY) {
+ this.loadPinData();
+
}
else if (ModDetail[2] == CLINICAL_ANIMATION) {
@@ -73,41 +71,69 @@ AIA.factory('ModuleService', function (DataService)
})
},
-
- loadModuleDataBasedOnModuleName: function (moduleName) {
-
- alert('loadModuleDataBasedOnModuleName is called');
-
- var jsonPath;
- 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
- jsonPath = '~/../content/data/json/ca/ca_dat_contentlist.json';
- }
- else if (moduleName == CLINICAL_ILLUSTRATION) {
- //to do, in next phase of project
- jsonPath = '~/../content/data/json/ci/ci_dat_contentlist.json';
- }
-
- var promise = DataService.getJson(jsonPath)
- promise.then(
- function (result) {
- var AtlasAnatomyData = result;
-
- var data = new jinqJs()
- .from($scope.AtlasAnatomyData.root.Item)
- .orderBy([{ field: '_Title', sort: 'asc' }])
- .select();
-
- // to do we can now load pin data here
- })
+ loadModuleDataBasedOnModuleName: function (moduleName) {
+
+ alert('loadModuleDataBasedOnModuleName is called');
+
+ var jsonPath;
+ 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
+ jsonPath = '~/../content/data/json/ca/ca_dat_contentlist.json';
+ }
+ else if (moduleName == CLINICAL_ILLUSTRATION) {
+ //to do, in next phase of project
+ jsonPath = '~/../content/data/json/ci/ci_dat_contentlist.json';
}
+
+ var promise = DataService.getJson(jsonPath)
+ .then(
+ function (result) {
+ var AtlasAnatomyData = result;
+
+ var data = new jinqJs()
+ .from(AtlasAnatomyData.root.Item)
+ .orderBy([{ field: '_Title', sort: 'asc' }])
+ .select();
+
+
+
+ angular.forEach(data, function (value, key) {
+ // $rootScope.moduleData = [];
+ //$scope.moduleData.push({ "id": value._Id, "imageID": value._ImageId, "TileName": value._TileImageName, "DivImageTitle": value._Title });
+ // $scope.moduleData.push(value._ImageId);
+ // $scope.moduleData.push(value._TileImageName);
+
+ var ImageName = value._TileImageName;
+ var imagePath = "~/../content/images/aa/thumbnails/" + value._TileImageName;
+ //$scope.TileViewId = value._Id;
+
+ $rootScope.tileHTML = $(''
+ + '
'
+ + '
![]()
'
+ + '
');//.appendTo('#grid-view');
+ debugger;
+ })
+
+ //if ($rootScope.tileHTML != undefined) {
+ // alert('come before broadcast')
+ // $rootScope.$broadcast('SendTileDataEvent', true);
+
+ //}
+
+ },
+ function (error) {
+ // handle errors here
+ console.log(' $rootScope.TermNumberData= ' + error.statusText);
+ }
+ )
}
-
+ }
+
+
-
-
-});
\ No newline at end of file
+}]);
+
\ No newline at end of file
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService456.js b/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService456.js
new file mode 100644
index 0000000..4b6fcd1
--- /dev/null
+++ b/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService456.js
@@ -0,0 +1,72 @@
+var ATLAS_ANATOMY = 'Atlas Anatomy';
+var CLINICAL_ILLUSTRATION = 'Clinical Illustrations';
+var CLINICAL_ANIMATION = 'Clinical Animations';
+var OpenedModuleItemList = [];
+var ModDetail = [];
+
+AIA.service("ModuleService", function ($http, $q, DataService) {
+
+ var deferred = $q.defer();
+
+ this.loadModuleDataBasedOnModuleName = function (moduleName) {
+ var tileHtml;
+
+
+ var jsonPath;
+ 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
+ jsonPath = '~/../content/data/json/ca/ca_dat_contentlist.json';
+ }
+ else if (moduleName == CLINICAL_ILLUSTRATION) {
+ //to do, in next phase of project
+ jsonPath = '~/../content/data/json/ci/ci_dat_contentlist.json';
+ }
+
+ var promise = DataService.getJson(jsonPath)
+ promise.then(
+ function (result) {
+ var AtlasAnatomyData = result;
+
+ var data = new jinqJs()
+ .from(AtlasAnatomyData.root.Item)
+ .orderBy([{ field: '_Title', sort: 'asc' }])
+ .select();
+
+ var tileHTML;
+
+ angular.forEach(data, function (value, key) {
+ // $rootScope.moduleData = [];
+ //$scope.moduleData.push({ "id": value._Id, "imageID": value._ImageId, "TileName": value._TileImageName, "DivImageTitle": value._Title });
+ // $scope.moduleData.push(value._ImageId);
+ // $scope.moduleData.push(value._TileImageName);
+
+ var ImageName = value._TileImageName;
+ var imagePath = "~/../content/images/aa/thumbnails/" + value._TileImageName;
+ //$scope.TileViewId = value._Id;
+
+ tileHTML = $(''
+ + '
'
+ + '
![]()
'
+ + '
');//.appendTo('#grid-view');
+ })
+ var deferred = $q.defer();
+ return tileHTML
+ .then(function (response) {
+ // promise is fulfilled
+ //debugger;
+ deferred.resolve(response.data);
+ // promise is returned
+ return deferred.promise;
+ }, function (response) {
+ // the following line rejects the promise
+ deferred.reject(response);
+ // promise is returned
+ return deferred.promise;
+ })
+ ;
+ }
+ )}
+});
\ No newline at end of file