From b56092bd31e3753ee670a08b09b654c274dfcadb Mon Sep 17 00:00:00 2001 From: Matthias Pfeil Date: Mon, 26 Nov 2018 10:16:28 +0100 Subject: [PATCH] fix(loader): Disable loader by default Set visibility of loader to false by default and remove unnecessary loader code. re #286 --- app/components/loader.directive.js | 2 +- app/scripts/controllers/account.dashboard.js | 6 ++---- app/scripts/controllers/info.js | 5 ++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/components/loader.directive.js b/app/components/loader.directive.js index 44f645af..7e7550d7 100644 --- a/app/components/loader.directive.js +++ b/app/components/loader.directive.js @@ -45,7 +45,7 @@ } function activate () { - vm.visible = true; + vm.visible = false; vm.messageText = 'Fetching boxes and measurements'; } diff --git a/app/scripts/controllers/account.dashboard.js b/app/scripts/controllers/account.dashboard.js index d44bfad7..0be21c9d 100644 --- a/app/scripts/controllers/account.dashboard.js +++ b/app/scripts/controllers/account.dashboard.js @@ -5,9 +5,9 @@ .module('openSenseMapApp') .controller('AccountDashboardController', AccountDashboardController); - AccountDashboardController.$inject = ['AccountService', 'LocalStorageService', '$scope', '$rootScope']; + AccountDashboardController.$inject = ['AccountService', 'LocalStorageService', '$scope']; - function AccountDashboardController (AccountService, LocalStorageService, $scope, $rootScope) { + function AccountDashboardController (AccountService, LocalStorageService, $scope) { var vm = this; var localStorageKey = 'osem.dashboard.listStyle'; var localStorageOrderByKey = 'osem.dashboard.orderBy'; @@ -21,8 +21,6 @@ //// function activate () { - $rootScope.$broadcast('osemLoaderVisibility', { visible: false }); - var listStyleFromLocalStorage = LocalStorageService.getValue(localStorageKey); if (listStyleFromLocalStorage) { vm.listStyle = listStyleFromLocalStorage; diff --git a/app/scripts/controllers/info.js b/app/scripts/controllers/info.js index daf0e906..c60c2121 100644 --- a/app/scripts/controllers/info.js +++ b/app/scripts/controllers/info.js @@ -5,8 +5,8 @@ .module('openSenseMapApp') .controller('InfoController', InfoController); - InfoController.$inject = ['$rootScope', '$state', 'app']; - function InfoController ($rootScope, $state, app) { + InfoController.$inject = ['$state', 'app']; + function InfoController ($state, app) { var vm = this; vm.app = app; vm.tabActive = { @@ -22,7 +22,6 @@ //////////////// function activate () { - $rootScope.$broadcast('osemLoaderVisibility', { visible: false }); changeActiveTab($state.current.url.split('/')[1]); }