diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 30e9404..87a7014 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -9,19 +9,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod var moduleData = []; - $scope.AllBodyRegion = []; - $scope.AllBodySystem = []; - $scope.AllOrientation = []; + $scope.AllBodyRegion = []; + $scope.AllBodySystem = []; + $scope.AllOrientation = []; $scope.AllImageType = []; $scope.loadForModuleById = function (moduleId) { - - $scope.moduleId = moduleId; - - console.log('loadForModuleById is called') - var moduleName = Modules[moduleId].Name; - - $scope.loadDataForModule(moduleName); + + $scope.moduleId = moduleId; + + console.log('loadForModuleById is called') + var moduleName = Modules[moduleId].Name; + + $scope.loadDataForModule(moduleName); } $scope.loadDataForModule = function (moduleName) @@ -29,14 +29,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod //0. load filter static data - $scope.AllBodyRegion = BodyRegions; - $scope.AllBodySystem = BodySystems; - $scope.AllOrientation = ViewOrientations; + $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) + if(moduleName==ATLAS_ANATOMY) { jsonPath ='~/../content/data/json/aa/aa_dat_contentlist.json'; } @@ -51,53 +51,54 @@ function ($scope, $rootScope, $compile, $http, $log, $location, BodyRegions, Bod jsonPath ='~/../content/data/json/ci/ci_dat_contentlist.json'; } - var promise = DataService.getJson(jsonPath) - promise.then( + 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(); + $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) { - var obj = {}; - obj.moduleId = value._Id; - //moduleData.push(value._Id); - - $scope.ImageName = value._TileImageName; - $scope.imagePath = "~/../content/images/aa/thumbnails/" + value._TileImageName; - $scope.TileViewId = value._Id; - - var $el = $('
' + value._Title + '
' + value._Title + '