Commit c5a293c80eb13a22fbaf03675838737d6bd19066

Authored by Nikita Kulshreshtha
1 parent f1ec9255

resolved exception on view change and then close jspanel and open any view.

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -369,7 +369,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
369 369 if ($rootScope.openViews.length > 0) {
370 370 openViews = new jinqJs()
371 371 .from($rootScope.openViews)
372   - .where("BodyViewId==" + currentBodyViewId)
  372 + .where("BodyViewId == " + currentBodyViewId)
373 373 .select();
374 374 }
375 375 }
... ... @@ -381,7 +381,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
381 381 if (openViews != null && openViews != undefined) {
382 382 angular.forEach(openViews, function (value, key) {
383 383  
384   - if (value.body - views == tittle) {
  384 + if (value.body-views == tittle) {
385 385 tittle = localStorage.getItem("currentViewTitleFromJson") + counter++;
386 386 $rootScope.currentActiveViewTitle = tittle;
387 387 localStorage.setItem("currentViewTitle", tittle);
... ... @@ -5355,6 +5355,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5355 5355 $rootScope.isLoading = true;
5356 5356 $('#spinner').css('visibility', 'visible');
5357 5357  
  5358 +
  5359 + if ($rootScope.openViews.length > 0) {
  5360 + $rootScope.openViews.splice($rootScope.openViews.length - 1);
  5361 + }
  5362 +
5358 5363 $rootScope.isViewChange = true;
5359 5364 $rootScope.layerNumber = 0;
5360 5365 // debugger;
... ... @@ -5520,12 +5525,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5520 5525  
5521 5526 $scope.skinTone = $rootScope.globalSetting.ethnicity;
5522 5527  
5523   - //if ($scope.NavigatorData != null || $scope.NavigatorData != undefined) {
  5528 + if ($scope.NavigatorData != null || $scope.NavigatorData != undefined) {
5524 5529 var navdtlOrient = new jinqJs()
5525 5530 .from($scope.NavigatorData.Navigtor.ViewOrientation)
5526 5531 .where("_ViewOrientationId == " + $scope.voId)
5527 5532 .select();
5528   -
  5533 +
5529 5534  
5530 5535 if (navdtlOrient != null || navdtlOrient != undefined) {
5531 5536  
... ... @@ -5555,6 +5560,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5555 5560 $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty;
5556 5561 }
5557 5562 }
  5563 +
  5564 + }
5558 5565  
5559 5566 }
5560 5567  
... ...