From c5b9000f89e04136e95405a0833b4fe985d3a626 Mon Sep 17 00:00:00 2001 From: nikita Date: Fri, 11 Nov 2016 17:03:07 +0530 Subject: [PATCH] attribute array has different index for the value of title so taking title of that. --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index cea1efb..5289889 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -5947,7 +5947,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var currentBodyViewId = $scope.correspondingBodyViewIds[$rootScope.voId]; - if ((event.currentTarget.attributes[1].value == 'Male') && (localStorage.getItem("genderId") == 'Female')) { + if ((event.currentTarget.title == 'Male') && (localStorage.getItem("genderId") == 'Female')) { //1. localStorage.setItem("genderId", 'Male'); @@ -5979,7 +5979,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - else if ((event.currentTarget.attributes[1].value == 'Female') && (localStorage.getItem("genderId") == 'Male')) { + else if ((event.currentTarget.title == 'Female') && (localStorage.getItem("genderId") == 'Male')) { //1. localStorage.setItem("genderId", 'Female'); @@ -6163,7 +6163,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.layerNumber = 0; // debugger; - var selectedViewId = $scope.bodyViews[event.currentTarget.attributes[1].value]; + //var selectedViewId = $scope.bodyViews[event.currentTarget.attributes[1].value]; + var selectedViewId = $scope.bodyViews[event.currentTarget.title]; + $rootScope.viewOrientationId = selectedViewId; if (localStorage.getItem("genderId") == 'Male') { if ($rootScope.voId != selectedViewId) { @@ -6228,8 +6230,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // $('#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); + $('#daImagePanel')[0].childNodes[0].childNodes[0].innerHTML = localStorage.getItem("genderId") + " " + event.currentTarget.title; + localStorage.setItem("currentViewTitle", localStorage.getItem("genderId") + " " + event.currentTarget.title); $rootScope.openViews.push( -- libgit2 0.21.4