Commit ef0c0bf3de2f3368bfe3a9cb012e3e9760de7ca5

Authored by Nikita Kulshreshtha
2 parents 58e4a39b ead1b9f8

Merge branch 'App_RefreshIssue' into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -428,7 +428,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
428 428 //da-body-views functions
429 429  
430 430 $scope.openBodyView = function () {
431   -
  431 + //Check if browser 'REFRESHED' or 'RELOADED'
  432 + if ($rootScope.CommonData != null) {
432 433 //0. we will initially append container to load body
433 434  
434 435 //check if localstorage has any settings
... ... @@ -455,7 +456,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
455 456 $rootScope.isVisibleLogin = false;
456 457 $scope.loadSearchDataForBodyView();
457 458  
458   -
459 459 console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId);
460 460  
461 461 var openViews;
... ... @@ -569,7 +569,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
569 569  
570 570 }, 350);
571 571 }
572   -
  572 + }
  573 + else
  574 + {console.log('Reload occured, Redirecting to landing page.')
  575 + $location.path('/');
  576 + /*Code commented due to unavailability of modules list on 'da-view-list' view*/
  577 + /* console.log('Reloading json data for body view => BROWSER REFRESH ISSUE...');
  578 + $scope.loadDissectibleAnatomyData();
  579 +
  580 + if ((typeof($rootScope.MenuModuleName) == "undefined") || $rootScope.MenuModuleName == null) {
  581 + $rootScope.MenuModuleName = "DA";
  582 + }*/
  583 +
  584 +
  585 + }
573 586 }
574 587  
575 588 angular.element(document).ready(function (e) {
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -3541,9 +3541,10 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
3541 3541  
3542 3542 }
3543 3543  
3544   - $rootScope.CheckRefresh = function (e) {
  3544 + $rootScope.CheckRefresh = function (e) {
  3545 + //Checking if 'REFRESHED' or 'RELOADED'
3545 3546 if ((e.keyCode === 116) || (e.keyCode == 82 && e.ctrlKey))
3546   - $location.path('/');
  3547 + $location.path('/'); //Redirecting to landing page
3547 3548 };
3548 3549 }]
3549 3550 );
3550 3551 \ No newline at end of file
... ...