Commit 7c6bf4e7102ad7f7502096e01ae3be7fec1b4ab1
1 parent
ef3ad676
App refresh issue rectified for
Showing
2 changed files
with
10 additions
and
4 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -428,7 +428,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -428,7 +428,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
428 | //da-body-views functions | 428 | //da-body-views functions |
429 | 429 | ||
430 | $scope.openBodyView = function () { | 430 | $scope.openBodyView = function () { |
431 | - | 431 | + //Check if browser 'REFRESHED' or 'RELOADED' |
432 | + if ($rootScope.CommonData != null) { | ||
432 | //0. we will initially append container to load body | 433 | //0. we will initially append container to load body |
433 | 434 | ||
434 | //check if localstorage has any settings | 435 | //check if localstorage has any settings |
@@ -569,7 +570,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -569,7 +570,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
569 | 570 | ||
570 | }, 350); | 571 | }, 350); |
571 | } | 572 | } |
572 | - | 573 | + } |
574 | + else | ||
575 | + {console.log('Reload occured, Redirecting to landing page.') | ||
576 | + $location.path('/'); | ||
577 | + } | ||
573 | } | 578 | } |
574 | 579 | ||
575 | angular.element(document).ready(function (e) { | 580 | 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,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 | if ((e.keyCode === 116) || (e.keyCode == 82 && e.ctrlKey)) | 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 | \ No newline at end of file | 3551 | \ No newline at end of file |