Commit 63bcb370ab85ea1ef5578a839235b362c25c4423
Merge branch 'CurrentPosition' into Develop
Showing
1 changed file
with
159 additions
and
153 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -7692,205 +7692,211 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7692 | 7692 | } |
7693 | 7693 | |
7694 | 7694 | $scope.OnViewChange = function (event) { |
7695 | + // alert(event.target.title); | |
7696 | + // alert($("[title*='" + event.target.title + "']").parent().hasClass("active")); | |
7697 | + if ($("[title*='" + event.target.title + "']").parent().hasClass("active") == true) { | |
7695 | 7698 | |
7696 | - var canvasDiv = document.getElementById('canvasDiv'); | |
7697 | - $scope.imageVerticalScrollPosition = canvasDiv.scrollTop; | |
7698 | - $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft; | |
7699 | + | |
7699 | 7700 | |
7700 | - $("#btnExtract").removeClass("disabled"); | |
7701 | - $("#btnTranparency").removeClass("disabled"); | |
7702 | - $rootScope.isTransparencyBoxActivated = false; | |
7703 | - $rootScope.isNormalMode = false; | |
7701 | + } | |
7702 | + else { | |
7703 | + var canvasDiv = document.getElementById('canvasDiv'); | |
7704 | + $scope.imageVerticalScrollPosition = canvasDiv.scrollTop; | |
7705 | + $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft; | |
7704 | 7706 | |
7705 | - //close transparency box | |
7706 | - $scope.CloseTransparencyBox(); | |
7707 | + $("#btnExtract").removeClass("disabled"); | |
7708 | + $("#btnTranparency").removeClass("disabled"); | |
7709 | + $rootScope.isTransparencyBoxActivated = false; | |
7710 | + $rootScope.isNormalMode = false; | |
7707 | 7711 | |
7708 | - //if listanager is visisble then close it | |
7712 | + //close transparency box | |
7713 | + $scope.CloseTransparencyBox(); | |
7709 | 7714 | |
7710 | - //$rootScope.isListManagerSelected = false; | |
7711 | - $rootScope.CloseListManager(); | |
7715 | + //if listanager is visisble then close it | |
7712 | 7716 | |
7713 | - //to get the body system highlighted on view change. commented the below line | |
7714 | - // $rootScope.isHighlightBodyByBodySystem = false; | |
7717 | + //$rootScope.isListManagerSelected = false; | |
7718 | + $rootScope.CloseListManager(); | |
7715 | 7719 | |
7716 | - //Remove the search list and then Repopulate it on change of View | |
7717 | - $('#searchListDiv').empty() | |
7718 | - if ($rootScope.openViews.length > 0) { | |
7719 | - $rootScope.openViews.splice($rootScope.openViews.length - 1); | |
7720 | - } | |
7720 | + //to get the body system highlighted on view change. commented the below line | |
7721 | + // $rootScope.isHighlightBodyByBodySystem = false; | |
7721 | 7722 | |
7722 | - $rootScope.isViewChange = true; | |
7723 | + //Remove the search list and then Repopulate it on change of View | |
7724 | + $('#searchListDiv').empty() | |
7725 | + if ($rootScope.openViews.length > 0) { | |
7726 | + $rootScope.openViews.splice($rootScope.openViews.length - 1); | |
7727 | + } | |
7723 | 7728 | |
7724 | - if ($rootScope.isExtract == true) { | |
7725 | - $rootScope.isExtract = false; | |
7726 | - $rootScope.isHighLight = true; | |
7727 | - $("#btnExtract").removeClass("btn-primary"); | |
7728 | - $("#btnExtract").addClass("btn-black"); | |
7729 | - $("#btnHighLight").removeClass("btn-black"); | |
7730 | - $("#btnHighLight").addClass("btn-primary"); | |
7731 | - } | |
7729 | + $rootScope.isViewChange = true; | |
7732 | 7730 | |
7733 | - $scope.layerNumber = 0; | |
7731 | + if ($rootScope.isExtract == true) { | |
7732 | + $rootScope.isExtract = false; | |
7733 | + $rootScope.isHighLight = true; | |
7734 | + $("#btnExtract").removeClass("btn-primary"); | |
7735 | + $("#btnExtract").addClass("btn-black"); | |
7736 | + $("#btnHighLight").removeClass("btn-black"); | |
7737 | + $("#btnHighLight").addClass("btn-primary"); | |
7738 | + } | |
7734 | 7739 | |
7735 | - //remove existing body view | |
7736 | - var canDiv = document.getElementById('canvasDiv'); | |
7737 | - var canDivChildCount = canDiv.childElementCount; | |
7738 | - if (canDivChildCount > 0) { | |
7739 | - canDiv.innerHTML = ''; | |
7740 | - } | |
7740 | + $scope.layerNumber = 0; | |
7741 | 7741 | |
7742 | - var selectedViewId = $scope.bodyViews[event.currentTarget.title]; | |
7743 | - $rootScope.viewOrientationId = selectedViewId; | |
7742 | + //remove existing body view | |
7743 | + var canDiv = document.getElementById('canvasDiv'); | |
7744 | + var canDivChildCount = canDiv.childElementCount; | |
7745 | + if (canDivChildCount > 0) { | |
7746 | + canDiv.innerHTML = ''; | |
7747 | + } | |
7744 | 7748 | |
7745 | - if ($rootScope.getLocalStorageValue("genderId") == 'Male') { | |
7746 | - if ($rootScope.voId != selectedViewId) { | |
7747 | - if (selectedViewId == 5) { | |
7748 | - $rootScope.voId = 9; | |
7749 | - } | |
7750 | - else if (selectedViewId == 6) { | |
7751 | - $rootScope.voId = 10; | |
7752 | - } | |
7753 | - else | |
7754 | - $rootScope.voId = selectedViewId; | |
7755 | - $rootScope.isLoading = true; | |
7749 | + var selectedViewId = $scope.bodyViews[event.currentTarget.title]; | |
7750 | + $rootScope.viewOrientationId = selectedViewId; | |
7756 | 7751 | |
7757 | - $rootScope.isLoading = true; | |
7758 | - $('#spinner').css('visibility', 'visible'); | |
7752 | + if ($rootScope.getLocalStorageValue("genderId") == 'Male') { | |
7753 | + if ($rootScope.voId != selectedViewId) { | |
7754 | + if (selectedViewId == 5) { | |
7755 | + $rootScope.voId = 9; | |
7756 | + } | |
7757 | + else if (selectedViewId == 6) { | |
7758 | + $rootScope.voId = 10; | |
7759 | + } | |
7760 | + else | |
7761 | + $rootScope.voId = selectedViewId; | |
7762 | + $rootScope.isLoading = true; | |
7759 | 7763 | |
7760 | - //1. first update the currentbodyviewid in local storage | |
7761 | - localStorage.setItem("currentBodyViewId", $rootScope.voId); | |
7764 | + $rootScope.isLoading = true; | |
7765 | + $('#spinner').css('visibility', 'visible'); | |
7762 | 7766 | |
7767 | + //1. first update the currentbodyviewid in local storage | |
7768 | + localStorage.setItem("currentBodyViewId", $rootScope.voId); | |
7763 | 7769 | |
7764 | - //2. Load selected body view | |
7765 | - $scope.loadSelectedBodyView($rootScope.voId); | |
7766 | 7770 | |
7767 | - //3. load corresponding navigator man | |
7768 | - $scope.loadNavigatorForSelectedBodyView($rootScope.voId); | |
7771 | + //2. Load selected body view | |
7772 | + $scope.loadSelectedBodyView($rootScope.voId); | |
7769 | 7773 | |
7770 | - //4. change the search terms as per the selected bodyview | |
7771 | - $rootScope.loadSearchData(); | |
7774 | + //3. load corresponding navigator man | |
7775 | + $scope.loadNavigatorForSelectedBodyView($rootScope.voId); | |
7772 | 7776 | |
7773 | - //5.Change the popup title next to search | |
7774 | - $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle"); | |
7777 | + //4. change the search terms as per the selected bodyview | |
7778 | + $rootScope.loadSearchData(); | |
7775 | 7779 | |
7776 | - }; | |
7780 | + //5.Change the popup title next to search | |
7781 | + $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle"); | |
7777 | 7782 | |
7783 | + }; | |
7778 | 7784 | |
7779 | - //set selected view name as the title of jspanel | |
7780 | - // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("genderId") +" "+ event.currentTarget.attributes[1].value; | |
7781 | 7785 | |
7782 | - } | |
7783 | - else { | |
7784 | - if (selectedViewId == 5) { | |
7785 | - selectedViewId = 11; | |
7786 | - } | |
7787 | - else if (selectedViewId == 6) { | |
7788 | - selectedViewId = 12; | |
7786 | + //set selected view name as the title of jspanel | |
7787 | + // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("genderId") +" "+ event.currentTarget.attributes[1].value; | |
7788 | + | |
7789 | 7789 | } |
7790 | - else | |
7791 | - selectedViewId = $scope.correspondingBodyViewIds[selectedViewId];; | |
7792 | - if ($rootScope.voId != selectedViewId) { | |
7793 | - $rootScope.voId = selectedViewId; | |
7794 | - $rootScope.isLoading = true; | |
7790 | + else { | |
7791 | + if (selectedViewId == 5) { | |
7792 | + selectedViewId = 11; | |
7793 | + } | |
7794 | + else if (selectedViewId == 6) { | |
7795 | + selectedViewId = 12; | |
7796 | + } | |
7797 | + else | |
7798 | + selectedViewId = $scope.correspondingBodyViewIds[selectedViewId];; | |
7799 | + if ($rootScope.voId != selectedViewId) { | |
7800 | + $rootScope.voId = selectedViewId; | |
7801 | + $rootScope.isLoading = true; | |
7795 | 7802 | |
7796 | - $rootScope.isLoading = true; | |
7797 | - $('#spinner').css('visibility', 'visible'); | |
7803 | + $rootScope.isLoading = true; | |
7804 | + $('#spinner').css('visibility', 'visible'); | |
7805 | + //1. | |
7806 | + $scope.loadSelectedBodyView($rootScope.voId); | |
7798 | 7807 | |
7799 | - localStorage.setItem("currentBodyViewId", $rootScope.voId); | |
7800 | - //1. | |
7801 | - $scope.loadSelectedBodyView($rootScope.voId); | |
7808 | + //2. | |
7809 | + $scope.loadNavigatorForSelectedBodyView($rootScope.voId); | |
7810 | + //3. load corresponding navigator man | |
7811 | + $scope.loadNavigatorForSelectedBodyView($rootScope.voId); | |
7802 | 7812 | |
7803 | - //2. | |
7804 | - $scope.loadNavigatorForSelectedBodyView($rootScope.voId); | |
7805 | - //3. load corresponding navigator man | |
7806 | - $scope.loadNavigatorForSelectedBodyView($rootScope.voId); | |
7813 | + //4. change the search terms as per the selected bodyview | |
7814 | + $rootScope.loadSearchData(); | |
7807 | 7815 | |
7808 | - //4. change the search terms as per the selected bodyview | |
7809 | - $rootScope.loadSearchData(); | |
7816 | + //5.Change the popup title next to search | |
7817 | + $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle"); | |
7818 | + }; | |
7810 | 7819 | |
7811 | - //5.Change the popup title next to search | |
7812 | - $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle"); | |
7813 | - }; | |
7814 | 7820 | |
7821 | + // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("genderId") + " " + $scope.bodyViews[event.currentTarget.attributes[1].value; | |
7815 | 7822 | |
7816 | - // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("genderId") + " " + $scope.bodyViews[event.currentTarget.attributes[1].value; | |
7823 | + } | |
7824 | + $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("genderId") + " " + event.currentTarget.title; | |
7825 | + localStorage.setItem("currentViewTitle", $rootScope.getLocalStorageValue("genderId") + " " + event.currentTarget.title); | |
7826 | + localStorage.setItem("currentBodyViewId", selectedViewId); | |
7817 | 7827 | |
7818 | - } | |
7819 | - $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = $rootScope.getLocalStorageValue("genderId") + " " + event.currentTarget.title; | |
7820 | - localStorage.setItem("currentViewTitle", $rootScope.getLocalStorageValue("genderId") + " " + event.currentTarget.title); | |
7821 | - localStorage.setItem("currentBodyViewId", selectedViewId); | |
7822 | 7828 | |
7829 | + $rootScope.openViews.push( | |
7830 | + { | |
7831 | + "module": $rootScope.currentActiveModuleTitle, "bodyView": $rootScope.getLocalStorageValue("currentViewTitle"), "state": 'max', "BodyViewId": $rootScope.voId, | |
7832 | + "slug": $rootScope.currentSlug | |
7833 | + } | |
7834 | + ); | |
7823 | 7835 | |
7824 | - $rootScope.openViews.push( | |
7825 | - { | |
7826 | - "module": $rootScope.currentActiveModuleTitle, "bodyView": $rootScope.getLocalStorageValue("currentViewTitle"), "state": 'max', "BodyViewId": $rootScope.voId, | |
7827 | - "slug": $rootScope.currentSlug | |
7828 | - } | |
7829 | - ); | |
7836 | + var viewtarget = angular.element(event.currentTarget); | |
7837 | + var title_drop_view = viewtarget.attr('title'); | |
7830 | 7838 | |
7831 | - var viewtarget = angular.element(event.currentTarget); | |
7832 | - var title_drop_view = viewtarget.attr('title'); | |
7839 | + if (title_drop_view == "Anterior") { | |
7833 | 7840 | |
7834 | - if (title_drop_view == "Anterior") { | |
7841 | + $scope.AnteriorView = "active"; | |
7842 | + $scope.LateralView = ""; | |
7843 | + $scope.MedialView = ""; | |
7844 | + $scope.PosteriorView = ""; | |
7845 | + $scope.LateralArmView = ""; | |
7846 | + $scope.MedialArmView = ""; | |
7835 | 7847 | |
7836 | - $scope.AnteriorView = "active"; | |
7837 | - $scope.LateralView = ""; | |
7838 | - $scope.MedialView = ""; | |
7839 | - $scope.PosteriorView = ""; | |
7840 | - $scope.LateralArmView = ""; | |
7841 | - $scope.MedialArmView = ""; | |
7848 | + } | |
7849 | + else if (title_drop_view == "Lateral") { | |
7842 | 7850 | |
7843 | - } | |
7844 | - else if (title_drop_view == "Lateral") { | |
7851 | + $scope.AnteriorView = ""; | |
7852 | + $scope.LateralView = "active"; | |
7853 | + $scope.MedialView = ""; | |
7854 | + $scope.PosteriorView = ""; | |
7855 | + $scope.LateralArmView = ""; | |
7856 | + $scope.MedialArmView = ""; | |
7857 | + } | |
7858 | + else if (title_drop_view == "Medial") { | |
7845 | 7859 | |
7846 | - $scope.AnteriorView = ""; | |
7847 | - $scope.LateralView = "active"; | |
7848 | - $scope.MedialView = ""; | |
7849 | - $scope.PosteriorView = ""; | |
7850 | - $scope.LateralArmView = ""; | |
7851 | - $scope.MedialArmView = ""; | |
7852 | - } | |
7853 | - else if (title_drop_view == "Medial") { | |
7860 | + $scope.AnteriorView = ""; | |
7861 | + $scope.LateralView = ""; | |
7862 | + $scope.MedialView = "active"; | |
7863 | + $scope.PosteriorView = ""; | |
7864 | + $scope.LateralArmView = ""; | |
7865 | + $scope.MedialArmView = ""; | |
7866 | + } | |
7867 | + else if (title_drop_view == "Posterior") { | |
7854 | 7868 | |
7855 | - $scope.AnteriorView = ""; | |
7856 | - $scope.LateralView = ""; | |
7857 | - $scope.MedialView = "active"; | |
7858 | - $scope.PosteriorView = ""; | |
7859 | - $scope.LateralArmView = ""; | |
7860 | - $scope.MedialArmView = ""; | |
7861 | - } | |
7862 | - else if (title_drop_view == "Posterior") { | |
7869 | + $scope.AnteriorView = ""; | |
7870 | + $scope.LateralView = ""; | |
7871 | + $scope.MedialView = ""; | |
7872 | + $scope.PosteriorView = "active"; | |
7873 | + $scope.LateralArmView = ""; | |
7874 | + $scope.MedialArmView = ""; | |
7875 | + } | |
7876 | + else if (title_drop_view == "Lateral Arm") { | |
7863 | 7877 | |
7864 | - $scope.AnteriorView = ""; | |
7865 | - $scope.LateralView = ""; | |
7866 | - $scope.MedialView = ""; | |
7867 | - $scope.PosteriorView = "active"; | |
7868 | - $scope.LateralArmView = ""; | |
7869 | - $scope.MedialArmView = ""; | |
7870 | - } | |
7871 | - else if (title_drop_view == "Lateral Arm") { | |
7878 | + $scope.AnteriorView = ""; | |
7879 | + $scope.LateralView = ""; | |
7880 | + $scope.MedialView = ""; | |
7881 | + $scope.PosteriorView = ""; | |
7882 | + $scope.LateralArmView = "active"; | |
7883 | + $scope.MedialArmView = ""; | |
7884 | + } | |
7885 | + else if (title_drop_view == "Medial Arm") { | |
7872 | 7886 | |
7873 | - $scope.AnteriorView = ""; | |
7874 | - $scope.LateralView = ""; | |
7875 | - $scope.MedialView = ""; | |
7876 | - $scope.PosteriorView = ""; | |
7877 | - $scope.LateralArmView = "active"; | |
7878 | - $scope.MedialArmView = ""; | |
7887 | + $scope.AnteriorView = ""; | |
7888 | + $scope.LateralView = ""; | |
7889 | + $scope.MedialView = ""; | |
7890 | + $scope.PosteriorView = ""; | |
7891 | + $scope.LateralArmView = ""; | |
7892 | + $scope.MedialArmView = "active"; | |
7893 | + } | |
7894 | + //13573 : DA > Annotations should not be display if we change the body view. | |
7895 | + $rootScope.CloseAnnotationTool(); | |
7896 | + $scope.searchFilter = ''; | |
7879 | 7897 | } |
7880 | - else if (title_drop_view == "Medial Arm") { | |
7881 | 7898 | |
7882 | - $scope.AnteriorView = ""; | |
7883 | - $scope.LateralView = ""; | |
7884 | - $scope.MedialView = ""; | |
7885 | - $scope.PosteriorView = ""; | |
7886 | - $scope.LateralArmView = ""; | |
7887 | - $scope.MedialArmView = "active"; | |
7888 | - } | |
7889 | - //13573 : DA > Annotations should not be display if we change the body view. | |
7890 | - $rootScope.CloseAnnotationTool(); | |
7891 | - $scope.searchFilter = ''; | |
7892 | 7899 | } |
7893 | - | |
7894 | 7900 | //Reload DA controller event listener after setting change |
7895 | 7901 | $scope.$on('reloadDAControllerEvent', function (event, data) { |
7896 | 7902 | console.log('reloadDAControllerEvent'); | ... | ... |