Commit aa922a088d92ddbfc23067e0c8b53d6d1f4bdc96
1 parent
8845454a
now title of module is dynamic.
issue in selection color.
Showing
10 changed files
with
264 additions
and
159 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
1 | AIA.controller("3dAController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce', "$compile", | 1 | AIA.controller("3dAController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce', "$compile", |
2 | function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile) { | 2 | function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile) { |
3 | 3 | ||
4 | - $rootScope.currentActiveModuleTitle = pages[5].name; | 4 | + // $rootScope.currentActiveModuleTitle = pages[5].name; |
5 | $scope.showme = false; | 5 | $scope.showme = false; |
6 | $scope.threedanatomyData; | 6 | $scope.threedanatomyData; |
7 | $scope.Id; | 7 | $scope.Id; |
8 | $scope.$on('$viewContentLoaded', function (event) { | 8 | $scope.$on('$viewContentLoaded', function (event) { |
9 | + | ||
10 | + //get current path | ||
11 | + var currentURL = $location.path(); | ||
12 | + var selectedModuleName = ''; | ||
13 | + //set module title | ||
14 | + angular.forEach($rootScope.userModules, function (value, key) { | ||
15 | + if (value.slug === currentURL.replace('/', '')) { | ||
16 | + selectedModuleName = value.name; | ||
17 | + } | ||
18 | + $rootScope.currentActiveModuleTitle = selectedModuleName; | ||
19 | + }) | ||
20 | + | ||
9 | $scope.GetBodySystemNames(); | 21 | $scope.GetBodySystemNames(); |
10 | //$scope.scroll(); | 22 | //$scope.scroll(); |
11 | }); | 23 | }); |
400-SOURCECODE/AIAHTML5.Web/app/controllers/ADAMImgController.js
1 | -AIA.controller("ADAMImgController", ["$scope", "$rootScope", "pages", "$log", | ||
2 | -function ($scope, $rootScope, pages, log) { | 1 | +AIA.controller("ADAMImgController", ["$scope", "$rootScope", "pages", "$log","$location", |
2 | +function ($scope, $rootScope, pages, log, $location) { | ||
3 | $scope.showme = true; | 3 | $scope.showme = true; |
4 | $scope.IsVisible = function () { | 4 | $scope.IsVisible = function () { |
5 | $scope.scroll(); | 5 | $scope.scroll(); |
@@ -11,7 +11,22 @@ function ($scope, $rootScope, pages, log) { | @@ -11,7 +11,22 @@ function ($scope, $rootScope, pages, log) { | ||
11 | $("html,body").scrollTop(0); | 11 | $("html,body").scrollTop(0); |
12 | //alert("scroll"); | 12 | //alert("scroll"); |
13 | } | 13 | } |
14 | - $rootScope.currentActiveModuleTitle = pages[9].name; | 14 | + $scope.$on('$viewContentLoaded', function (event) { |
15 | + // code that will be executed ... | ||
16 | + // every time this view is loaded | ||
17 | + | ||
18 | + //get current path | ||
19 | + var currentURL = $location.path(); | ||
20 | + var selectedModuleName = ''; | ||
21 | + //set module title | ||
22 | + angular.forEach($rootScope.userModules, function (value, key) { | ||
23 | + if (value.slug === currentURL.replace('/', '')) { | ||
24 | + selectedModuleName = value.name; | ||
25 | + } | ||
26 | + $rootScope.currentActiveModuleTitle = selectedModuleName; | ||
27 | + }) | ||
28 | + }) | ||
29 | + | ||
15 | }] | 30 | }] |
16 | 31 | ||
17 | 32 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js
1 | -AIA.controller("AODController", ["$scope", "$rootScope", "pages", "$log", | ||
2 | -function ($scope, $rootScope, pages, log) { | 1 | +AIA.controller("AODController", ["$scope", "$rootScope", "pages", "$log","$location", |
2 | +function ($scope, $rootScope, pages, log, $location) { | ||
3 | //$scope.showme = true; | 3 | //$scope.showme = true; |
4 | //$scope.IsVisible = function () { | 4 | //$scope.IsVisible = function () { |
5 | // $scope.scroll(); | 5 | // $scope.scroll(); |
@@ -22,13 +22,24 @@ function ($scope, $rootScope, pages, log) { | @@ -22,13 +22,24 @@ function ($scope, $rootScope, pages, log) { | ||
22 | // code that will be executed ... | 22 | // code that will be executed ... |
23 | // every time this view is loaded | 23 | // every time this view is loaded |
24 | 24 | ||
25 | + //get current path | ||
26 | + var currentURL = $location.path(); | ||
27 | + var selectedModuleName = ''; | ||
28 | + //set module title | ||
29 | + angular.forEach($rootScope.userModules, function (value, key) { | ||
30 | + if (value.slug === currentURL.replace('/', '')) { | ||
31 | + selectedModuleName = value.name; | ||
32 | + } | ||
33 | + $rootScope.currentActiveModuleTitle = selectedModuleName; | ||
34 | + }) | ||
35 | + | ||
25 | $scope.showme = true; | 36 | $scope.showme = true; |
26 | $scope.IsVisible = function () { | 37 | $scope.IsVisible = function () { |
27 | $scope.scroll(); | 38 | $scope.scroll(); |
28 | 39 | ||
29 | } | 40 | } |
30 | 41 | ||
31 | - $rootScope.currentActiveModuleTitle = pages[10].name; | 42 | + // $rootScope.currentActiveModuleTitle = pages[10].name; |
32 | 43 | ||
33 | //set the local storage | 44 | //set the local storage |
34 | 45 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/AnatTestController.js
1 | -AIA.controller("AnatTestController", ["$scope", "$rootScope", "pages", "$log", | ||
2 | -function ($scope, $rootScope, pages, log) { | 1 | +AIA.controller("AnatTestController", ["$scope", "$rootScope", "pages", "$log", "$location", |
2 | +function ($scope, $rootScope, pages, log, $location) { | ||
3 | $scope.showme = false; | 3 | $scope.showme = false; |
4 | $scope.IsVisible = function () { | 4 | $scope.IsVisible = function () { |
5 | $scope.scroll(); | 5 | $scope.scroll(); |
@@ -11,7 +11,24 @@ function ($scope, $rootScope, pages, log) { | @@ -11,7 +11,24 @@ function ($scope, $rootScope, pages, log) { | ||
11 | $("html,body").scrollTop(0); | 11 | $("html,body").scrollTop(0); |
12 | //alert("scroll"); | 12 | //alert("scroll"); |
13 | } | 13 | } |
14 | - $rootScope.currentActiveModuleTitle = pages[7].name; | 14 | + |
15 | + $scope.$on('$viewContentLoaded', function (event) { | ||
16 | + // code that will be executed ... | ||
17 | + // every time this view is loaded | ||
18 | + | ||
19 | + //get current path | ||
20 | + var currentURL = $location.path(); | ||
21 | + var selectedModuleName = ''; | ||
22 | + //set module title | ||
23 | + angular.forEach($rootScope.userModules, function (value, key) { | ||
24 | + if (value.slug === currentURL.replace('/', '')) { | ||
25 | + selectedModuleName = value.name; | ||
26 | + } | ||
27 | + $rootScope.currentActiveModuleTitle = selectedModuleName; | ||
28 | + }) | ||
29 | + }) | ||
30 | + | ||
31 | + // $rootScope.currentActiveModuleTitle = pages[7].name; | ||
15 | }] | 32 | }] |
16 | 33 | ||
17 | ); | 34 | ); |
18 | \ No newline at end of file | 35 | \ No newline at end of file |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
1 | AIA.controller("CAController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "pages", "BodyRegions", "BodySystems", "MedicalSpecialties", "DataService", | 1 | AIA.controller("CAController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "pages", "BodyRegions", "BodySystems", "MedicalSpecialties", "DataService", |
2 | function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, pages, BodyRegions, BodySystems, MedicalSpecialties, DataService) { | 2 | function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, pages, BodyRegions, BodySystems, MedicalSpecialties, DataService) { |
3 | - $rootScope.currentActiveModuleTitle = pages[4].name; | 3 | + // $rootScope.currentActiveModuleTitle = pages[4].name; |
4 | $scope.showme = true; | 4 | $scope.showme = true; |
5 | $scope.AnimationData; | 5 | $scope.AnimationData; |
6 | $scope.CAAllBodyRegion = []; | 6 | $scope.CAAllBodyRegion = []; |
@@ -30,6 +30,18 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -30,6 +30,18 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
30 | // code that will be executed ... | 30 | // code that will be executed ... |
31 | // every time this view is loaded | 31 | // every time this view is loaded |
32 | 32 | ||
33 | + //get current path | ||
34 | + var currentURL = $location.path(); | ||
35 | + var selectedModuleName = ''; | ||
36 | + //set module title | ||
37 | + angular.forEach($rootScope.userModules, function (value, key) { | ||
38 | + if (value.slug === currentURL.replace('/', '')) { | ||
39 | + selectedModuleName = value.name; | ||
40 | + } | ||
41 | + $rootScope.currentActiveModuleTitle = selectedModuleName; | ||
42 | + }) | ||
43 | + | ||
44 | + | ||
33 | $scope.LoadCAJsonData(); | 45 | $scope.LoadCAJsonData(); |
34 | 46 | ||
35 | $scope.CAAllBodyRegion = BodyRegions; | 47 | $scope.CAAllBodyRegion = BodyRegions; |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
1 | AIA.controller("CIController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "pages", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "MedicalSpecialties", "DataService", | 1 | AIA.controller("CIController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "pages", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "MedicalSpecialties", "DataService", |
2 | function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, pages, BodyRegions, BodySystems, ViewOrientations, ImageTypes, MedicalSpecialties, DataService) { | 2 | function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, pages, BodyRegions, BodySystems, ViewOrientations, ImageTypes, MedicalSpecialties, DataService) { |
3 | - $rootScope.currentActiveModuleTitle = pages[3].name; | 3 | + // $rootScope.currentActiveModuleTitle = pages[3].name; |
4 | $scope.showme = true; | 4 | $scope.showme = true; |
5 | $scope.IllustrationData; | 5 | $scope.IllustrationData; |
6 | $scope.CIAllBodyRegion = []; | 6 | $scope.CIAllBodyRegion = []; |
@@ -35,6 +35,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -35,6 +35,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
35 | // code that will be executed ... | 35 | // code that will be executed ... |
36 | // every time this view is loaded | 36 | // every time this view is loaded |
37 | 37 | ||
38 | + //get current path | ||
39 | + var currentURL = $location.path(); | ||
40 | + var selectedModuleName = ''; | ||
41 | + //set module title | ||
42 | + angular.forEach($rootScope.userModules, function (value, key) { | ||
43 | + if (value.slug === currentURL.replace('/', '')) { | ||
44 | + selectedModuleName = value.name; | ||
45 | + } | ||
46 | + $rootScope.currentActiveModuleTitle = selectedModuleName; | ||
47 | + }) | ||
48 | + | ||
38 | $scope.LoadCIJsonData(); | 49 | $scope.LoadCIJsonData(); |
39 | 50 | ||
40 | $scope.CIAllBodyRegion = BodyRegions; | 51 | $scope.CIAllBodyRegion = BodyRegions; |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
1 | -AIA.controller("CurrBuildController", ["$scope", "$rootScope", "pages", "$log","Modules","$http","$compile", | ||
2 | -function ($scope, $rootScope, pages, log,Modules,$http,$compile) { | ||
3 | - | ||
4 | - $rootScope.currentActiveModuleTitle = pages[6].name; | ||
5 | - $scope.showme = false; | ||
6 | - $scope.listCurriculumBuilder = null; | ||
7 | - $scope.dataPopup = null; | ||
8 | - $scope.countLeftlist; | ||
9 | - $scope.countRightlist; | ||
10 | - $scope.IsVisible = function () { | ||
11 | - $scope.scroll(); | ||
12 | - | ||
13 | - } | ||
14 | - | ||
15 | - $scope.scroll = function () { | ||
16 | - // $window.scrollTo(0, 0); | ||
17 | - $("html,body").scrollTop(0); | ||
18 | - //alert("scroll"); | ||
19 | - } | ||
20 | - //load json data | ||
21 | - $scope.loadCurriculumBuiderData = function () { | ||
22 | - | 1 | +AIA.controller("CurrBuildController", ["$scope", "$rootScope", "pages", "$log", "Modules", "$http", "$compile", "$location", |
2 | +function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location) { | ||
3 | + | ||
4 | + // $rootScope.currentActiveModuleTitle = pages[6].name; | ||
5 | + $scope.showme = false; | ||
6 | + $scope.listCurriculumBuilder = null; | ||
7 | + $scope.dataPopup = null; | ||
8 | + $scope.countLeftlist; | ||
9 | + $scope.countRightlist; | ||
10 | + $scope.IsVisible = function () { | ||
11 | + $scope.scroll(); | ||
12 | + | ||
13 | + } | ||
14 | + | ||
15 | + $scope.scroll = function () { | ||
16 | + // $window.scrollTo(0, 0); | ||
17 | + $("html,body").scrollTop(0); | ||
18 | + //alert("scroll"); | ||
19 | + } | ||
20 | + //load json data | ||
21 | + $scope.loadCurriculumBuiderData = function () { | ||
22 | + | ||
23 | + //get current path | ||
24 | + var currentURL = $location.path(); | ||
25 | + var selectedModuleName = ''; | ||
26 | + //set module title | ||
27 | + angular.forEach($rootScope.userModules, function (value, key) { | ||
28 | + if (value.slug === currentURL.replace('/', '')) { | ||
29 | + selectedModuleName = value.name; | ||
30 | + } | ||
31 | + $rootScope.currentActiveModuleTitle = selectedModuleName; | ||
32 | + }) | ||
23 | 33 | ||
24 | //get current path | 34 | //get current path |
25 | - var currentURL = $location.path(); | ||
26 | - | ||
27 | - $http({ method: 'GET', url: 'content/data/json/cb/cb_list_content.json' }).success(function (data) { | ||
28 | - | ||
29 | - $scope.listCurriculumBuilder = data; | ||
30 | - //load default body view list | ||
31 | - $scope.getCBViewList(); | ||
32 | - }) | ||
33 | - .error(function (data, status, headers, config) { | ||
34 | - console.log(data); | ||
35 | - }); | ||
36 | - } | ||
37 | - //get CB body view list | ||
38 | - $scope.getCBViewList = function ($event) { | ||
39 | - | ||
40 | - $('#leftBodyViewList').empty(); | ||
41 | - $scope.countLeftlist = Object.keys($scope.listCurriculumBuilder.slideshows.slideshow).length / 2; | ||
42 | - $scope.loadleftBodyViewList = new jinqJs() | ||
43 | - .from($scope.listCurriculumBuilder.slideshows.slideshow) | ||
44 | - .select(); | ||
45 | - for (var i = 0; i < $scope.countLeftlist; i++) { | ||
46 | - console.log($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); | ||
47 | - //alert($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); | ||
48 | - var $el = $('<li class="list-group-item" data-toggle="modal" data-target="#myModal-1" ng-click="loadSlideShowXmldata()"><a href="#"><i class="fa fa-check"></i>' + $scope.listCurriculumBuilder.slideshows.slideshow[i]._label + '</a></li>').appendTo('#leftBodyViewList'); | ||
49 | - $compile($el)($scope); | ||
50 | - } | ||
51 | - | ||
52 | - $scope.countRightlist = Object.keys($scope.listCurriculumBuilder.slideshows.slideshow).length; | ||
53 | - for (var i = $scope.countLeftlist; i < $scope.countRightlist; i++) { | ||
54 | - console.log($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); | ||
55 | - var $el1 = $('<li class="list-group-item" data-toggle="modal" ng-click="loadSlideShowXmldata()" data-target="#myModal-1"><a href="#"><i class="fa fa-check"></i>' + $scope.listCurriculumBuilder.slideshows.slideshow[i]._label + '</a></li>').appendTo('#rightBodyViewList'); | ||
56 | - $compile($el)($scope); | ||
57 | - } | ||
58 | - | ||
59 | - } | ||
60 | - | ||
61 | - $scope.loadSlideShowXmldata = function (e) { | ||
62 | - | ||
63 | - // alert(e); | ||
64 | - $http({ method: 'GET', url: 'content/data/json/cb/SlideShow/AIA_Curriculum_Builder_Guide.sldshw' }).success(function (data) { | ||
65 | - | ||
66 | - $scope.dataPopup = data; | ||
67 | - alert($scope.dataPopup); | ||
68 | - }) | ||
69 | - .error(function (data, status, headers, config) { | ||
70 | - console.log(data); | ||
71 | - }); | ||
72 | - } | ||
73 | -}] | ||
74 | - | ||
75 | - | ||
76 | - | 35 | + var currentURL = $location.path(); |
36 | + | ||
37 | + $http({ method: 'GET', url: 'content/data/json/cb/cb_list_content.json' }).success(function (data) { | ||
38 | + | ||
39 | + $scope.listCurriculumBuilder = data; | ||
40 | + //load default body view list | ||
41 | + $scope.getCBViewList(); | ||
42 | + }) | ||
43 | + .error(function (data, status, headers, config) { | ||
44 | + console.log(data); | ||
45 | + }); | ||
46 | + } | ||
47 | + //get CB body view list | ||
48 | + $scope.getCBViewList = function ($event) { | ||
49 | + | ||
50 | + $('#leftBodyViewList').empty(); | ||
51 | + $scope.countLeftlist = Object.keys($scope.listCurriculumBuilder.slideshows.slideshow).length / 2; | ||
52 | + $scope.loadleftBodyViewList = new jinqJs() | ||
53 | + .from($scope.listCurriculumBuilder.slideshows.slideshow) | ||
54 | + .select(); | ||
55 | + for (var i = 0; i < $scope.countLeftlist; i++) { | ||
56 | + console.log($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); | ||
57 | + //alert($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); | ||
58 | + var $el = $('<li class="list-group-item" data-toggle="modal" data-target="#myModal-1" ng-click="loadSlideShowXmldata()"><a href="#"><i class="fa fa-check"></i>' + $scope.listCurriculumBuilder.slideshows.slideshow[i]._label + '</a></li>').appendTo('#leftBodyViewList'); | ||
59 | + $compile($el)($scope); | ||
60 | + } | ||
61 | + | ||
62 | + $scope.countRightlist = Object.keys($scope.listCurriculumBuilder.slideshows.slideshow).length; | ||
63 | + for (var i = $scope.countLeftlist; i < $scope.countRightlist; i++) { | ||
64 | + console.log($scope.listCurriculumBuilder.slideshows.slideshow[i]._label); | ||
65 | + var $el1 = $('<li class="list-group-item" data-toggle="modal" ng-click="loadSlideShowXmldata()" data-target="#myModal-1"><a href="#"><i class="fa fa-check"></i>' + $scope.listCurriculumBuilder.slideshows.slideshow[i]._label + '</a></li>').appendTo('#rightBodyViewList'); | ||
66 | + $compile($el)($scope); | ||
67 | + } | ||
68 | + | ||
69 | + } | ||
70 | + | ||
71 | + $scope.loadSlideShowXmldata = function (e) { | ||
72 | + | ||
73 | + // alert(e); | ||
74 | + $http({ method: 'GET', url: 'content/data/json/cb/SlideShow/AIA_Curriculum_Builder_Guide.sldshw' }).success(function (data) { | ||
75 | + | ||
76 | + $scope.dataPopup = data; | ||
77 | + alert($scope.dataPopup); | ||
78 | + }) | ||
79 | + .error(function (data, status, headers, config) { | ||
80 | + console.log(data); | ||
81 | + }); | ||
82 | + } | ||
83 | +}] | ||
84 | + | ||
85 | + | ||
86 | + | ||
77 | ); | 87 | ); |
78 | \ No newline at end of file | 88 | \ No newline at end of file |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -367,14 +367,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -367,14 +367,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
367 | var currentURL = $location.path(); | 367 | var currentURL = $location.path(); |
368 | var selectedModuleName = ''; | 368 | var selectedModuleName = ''; |
369 | angular.forEach( $rootScope.userModules, function (value, key) { | 369 | angular.forEach( $rootScope.userModules, function (value, key) { |
370 | - // alert(value.slug + 'and currentURL= ' + currentURL + 'NAD value.name= ' + value.name); | ||
371 | if (value.slug === currentURL.replace('/','')) { | 370 | if (value.slug === currentURL.replace('/','')) { |
372 | selectedModuleName = value.name; | 371 | selectedModuleName = value.name; |
373 | - // alert('moduleName= '+moduleName) | ||
374 | } | 372 | } |
375 | $rootScope.currentActiveModuleTitle = selectedModuleName; | 373 | $rootScope.currentActiveModuleTitle = selectedModuleName; |
376 | }) | 374 | }) |
377 | 375 | ||
376 | + var currentSlug = currentURL.replace('/', ''); | ||
377 | + | ||
378 | + $("#nav ul li a").each(function () { | ||
379 | + if ($(this).attr("href") == currentURL || $(this).attr("href") == '') | ||
380 | + // $(this).addClass("active"); | ||
381 | + // $(this).closest('li').addClass('active'); | ||
382 | + $(this).parent().addClass('active'); | ||
383 | + }); | ||
378 | 384 | ||
379 | $rootScope.ClearIframe(); | 385 | $rootScope.ClearIframe(); |
380 | 386 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
1 | /// <reference path="../../content/data/json/le/LabExercise.js" /> | 1 | /// <reference path="../../content/data/json/le/LabExercise.js" /> |
2 | -AIA.controller("LabExercController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce',"$compile", | ||
3 | -function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile) { | 2 | +AIA.controller("LabExercController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce',"$compile","$location", |
3 | +function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile, $location) { | ||
4 | $scope.$sce = $sce; | 4 | $scope.$sce = $sce; |
5 | $scope.LabExerciseName; | 5 | $scope.LabExerciseName; |
6 | $scope.LabExerciseQuiz = null; | 6 | $scope.LabExerciseQuiz = null; |
@@ -15,6 +15,18 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | @@ -15,6 +15,18 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location | ||
15 | $scope.$on('$viewContentLoaded', function (event) { | 15 | $scope.$on('$viewContentLoaded', function (event) { |
16 | // code that will be executed ... | 16 | // code that will be executed ... |
17 | // every time this view is loaded | 17 | // every time this view is loaded |
18 | + | ||
19 | + //get current path | ||
20 | + var currentURL = $location.path(); | ||
21 | + var selectedModuleName = ''; | ||
22 | + //set module title | ||
23 | + angular.forEach($rootScope.userModules, function (value, key) { | ||
24 | + if (value.slug === currentURL.replace('/', '')) { | ||
25 | + selectedModuleName = value.name; | ||
26 | + } | ||
27 | + $rootScope.currentActiveModuleTitle = selectedModuleName; | ||
28 | + }) | ||
29 | + | ||
18 | $scope.showme = false; | 30 | $scope.showme = false; |
19 | $rootScope.currentActiveModuleTitle = pages[8].name; | 31 | $rootScope.currentActiveModuleTitle = pages[8].name; |
20 | $scope.getLabExerciseModules(); | 32 | $scope.getLabExerciseModules(); |
400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | <div class="sidebar pull-left mCustomScrollbar _mCS_1 mCS-autoHide "> | 25 | <div class="sidebar pull-left mCustomScrollbar _mCS_1 mCS-autoHide "> |
26 | <!--{{name}}--> | 26 | <!--{{name}}--> |
27 | <ul class="nav nav-sidebar" ng-init="hideScrollbar()"> | 27 | <ul class="nav nav-sidebar" ng-init="hideScrollbar()"> |
28 | - <li ng-repeat="module in userModules"><a href="{{module.slug}}" ng-click="IsVisible()">{{module.name}}</a></li> | 28 | + <li ng-repeat="module in userModules"><a id="{{module.slug}}" href="{{module.slug}}" ng-click="IsVisible()">{{module.name}}</a></li> |
29 | <!--<li><a href="da-view-list" ng-click="IsVisible()">Dissectible Anatomy</a></li> | 29 | <!--<li><a href="da-view-list" ng-click="IsVisible()">Dissectible Anatomy</a></li> |
30 | <li><a href="3dAnatomy" ng-click="IsVisible()">3D Anatomy</a></li> | 30 | <li><a href="3dAnatomy" ng-click="IsVisible()">3D Anatomy</a></li> |
31 | <li><a href="clinical-illustrations" ng-click="IsVisible()">Clinical Illustrations</a></li> | 31 | <li><a href="clinical-illustrations" ng-click="IsVisible()">Clinical Illustrations</a></li> |
@@ -57,116 +57,115 @@ | @@ -57,116 +57,115 @@ | ||
57 | $('[data-toggle="tooltip"]').tooltip(); | 57 | $('[data-toggle="tooltip"]').tooltip(); |
58 | }) | 58 | }) |
59 | 59 | ||
60 | - var appPath = window.location.pathname; | 60 | + //var appPath = window.location.pathname; |
61 | 61 | ||
62 | - var appPathvalue = appPath.substring(appPath.lastIndexOf('/') + 1); | ||
63 | - | ||
64 | - | ||
65 | - if (appPathvalue == "da-view-list") { | 62 | + //var appPathvalue = appPath.substring(appPath.lastIndexOf('/') + 1); |
63 | + | ||
64 | + //if (appPathvalue == "da-view-list") { | ||
66 | 65 | ||
67 | - $(".nav-sidebar li a").removeClass('active'); | ||
68 | - $(".nav-sidebar li:first-child a").addClass('active'); | 66 | + // $(".nav-sidebar li a").removeClass('active'); |
67 | + // $(".nav-sidebar li:first-child a").addClass('active'); | ||
69 | 68 | ||
70 | - } | 69 | + //} |
71 | 70 | ||
72 | - else if (appPathvalue == "3dAnatomy") { | 71 | + //else if (appPathvalue == "3dAnatomy") { |
73 | 72 | ||
74 | - $(".nav-sidebar li a").removeClass('active'); | ||
75 | - $(".nav-sidebar li:nth-child(2) a").addClass('active'); | 73 | + // $(".nav-sidebar li a").removeClass('active'); |
74 | + // $(".nav-sidebar li:nth-child(2) a").addClass('active'); | ||
76 | 75 | ||
77 | - } | ||
78 | - else if (appPathvalue == "clinical-illustrations") { | 76 | + //} |
77 | + //else if (appPathvalue == "clinical-illustrations") { | ||
79 | 78 | ||
80 | - $(".nav-sidebar li a").removeClass('active'); | ||
81 | - $(".nav-sidebar li:nth-child(3) a").addClass('active'); | 79 | + // $(".nav-sidebar li a").removeClass('active'); |
80 | + // $(".nav-sidebar li:nth-child(3) a").addClass('active'); | ||
82 | 81 | ||
83 | 82 | ||
84 | - } | ||
85 | - else if (appPathvalue == "clinical-animations") { | 83 | + //} |
84 | + //else if (appPathvalue == "clinical-animations") { | ||
86 | 85 | ||
87 | - $(".nav-sidebar li a").removeClass('active'); | ||
88 | - $(".nav-sidebar li:nth-child(4) a").addClass('active'); | 86 | + // $(".nav-sidebar li a").removeClass('active'); |
87 | + // $(".nav-sidebar li:nth-child(4) a").addClass('active'); | ||
89 | 88 | ||
90 | 89 | ||
91 | - } | ||
92 | - else if (appPathvalue == "encyclopedia") { | 90 | + //} |
91 | + //else if (appPathvalue == "encyclopedia") { | ||
93 | 92 | ||
94 | - $(".nav-sidebar li a").removeClass('active'); | ||
95 | - $(".nav-sidebar li:nth-child(5) a").addClass('active'); | 93 | + // $(".nav-sidebar li a").removeClass('active'); |
94 | + // $(".nav-sidebar li:nth-child(5) a").addClass('active'); | ||
96 | 95 | ||
97 | 96 | ||
98 | - } | ||
99 | - else if (appPathvalue == "curriculum-builder") { | 97 | + //} |
98 | + //else if (appPathvalue == "curriculum-builder") { | ||
100 | 99 | ||
101 | - $(".nav-sidebar li a").removeClass('active'); | ||
102 | - $(".nav-sidebar li:nth-child(6) a").addClass('active'); | 100 | + // $(".nav-sidebar li a").removeClass('active'); |
101 | + // $(".nav-sidebar li:nth-child(6) a").addClass('active'); | ||
103 | 102 | ||
104 | 103 | ||
105 | - } | 104 | + //} |
106 | 105 | ||
107 | - else if (appPathvalue == "anatomy-test") { | 106 | + //else if (appPathvalue == "anatomy-test") { |
108 | 107 | ||
109 | - $(".nav-sidebar li a").removeClass('active'); | ||
110 | - $(".nav-sidebar li:nth-child(7) a").addClass('active'); | 108 | + // $(".nav-sidebar li a").removeClass('active'); |
109 | + // $(".nav-sidebar li:nth-child(7) a").addClass('active'); | ||
111 | 110 | ||
112 | 111 | ||
113 | - } | 112 | + //} |
114 | 113 | ||
115 | - else if (appPathvalue == "IP-10") { | 114 | + //else if (appPathvalue == "IP-10") { |
116 | 115 | ||
117 | - $(".nav-sidebar li a").removeClass('active'); | ||
118 | - $(".nav-sidebar li:nth-child(8) a").addClass('active'); | 116 | + // $(".nav-sidebar li a").removeClass('active'); |
117 | + // $(".nav-sidebar li:nth-child(8) a").addClass('active'); | ||
119 | 118 | ||
120 | - } | ||
121 | - else if (appPathvalue == "lab-exercises") { | 119 | + //} |
120 | + //else if (appPathvalue == "lab-exercises") { | ||
122 | 121 | ||
123 | - $(".nav-sidebar li a").removeClass('active'); | ||
124 | - $(".nav-sidebar li:nth-child(9) a").addClass('active'); | 122 | + // $(".nav-sidebar li a").removeClass('active'); |
123 | + // $(".nav-sidebar li:nth-child(9) a").addClass('active'); | ||
125 | 124 | ||
126 | - } | ||
127 | - else if (appPathvalue == "indepth-reports") { | 125 | + //} |
126 | + //else if (appPathvalue == "indepth-reports") { | ||
128 | 127 | ||
129 | - $(".nav-sidebar li a").removeClass('active'); | ||
130 | - $(".nav-sidebar li:nth-child(10) a").addClass('active'); | 128 | + // $(".nav-sidebar li a").removeClass('active'); |
129 | + // $(".nav-sidebar li:nth-child(10) a").addClass('active'); | ||
131 | 130 | ||
132 | - } | ||
133 | - else if (appPathvalue == "complementary-and-alternate-medicine") { | 131 | + //} |
132 | + //else if (appPathvalue == "complementary-and-alternate-medicine") { | ||
134 | 133 | ||
135 | - $(".nav-sidebar li a").removeClass('active'); | ||
136 | - $(".nav-sidebar li:nth-child(11) a").addClass('active'); | 134 | + // $(".nav-sidebar li a").removeClass('active'); |
135 | + // $(".nav-sidebar li:nth-child(11) a").addClass('active'); | ||
137 | 136 | ||
138 | - } | ||
139 | - else if (appPathvalue == "ADAM-Images") { | 137 | + //} |
138 | + //else if (appPathvalue == "ADAM-Images") { | ||
140 | 139 | ||
141 | - $(".nav-sidebar li a").removeClass('active'); | ||
142 | - $(".nav-sidebar li:nth-child(12) a").addClass('active'); | 140 | + // $(".nav-sidebar li a").removeClass('active'); |
141 | + // $(".nav-sidebar li:nth-child(12) a").addClass('active'); | ||
143 | 142 | ||
144 | - } | 143 | + //} |
145 | 144 | ||
146 | - else if (appPathvalue == "bodyguide") { | 145 | + //else if (appPathvalue == "bodyguide") { |
147 | 146 | ||
148 | - $(".nav-sidebar li a").removeClass('active'); | ||
149 | - $(".nav-sidebar li:nth-child(13) a").addClass('active'); | 147 | + // $(".nav-sidebar li a").removeClass('active'); |
148 | + // $(".nav-sidebar li:nth-child(13) a").addClass('active'); | ||
150 | 149 | ||
151 | - } | ||
152 | - else if (appPathvalue == "symptom-navigator") { | 150 | + //} |
151 | + //else if (appPathvalue == "symptom-navigator") { | ||
153 | 152 | ||
154 | - $(".nav-sidebar li a").removeClass('active'); | ||
155 | - $(".nav-sidebar li:nth-child(14) a").addClass('active'); | 153 | + // $(".nav-sidebar li a").removeClass('active'); |
154 | + // $(".nav-sidebar li:nth-child(14) a").addClass('active'); | ||
156 | 155 | ||
157 | - } | ||
158 | - else if (appPathvalue == "wellness-tools") { | 156 | + //} |
157 | + //else if (appPathvalue == "wellness-tools") { | ||
159 | 158 | ||
160 | - $(".nav-sidebar li a").removeClass('active'); | ||
161 | - $(".nav-sidebar li:nth-child(15) a").addClass('active'); | 159 | + // $(".nav-sidebar li a").removeClass('active'); |
160 | + // $(".nav-sidebar li:nth-child(15) a").addClass('active'); | ||
162 | 161 | ||
163 | - } | ||
164 | - else if (appPathvalue == "ADAM-on-demand") { | 162 | + //} |
163 | + //else if (appPathvalue == "ADAM-on-demand") { | ||
165 | 164 | ||
166 | - $(".nav-sidebar li a").removeClass('active'); | ||
167 | - $(".nav-sidebar li:nth-child(16) a").addClass('active'); | 165 | + // $(".nav-sidebar li a").removeClass('active'); |
166 | + // $(".nav-sidebar li:nth-child(16) a").addClass('active'); | ||
168 | 167 | ||
169 | - } | 168 | + //} |
170 | 169 | ||
171 | }); | 170 | }); |
172 | </script> | 171 | </script> |