diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/InCallController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/InCallController.js index c093be086f..47eb987a28 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/InCallController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/InCallController.js @@ -20,6 +20,14 @@ if (storage.data.videoCall) { $scope.callTemplate = 'partials/video_call.html'; } + + $rootScope.$on('call.conference', function(event, data) { + $timeout(function() { + if($scope.chatStatus) { + $scope.openChat(); + } + }); + }); $rootScope.$on('call.video', function(event, data) { $timeout(function() { @@ -78,4 +86,4 @@ } ]); -})(); \ No newline at end of file +})(); diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js index f7e3d5bb91..bd2f2562c1 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js @@ -12,7 +12,7 @@ $scope.verto = verto; $scope.storage = storage; $scope.call_history = angular.element("#call_history").hasClass('active'); - $scope.chatStatus = angular.element('#wrapper').hasClass('toggled'); + $rootScope.chatStatus = angular.element('#wrapper').hasClass('toggled'); /** * (explanation) scope in another controller extends rootScope (singleton) @@ -202,20 +202,20 @@ }; $scope.toggleChat = function() { - if ($scope.chatStatus && $rootScope.activePane === 'chat') { + if ($rootScope.chatStatus && $rootScope.activePane === 'chat') { $rootScope.chat_counter = 0; } angular.element('#wrapper').toggleClass('toggled'); - $scope.chatStatus = angular.element('#wrapper').hasClass('toggled'); + $rootScope.chatStatus = angular.element('#wrapper').hasClass('toggled'); }; - $scope.openChat = function() { - $scope.chatStatus = false; + $rootScope.openChat = function() { + $rootScope.chatStatus = false; angular.element('#wrapper').removeClass('toggled'); }; $scope.closeChat = function() { - $scope.chatStatus = true; + $rootScope.chatStatus = true; angular.element('#wrapper').addClass('toggled'); }; @@ -240,11 +240,9 @@ Fullscreen.cancel(); } - - console.log($scope.chatStatus); - if (!$scope.chatStatus) { + if (!$rootScope.chatStatus) { angular.element('#wrapper').toggleClass('toggled'); - $scope.chatStatus = angular.element('#wrapper').hasClass('toggled'); + $rootScope.chatStatus = angular.element('#wrapper').hasClass('toggled'); } $rootScope.dialpadNumber = ''; diff --git a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js index cb30f897a4..940ae1059d 100644 --- a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js +++ b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js @@ -335,6 +335,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora function startConference(v, dialog, pvtData) { $rootScope.$emit('call.video', 'video'); + $rootScope.$emit('call.conference', 'conference'); data.chattingWith = pvtData.chatID; data.confRole = pvtData.role;