diff --git a/html5/verto/verto_communicator/src/storageService/services/splash_screen.js b/html5/verto/verto_communicator/src/storageService/services/splash_screen.js index 917becfbcf..3537313bbe 100644 --- a/html5/verto/verto_communicator/src/storageService/services/splash_screen.js +++ b/html5/verto/verto_communicator/src/storageService/services/splash_screen.js @@ -100,8 +100,23 @@ }); result['promise'] = configPromise; + + var connectCallback = function(v, connected) { + verto.data.connecting = false; + if (connected) { + storage.data.ui_connected = verto.data.connected; + storage.data.ws_connected = verto.data.connected; + storage.data.name = verto.data.name; + storage.data.email = verto.data.email; + storage.data.login = verto.data.login; + storage.data.password = verto.data.password; + resolve(result); + } + }; + + verto.data.connecting = true; + verto.connect(connectCallback); - resolve(result); }); }; diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js index ac7fde0f7e..4dd6879731 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js @@ -31,10 +31,6 @@ $location.path('/'); } - $rootScope.$on('config.http.success', function(ev) { - $scope.login(); - }); - /** * Login the user to verto server and * redirects him to dialpad page. diff --git a/html5/verto/verto_communicator/src/vertoService/services/configService.js b/html5/verto/verto_communicator/src/vertoService/services/configService.js index ee573ad23d..2c302b6ad1 100644 --- a/html5/verto/verto_communicator/src/vertoService/services/configService.js +++ b/html5/verto/verto_communicator/src/vertoService/services/configService.js @@ -61,10 +61,8 @@ vertoService.service('config', ['$rootScope', '$http', '$location', 'storage', ' verto.data.autologin_done = true; } - $rootScope.$emit('config.http.success', data); return response; }, function(response) { - $rootScope.$emit('config.http.error', response); return response; });