Merge pull request #504 in FS/freeswitch from ~STEFAN_YOHANSSON/freeswitch:bugfix/FS-8089-pop-out-member-list-on-conference to master

* commit 'f7ba4c440279fbefda1e61052a4960909ed3ff74':
  FS-8089 [verto_communicator] Opening members list when start conference
This commit is contained in:
Ítalo Rossi 2015-09-22 09:02:17 -05:00
commit a96290291b
3 changed files with 18 additions and 11 deletions

View File

@ -20,6 +20,14 @@
if (storage.data.videoCall) { if (storage.data.videoCall) {
$scope.callTemplate = 'partials/video_call.html'; $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) { $rootScope.$on('call.video', function(event, data) {
$timeout(function() { $timeout(function() {
@ -78,4 +86,4 @@
} }
]); ]);
})(); })();

View File

@ -12,7 +12,7 @@
$scope.verto = verto; $scope.verto = verto;
$scope.storage = storage; $scope.storage = storage;
$scope.call_history = angular.element("#call_history").hasClass('active'); $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) * (explanation) scope in another controller extends rootScope (singleton)
@ -202,20 +202,20 @@
}; };
$scope.toggleChat = function() { $scope.toggleChat = function() {
if ($scope.chatStatus && $rootScope.activePane === 'chat') { if ($rootScope.chatStatus && $rootScope.activePane === 'chat') {
$rootScope.chat_counter = 0; $rootScope.chat_counter = 0;
} }
angular.element('#wrapper').toggleClass('toggled'); angular.element('#wrapper').toggleClass('toggled');
$scope.chatStatus = angular.element('#wrapper').hasClass('toggled'); $rootScope.chatStatus = angular.element('#wrapper').hasClass('toggled');
}; };
$scope.openChat = function() { $rootScope.openChat = function() {
$scope.chatStatus = false; $rootScope.chatStatus = false;
angular.element('#wrapper').removeClass('toggled'); angular.element('#wrapper').removeClass('toggled');
}; };
$scope.closeChat = function() { $scope.closeChat = function() {
$scope.chatStatus = true; $rootScope.chatStatus = true;
angular.element('#wrapper').addClass('toggled'); angular.element('#wrapper').addClass('toggled');
}; };
@ -240,11 +240,9 @@
Fullscreen.cancel(); Fullscreen.cancel();
} }
if (!$rootScope.chatStatus) {
console.log($scope.chatStatus);
if (!$scope.chatStatus) {
angular.element('#wrapper').toggleClass('toggled'); angular.element('#wrapper').toggleClass('toggled');
$scope.chatStatus = angular.element('#wrapper').hasClass('toggled'); $rootScope.chatStatus = angular.element('#wrapper').hasClass('toggled');
} }
$rootScope.dialpadNumber = ''; $rootScope.dialpadNumber = '';

View File

@ -335,6 +335,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
function startConference(v, dialog, pvtData) { function startConference(v, dialog, pvtData) {
$rootScope.$emit('call.video', 'video'); $rootScope.$emit('call.video', 'video');
$rootScope.$emit('call.conference', 'conference');
data.chattingWith = pvtData.chatID; data.chattingWith = pvtData.chatID;
data.confRole = pvtData.role; data.confRole = pvtData.role;