diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js index 13f2a97..ab137c3 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js @@ -1,11 +1,23 @@ AIA.controller("3dAController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce', "$compile", function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile) { - $rootScope.currentActiveModuleTitle = pages[5].name; + // $rootScope.currentActiveModuleTitle = pages[5].name; $scope.showme = false; $scope.threedanatomyData; $scope.Id; $scope.$on('$viewContentLoaded', function (event) { + + //get current path + var currentURL = $location.path(); + var selectedModuleName = ''; + //set module title + angular.forEach($rootScope.userModules, function (value, key) { + if (value.slug === currentURL.replace('/', '')) { + selectedModuleName = value.name; + } + $rootScope.currentActiveModuleTitle = selectedModuleName; + }) + $scope.GetBodySystemNames(); //$scope.scroll(); }); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/ADAMImgController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/ADAMImgController.js index a95fc65..0d4bcde 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/ADAMImgController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/ADAMImgController.js @@ -1,5 +1,5 @@ -AIA.controller("ADAMImgController", ["$scope", "$rootScope", "pages", "$log", -function ($scope, $rootScope, pages, log) { +AIA.controller("ADAMImgController", ["$scope", "$rootScope", "pages", "$log","$location", +function ($scope, $rootScope, pages, log, $location) { $scope.showme = true; $scope.IsVisible = function () { $scope.scroll(); @@ -11,7 +11,22 @@ function ($scope, $rootScope, pages, log) { $("html,body").scrollTop(0); //alert("scroll"); } - $rootScope.currentActiveModuleTitle = pages[9].name; + $scope.$on('$viewContentLoaded', function (event) { + // code that will be executed ... + // every time this view is loaded + + //get current path + var currentURL = $location.path(); + var selectedModuleName = ''; + //set module title + angular.forEach($rootScope.userModules, function (value, key) { + if (value.slug === currentURL.replace('/', '')) { + selectedModuleName = value.name; + } + $rootScope.currentActiveModuleTitle = selectedModuleName; + }) + }) + }] diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js index 6bf16e9..ddee674 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js @@ -1,5 +1,5 @@ -AIA.controller("AODController", ["$scope", "$rootScope", "pages", "$log", -function ($scope, $rootScope, pages, log) { +AIA.controller("AODController", ["$scope", "$rootScope", "pages", "$log","$location", +function ($scope, $rootScope, pages, log, $location) { //$scope.showme = true; //$scope.IsVisible = function () { // $scope.scroll(); @@ -22,13 +22,24 @@ function ($scope, $rootScope, pages, log) { // code that will be executed ... // every time this view is loaded + //get current path + var currentURL = $location.path(); + var selectedModuleName = ''; + //set module title + angular.forEach($rootScope.userModules, function (value, key) { + if (value.slug === currentURL.replace('/', '')) { + selectedModuleName = value.name; + } + $rootScope.currentActiveModuleTitle = selectedModuleName; + }) + $scope.showme = true; $scope.IsVisible = function () { $scope.scroll(); } - $rootScope.currentActiveModuleTitle = pages[10].name; + // $rootScope.currentActiveModuleTitle = pages[10].name; //set the local storage diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AnatTestController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AnatTestController.js index 8da4735..3fe229a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AnatTestController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AnatTestController.js @@ -1,5 +1,5 @@ -AIA.controller("AnatTestController", ["$scope", "$rootScope", "pages", "$log", -function ($scope, $rootScope, pages, log) { +AIA.controller("AnatTestController", ["$scope", "$rootScope", "pages", "$log", "$location", +function ($scope, $rootScope, pages, log, $location) { $scope.showme = false; $scope.IsVisible = function () { $scope.scroll(); @@ -11,7 +11,24 @@ function ($scope, $rootScope, pages, log) { $("html,body").scrollTop(0); //alert("scroll"); } - $rootScope.currentActiveModuleTitle = pages[7].name; + + $scope.$on('$viewContentLoaded', function (event) { + // code that will be executed ... + // every time this view is loaded + + //get current path + var currentURL = $location.path(); + var selectedModuleName = ''; + //set module title + angular.forEach($rootScope.userModules, function (value, key) { + if (value.slug === currentURL.replace('/', '')) { + selectedModuleName = value.name; + } + $rootScope.currentActiveModuleTitle = selectedModuleName; + }) + }) + + // $rootScope.currentActiveModuleTitle = pages[7].name; }] ); \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index 7778607..87a718c 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -1,6 +1,6 @@ AIA.controller("CAController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "pages", "BodyRegions", "BodySystems", "MedicalSpecialties", "DataService", function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, pages, BodyRegions, BodySystems, MedicalSpecialties, DataService) { - $rootScope.currentActiveModuleTitle = pages[4].name; + // $rootScope.currentActiveModuleTitle = pages[4].name; $scope.showme = true; $scope.AnimationData; $scope.CAAllBodyRegion = []; @@ -30,6 +30,18 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout // code that will be executed ... // every time this view is loaded + //get current path + var currentURL = $location.path(); + var selectedModuleName = ''; + //set module title + angular.forEach($rootScope.userModules, function (value, key) { + if (value.slug === currentURL.replace('/', '')) { + selectedModuleName = value.name; + } + $rootScope.currentActiveModuleTitle = selectedModuleName; + }) + + $scope.LoadCAJsonData(); $scope.CAAllBodyRegion = BodyRegions; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js index 042ca99..eef0825 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js @@ -1,6 +1,6 @@ AIA.controller("CIController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "pages", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "MedicalSpecialties", "DataService", function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, pages, BodyRegions, BodySystems, ViewOrientations, ImageTypes, MedicalSpecialties, DataService) { - $rootScope.currentActiveModuleTitle = pages[3].name; + // $rootScope.currentActiveModuleTitle = pages[3].name; $scope.showme = true; $scope.IllustrationData; $scope.CIAllBodyRegion = []; @@ -35,6 +35,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout // code that will be executed ... // every time this view is loaded + //get current path + var currentURL = $location.path(); + var selectedModuleName = ''; + //set module title + angular.forEach($rootScope.userModules, function (value, key) { + if (value.slug === currentURL.replace('/', '')) { + selectedModuleName = value.name; + } + $rootScope.currentActiveModuleTitle = selectedModuleName; + }) + $scope.LoadCIJsonData(); $scope.CIAllBodyRegion = BodyRegions; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index c0c7263..060cc24 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -1,77 +1,87 @@ -AIA.controller("CurrBuildController", ["$scope", "$rootScope", "pages", "$log","Modules","$http","$compile", -function ($scope, $rootScope, pages, log,Modules,$http,$compile) { - - $rootScope.currentActiveModuleTitle = pages[6].name; - $scope.showme = false; - $scope.listCurriculumBuilder = null; - $scope.dataPopup = null; - $scope.countLeftlist; - $scope.countRightlist; - $scope.IsVisible = function () { - $scope.scroll(); - - } - - $scope.scroll = function () { - // $window.scrollTo(0, 0); - $("html,body").scrollTop(0); - //alert("scroll"); - } - //load json data - $scope.loadCurriculumBuiderData = function () { - +AIA.controller("CurrBuildController", ["$scope", "$rootScope", "pages", "$log", "Modules", "$http", "$compile", "$location", +function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location) { + + // $rootScope.currentActiveModuleTitle = pages[6].name; + $scope.showme = false; + $scope.listCurriculumBuilder = null; + $scope.dataPopup = null; + $scope.countLeftlist; + $scope.countRightlist; + $scope.IsVisible = function () { + $scope.scroll(); + + } + + $scope.scroll = function () { + // $window.scrollTo(0, 0); + $("html,body").scrollTop(0); + //alert("scroll"); + } + //load json data + $scope.loadCurriculumBuiderData = function () { + + //get current path + var currentURL = $location.path(); + var selectedModuleName = ''; + //set module title + angular.forEach($rootScope.userModules, function (value, key) { + if (value.slug === currentURL.replace('/', '')) { + selectedModuleName = value.name; + } + $rootScope.currentActiveModuleTitle = selectedModuleName; + }) //get current path - var currentURL = $location.path(); - - $http({ method: 'GET', url: 'content/data/json/cb/cb_list_content.json' }).success(function (data) { - - $scope.listCurriculumBuilder = data; - //load default body view list - $scope.getCBViewList(); - }) - .error(function (data, status, headers, config) { - console.log(data); - }); - } - //get CB body view list - $scope.getCBViewList = function ($event) { - - $('#leftBodyViewList').empty(); - $scope.countLeftlist = Object.keys($scope.listCurriculumBuilder.slideshows.slideshow).length / 2; - $scope.loadleftBodyViewList = new jinqJs() - .from($scope.listCurriculumBuilder.slideshows.slideshow) - .select(); - for (var i = 0; i < $scope.countLeftlist; i++) { - console.log($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); - //alert($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); - var $el = $('