Commit 42f61b50734643e95f32767e4a01b28aa5197dd6
1 parent
06514d40
now the title of jspanel is changed as per selected body view on gender change a…
…nd view chnage functionality
Showing
2 changed files
with
20 additions
and
8 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -1268,7 +1268,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1268,7 +1268,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1268 | // alert(' $.each(BodyRegionDictionary3. bodyRegionRight: ' + bodyRegionRight + ', bodyRegionBottom: ' + bodyRegionBottom) | 1268 | // alert(' $.each(BodyRegionDictionary3. bodyRegionRight: ' + bodyRegionRight + ', bodyRegionBottom: ' + bodyRegionBottom) |
1269 | if (TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) { | 1269 | if (TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) { |
1270 | //var transNumber = parseInt(document.getElementById("txtTransparencyChange").value); | 1270 | //var transNumber = parseInt(document.getElementById("txtTransparencyChange").value); |
1271 | - debugger; | 1271 | + // debugger; |
1272 | $scope.layerNumber = parseInt(txtlayerNumber.value); | 1272 | $scope.layerNumber = parseInt(txtlayerNumber.value); |
1273 | 1273 | ||
1274 | 1274 | ||
@@ -1598,7 +1598,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1598,7 +1598,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1598 | $('#btnTranparency').removeClass('btn-black'); | 1598 | $('#btnTranparency').removeClass('btn-black'); |
1599 | 1599 | ||
1600 | $('#btnTranparency').addClass('tButtonActive'); | 1600 | $('#btnTranparency').addClass('tButtonActive'); |
1601 | - debugger; | 1601 | + //debugger; |
1602 | $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber))+1); | 1602 | $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber))+1); |
1603 | } | 1603 | } |
1604 | 1604 | ||
@@ -1743,7 +1743,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1743,7 +1743,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1743 | //do nothing | 1743 | //do nothing |
1744 | } | 1744 | } |
1745 | else if (isLayerChanged) { | 1745 | else if (isLayerChanged) { |
1746 | - debugger | 1746 | + // debugger |
1747 | $scope.layerNumber = parseInt($('#txtlayerNumber').val()); | 1747 | $scope.layerNumber = parseInt($('#txtlayerNumber').val()); |
1748 | } | 1748 | } |
1749 | else { | 1749 | else { |
@@ -2446,7 +2446,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2446,7 +2446,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2446 | //var txtTransparencyChange = document.getElementById("txtTransparencyChange"); | 2446 | //var txtTransparencyChange = document.getElementById("txtTransparencyChange"); |
2447 | //txtTransparencyChange.value = 0; | 2447 | //txtTransparencyChange.value = 0; |
2448 | // document.getElementById('txtLayerNumber').value = 0; | 2448 | // document.getElementById('txtLayerNumber').value = 0; |
2449 | - debugger; | 2449 | + // debugger; |
2450 | 2450 | ||
2451 | 2451 | ||
2452 | $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.currentLayerNumber)); | 2452 | $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.currentLayerNumber)); |
@@ -2645,14 +2645,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2645,14 +2645,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2645 | } | 2645 | } |
2646 | 2646 | ||
2647 | $scope.OnGenderChange = function (event) { | 2647 | $scope.OnGenderChange = function (event) { |
2648 | - // debugger; | 2648 | + |
2649 | //use $scope.correspondingBodyViewIds for getting correspnding viewid | 2649 | //use $scope.correspondingBodyViewIds for getting correspnding viewid |
2650 | // alert('gender changed= ' + event.currentTarget.attributes[1].value) | 2650 | // alert('gender changed= ' + event.currentTarget.attributes[1].value) |
2651 | 2651 | ||
2652 | // $(".enableGender li").removeClass("active"); | 2652 | // $(".enableGender li").removeClass("active"); |
2653 | // $(event.currentTarget.attributes[2].value).parent().addClass("active"); | 2653 | // $(event.currentTarget.attributes[2].value).parent().addClass("active"); |
2654 | 2654 | ||
2655 | - | 2655 | + var viewname= localStorage.getItem("currentViewTitle") |
2656 | var currentBodyViewId = $scope.correspondingBodyViewIds[$scope.voId]; | 2656 | var currentBodyViewId = $scope.correspondingBodyViewIds[$scope.voId]; |
2657 | 2657 | ||
2658 | if ((event.currentTarget.attributes[1].value == 'Male') && (localStorage.getItem("genderId") == 'Female')) { | 2658 | if ((event.currentTarget.attributes[1].value == 'Male') && (localStorage.getItem("genderId") == 'Female')) { |
@@ -2662,6 +2662,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2662,6 +2662,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2662 | 2662 | ||
2663 | $scope.loadSelectedBodyView(currentBodyViewId); | 2663 | $scope.loadSelectedBodyView(currentBodyViewId); |
2664 | 2664 | ||
2665 | + $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Female','Male'); | ||
2666 | + | ||
2665 | } | 2667 | } |
2666 | 2668 | ||
2667 | else if ((event.currentTarget.attributes[1].value == 'Female') && (localStorage.getItem("genderId") == 'Male')) { | 2669 | else if ((event.currentTarget.attributes[1].value == 'Female') && (localStorage.getItem("genderId") == 'Male')) { |
@@ -2670,6 +2672,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2670,6 +2672,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2670 | 2672 | ||
2671 | 2673 | ||
2672 | $scope.loadSelectedBodyView(currentBodyViewId) | 2674 | $scope.loadSelectedBodyView(currentBodyViewId) |
2675 | + $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Male','Female'); | ||
2676 | + | ||
2673 | 2677 | ||
2674 | 2678 | ||
2675 | } | 2679 | } |
@@ -2723,6 +2727,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2723,6 +2727,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2723 | 2727 | ||
2724 | $scope.OnViewChange = function (event) { | 2728 | $scope.OnViewChange = function (event) { |
2725 | $scope.layerNumber = 0; | 2729 | $scope.layerNumber = 0; |
2730 | + // debugger; | ||
2726 | var selectedViewId = $scope.bodyViews[event.currentTarget.attributes[1].value]; | 2731 | var selectedViewId = $scope.bodyViews[event.currentTarget.attributes[1].value]; |
2727 | $scope.viewOrientationId = selectedViewId; | 2732 | $scope.viewOrientationId = selectedViewId; |
2728 | if (localStorage.getItem("genderId") == 'Male') { | 2733 | if (localStorage.getItem("genderId") == 'Male') { |
@@ -2738,6 +2743,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2738,6 +2743,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2738 | 2743 | ||
2739 | $scope.loadSelectedBodyView($scope.voId); | 2744 | $scope.loadSelectedBodyView($scope.voId); |
2740 | }; | 2745 | }; |
2746 | + | ||
2747 | + //set selected view name as the title of jspanel | ||
2748 | + // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("genderId") +" "+ event.currentTarget.attributes[1].value; | ||
2749 | + | ||
2741 | } | 2750 | } |
2742 | else { | 2751 | else { |
2743 | if (selectedViewId == 5) { | 2752 | if (selectedViewId == 5) { |
@@ -2752,8 +2761,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -2752,8 +2761,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
2752 | $scope.voId = selectedViewId; | 2761 | $scope.voId = selectedViewId; |
2753 | $scope.loadSelectedBodyView($scope.voId); | 2762 | $scope.loadSelectedBodyView($scope.voId); |
2754 | }; | 2763 | }; |
2755 | - } | ||
2756 | 2764 | ||
2765 | + // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("genderId") + " " + $scope.bodyViews[event.currentTarget.attributes[1].value; | ||
2766 | + | ||
2767 | + } | ||
2768 | + $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("genderId") +" "+ event.currentTarget.attributes[1].value; | ||
2769 | + localStorage.setItem("currentViewTitle", localStorage.getItem("genderId") + " " + event.currentTarget.attributes[1].value); | ||
2757 | } | 2770 | } |
2758 | 2771 | ||
2759 | 2772 |
400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js
@@ -1495,7 +1495,6 @@ var jsPanel = { | @@ -1495,7 +1495,6 @@ var jsPanel = { | ||
1495 | }, | 1495 | }, |
1496 | 1496 | ||
1497 | getRootScope: function (controllerName) { | 1497 | getRootScope: function (controllerName) { |
1498 | - debugger; | ||
1499 | var $body = angular.element(document.body); // 1 | 1498 | var $body = angular.element(document.body); // 1 |
1500 | return $body.scope().$root; | 1499 | return $body.scope().$root; |
1501 | 1500 |