From 42f61b50734643e95f32767e4a01b28aa5197dd6 Mon Sep 17 00:00:00 2001 From: nikita Date: Wed, 22 Jun 2016 15:52:59 +0530 Subject: [PATCH] now the title of jspanel is changed as per selected body view on gender change and view chnage functionality --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 27 ++++++++++++++++++++------- 400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js | 1 - 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 9bda465..4f3467b 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -1268,7 +1268,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // alert(' $.each(BodyRegionDictionary3. bodyRegionRight: ' + bodyRegionRight + ', bodyRegionBottom: ' + bodyRegionBottom) if (TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) { //var transNumber = parseInt(document.getElementById("txtTransparencyChange").value); - debugger; + // debugger; $scope.layerNumber = parseInt(txtlayerNumber.value); @@ -1598,7 +1598,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#btnTranparency').removeClass('btn-black'); $('#btnTranparency').addClass('tButtonActive'); - debugger; + //debugger; $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber))+1); } @@ -1743,7 +1743,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //do nothing } else if (isLayerChanged) { - debugger + // debugger $scope.layerNumber = parseInt($('#txtlayerNumber').val()); } else { @@ -2446,7 +2446,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //var txtTransparencyChange = document.getElementById("txtTransparencyChange"); //txtTransparencyChange.value = 0; // document.getElementById('txtLayerNumber').value = 0; - debugger; + // debugger; $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.currentLayerNumber)); @@ -2645,14 +2645,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $scope.OnGenderChange = function (event) { - // debugger; + //use $scope.correspondingBodyViewIds for getting correspnding viewid // alert('gender changed= ' + event.currentTarget.attributes[1].value) // $(".enableGender li").removeClass("active"); // $(event.currentTarget.attributes[2].value).parent().addClass("active"); - + var viewname= localStorage.getItem("currentViewTitle") var currentBodyViewId = $scope.correspondingBodyViewIds[$scope.voId]; 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 $scope.loadSelectedBodyView(currentBodyViewId); + $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Female','Male'); + } 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 $scope.loadSelectedBodyView(currentBodyViewId) + $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("currentViewTitle").replace('Male','Female'); + } @@ -2723,6 +2727,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.OnViewChange = function (event) { $scope.layerNumber = 0; + // debugger; var selectedViewId = $scope.bodyViews[event.currentTarget.attributes[1].value]; $scope.viewOrientationId = selectedViewId; if (localStorage.getItem("genderId") == 'Male') { @@ -2738,6 +2743,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.loadSelectedBodyView($scope.voId); }; + + //set selected view name as the title of jspanel + // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("genderId") +" "+ event.currentTarget.attributes[1].value; + } else { if (selectedViewId == 5) { @@ -2752,8 +2761,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.voId = selectedViewId; $scope.loadSelectedBodyView($scope.voId); }; - } + // $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("genderId") + " " + $scope.bodyViews[event.currentTarget.attributes[1].value; + + } + $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("genderId") +" "+ event.currentTarget.attributes[1].value; + localStorage.setItem("currentViewTitle", localStorage.getItem("genderId") + " " + event.currentTarget.attributes[1].value); } diff --git a/400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js b/400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js index 757229b..99dda6b 100644 --- a/400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js +++ b/400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js @@ -1495,7 +1495,6 @@ var jsPanel = { }, getRootScope: function (controllerName) { - debugger; var $body = angular.element(document.body); // 1 return $body.scope().$root; -- libgit2 0.21.4