From c5a293c80eb13a22fbaf03675838737d6bd19066 Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 29 Aug 2016 14:30:45 +0530 Subject: [PATCH] resolved exception on view change and then close jspanel and open any view. --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 1229e7c..83322b3 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -369,7 +369,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($rootScope.openViews.length > 0) { openViews = new jinqJs() .from($rootScope.openViews) - .where("BodyViewId==" + currentBodyViewId) + .where("BodyViewId == " + currentBodyViewId) .select(); } } @@ -381,7 +381,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (openViews != null && openViews != undefined) { angular.forEach(openViews, function (value, key) { - if (value.body - views == tittle) { + if (value.body-views == tittle) { tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; $rootScope.currentActiveViewTitle = tittle; localStorage.setItem("currentViewTitle", tittle); @@ -5355,6 +5355,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); + + if ($rootScope.openViews.length > 0) { + $rootScope.openViews.splice($rootScope.openViews.length - 1); + } + $rootScope.isViewChange = true; $rootScope.layerNumber = 0; // debugger; @@ -5520,12 +5525,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.skinTone = $rootScope.globalSetting.ethnicity; - //if ($scope.NavigatorData != null || $scope.NavigatorData != undefined) { + if ($scope.NavigatorData != null || $scope.NavigatorData != undefined) { var navdtlOrient = new jinqJs() .from($scope.NavigatorData.Navigtor.ViewOrientation) .where("_ViewOrientationId == " + $scope.voId) .select(); - + if (navdtlOrient != null || navdtlOrient != undefined) { @@ -5555,6 +5560,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty; } } + + } } -- libgit2 0.21.4