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 = $('
  • ' + $scope.listCurriculumBuilder.slideshows.slideshow[i]._label + '
  • ').appendTo('#leftBodyViewList'); - $compile($el)($scope); - } - - $scope.countRightlist = Object.keys($scope.listCurriculumBuilder.slideshows.slideshow).length; - for (var i = $scope.countLeftlist; i < $scope.countRightlist; i++) { - console.log($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); - var $el1 = $('
  • ' + $scope.listCurriculumBuilder.slideshows.slideshow[i]._label + '
  • ').appendTo('#rightBodyViewList'); - $compile($el)($scope); - } - - } - - $scope.loadSlideShowXmldata = function (e) { - - // alert(e); - $http({ method: 'GET', url: 'content/data/json/cb/SlideShow/AIA_Curriculum_Builder_Guide.sldshw' }).success(function (data) { - - $scope.dataPopup = data; - alert($scope.dataPopup); - }) - .error(function (data, status, headers, config) { - console.log(data); - }); - } -}] - - - + 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 = $('
  • ' + $scope.listCurriculumBuilder.slideshows.slideshow[i]._label + '
  • ').appendTo('#leftBodyViewList'); + $compile($el)($scope); + } + + $scope.countRightlist = Object.keys($scope.listCurriculumBuilder.slideshows.slideshow).length; + for (var i = $scope.countLeftlist; i < $scope.countRightlist; i++) { + console.log($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); + var $el1 = $('
  • ' + $scope.listCurriculumBuilder.slideshows.slideshow[i]._label + '
  • ').appendTo('#rightBodyViewList'); + $compile($el)($scope); + } + + } + + $scope.loadSlideShowXmldata = function (e) { + + // alert(e); + $http({ method: 'GET', url: 'content/data/json/cb/SlideShow/AIA_Curriculum_Builder_Guide.sldshw' }).success(function (data) { + + $scope.dataPopup = data; + alert($scope.dataPopup); + }) + .error(function (data, status, headers, config) { + console.log(data); + }); + } +}] + + + ); \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 35add25..2cf3951 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -367,14 +367,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var currentURL = $location.path(); var selectedModuleName = ''; angular.forEach( $rootScope.userModules, function (value, key) { - // alert(value.slug + 'and currentURL= ' + currentURL + 'NAD value.name= ' + value.name); if (value.slug === currentURL.replace('/','')) { selectedModuleName = value.name; - // alert('moduleName= '+moduleName) } $rootScope.currentActiveModuleTitle = selectedModuleName; }) + var currentSlug = currentURL.replace('/', ''); + + $("#nav ul li a").each(function () { + if ($(this).attr("href") == currentURL || $(this).attr("href") == '') + // $(this).addClass("active"); + // $(this).closest('li').addClass('active'); + $(this).parent().addClass('active'); + }); $rootScope.ClearIframe(); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js index 80bc3bd..6e2da7f 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js @@ -1,6 +1,6 @@ /// -AIA.controller("LabExercController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce',"$compile", -function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile) { +AIA.controller("LabExercController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce',"$compile","$location", +function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile, $location) { $scope.$sce = $sce; $scope.LabExerciseName; $scope.LabExerciseQuiz = null; @@ -15,6 +15,18 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location $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; + }) + $scope.showme = false; $rootScope.currentActiveModuleTitle = pages[8].name; $scope.getLabExerciseModules(); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html b/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html index af46d1a..4c1946f 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html @@ -25,7 +25,7 @@